I think I have a problem with finding/setting the local buffer but IÂ´m not sure how to describe/explain my problem.
Ok… my situation:
I have for example 10000 Items to be handled and I want to make use of __local memory to speed up. Therefore I create local buffer f.e. like this
__kernel void test(__global MyStruct in_MyStruct)
__local MyStruct l_SharedMemory[FIXED_SIZE];
//copy global to local ... // create barrier barrier(SOME_FENCE); // make calculations ..
FIXED_SIZE depends on the hardware IÂ´m running. Therefore I thought get CL_KERNEL_WORK_GROUP_SIZE with clGetKernelWorkGroupInfo and use the result to find the optimal value for FIXED_SIZE. Afterwards passing FIXED_SIZE as a compiler option when calling clCreateKernel. Theoretically a good idea - the problem is that for clGetKernelWorkGroupInfo I need a kernel which isnÂ´t created at that time. Any ideas how to find a correct value for fixed size?!?!?!