Can I use clSetKernelArg function to to set a __local argument with an already assigned (initilized) variable?
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).
Thank you, now I read that.
Incidentally, in that reference what does exactly only static allocationfor kernel mean?
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.
Retrieving data ...