chounght
Newbie level 2
I use DE1-SoC board.
and I use OpenCL SDK.
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////////
/////////my source////////
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.
and I use OpenCL SDK.
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////////
Code:
__kernel void test_kernel(__attribute __((local_mem_size(2048)))__local int const * restrict table)
{
...
}
/////////my source////////
Code:
status = clSetKernelArg(kernel[i], argi++, 256*sizeof(cl_mem), &table[i]);
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.
Last edited by a moderator: