This is from an OpenCL tutorial. I have:
void* args[4] = {(void*)5, (void*)123, NULL, NULL};
cl_mem mem_list[2] = {mem_d1, mem_d2}; // mem_d1 and mem_d2 are cl_mem objects
void* args_mem_loc[2] = {&args[2], &args[3]};
status = clEnqueueNativeKernel(*queue, nativeKernel, args, 4, 2, mem_list, args_mem_loc, 0, NULL, NULL); // http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clEnqueueNativeKernel.html
I keep getting compiler error (on the line with status = clEnqueueNativeKernel(*queue... the parameter it is talking about is args_mem_loc).
error C2664: 'clEnqueueNativeKernel' : cannot convert parameter 7 from 'void *[2]' to 'const void **'
args_mem_loc is a void pointer to an array of void pointers and all of the variables it uses are created on the stack (right? im pretty sure). So why does the compiler consider it to be void* [2]?