Altera_Forum
Honored Contributor
9 years agoHow can I use local memory.
I read Optimizing Local Memory Accesses of Altera SDK for OpenCL Best Prasctices Guides.
and I can see that I can use local memory used by clSetKernelArg. so I write my source as below /////////kernel source//////// __kernel void test_kernel(__attribute __((local_mem_size(2048)))__local int const * restrict table) { ... } //////////////////////////////// /////////my source//////// status = clSetKernelArg(kernel, argi++, 256*sizeof(cl_mem), &table); ///////////////////////////// 1) I compile my kernel and I see warning massage as bellow. Compiler Warning: Pointer to local memory argument with no store to it. 2)and execute my program. I can see error massage as bellow. ERROR: CL_INVALID_ARG_VALUE How can I use local memory used clSetKernelArg???? thanks.