cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

uforob
Journeyman III

clSetKernelArg and local memory

Can I use clSetKernelArg function to to set a  __local argument with an already assigned (initilized) variable?

0 Likes
4 Replies
dravisher
Journeyman III

The OpenCL 1.1 specification (table 3.1, page 27) seems to be quite clear on there not being any way for the host to access the contents of local memory. So I'm pretty sure this is not possible (at least not in a standard/portable way).

0 Likes

Thank you, now I read that.

0 Likes

Incidentally, in that reference what does exactly only static allocationfor kernel mean?

0 Likes

I believe it means that at compile time (when the OpenCL code is compiled, not the C/C++ code) the size of the local array must be known if it's declared in the kernel, while if it's allocated by the host through clSetKernelArg it's size need not be known by the OpenCL compiler.

0 Likes