I just upgraded from OpenCL 1.0 to 1.1. When I make my call to the min() function, I get error output:
<program source>:45:44: error: call to 'min' is ambiguous
int nFramesThisKernelIngests = min(nFramesToIngest - nAvg*nPP*get_global_id(2), nAvg*nPP);
<built-in>:3569:27: note: candidate function
double16 __OVERLOADABLE__ min(double16, double16);
^
<built-in>:3568:26: note: candidate function
double8 __OVERLOADABLE__ min(double8, double8);
The error output continues for more lines with different types.
When I tried to isolate the problem, get_global_id(2) appears to be the problem. I thought that casting get_global_id(2) to an int from a uint (I believe it returns a uint) would solve the problem but it doesn't. Does anybody know what is going on? I looked at the 1.0 and 1.1 specs and I am still confused as to why this is happening.