I want to pass an array to the OpenCL kernel in local address space. But I get CL_invalid_VALUE.
int a[]={1,2,3,4,5};
We don't need to create a buffer to pass data in Local address space. So:
clSetKernelArg(kernel, 21, sizeof(int)*5,a);
In Kernel
__kernel void abc(__local int *a)
{}
If i change the __local to __global, everything works fine. Please tell me how to do this.
sizeof(int)*5tosizeof(a)