Error: expression must be of integral or enumerated type
You need to use triple angle brackets as part of your kernel startup syntax:
findMinMax<<<sizeof(lum)/1024,1024>>>(lum,&min_logLum,&max_logLum);
This should resolve the compilation error if everything else is correct (for example, the set of arguments matches the kernel prototype).
Note that some other things are suspicious about the way you start the kernel:
-
You will round the number of blocks per grid, not upwards. For example, if it
sizeof(lum)
evaluates to 1500, you still only run 1 block out of 1024 threads. This may not be what you intend to do. -
You pass a pointer node
&min_logLum
and&max_logLum
in the core of that, again, may not be what you intend to do here, but it's hard to tell without seeing the rest of your code.
source to share