The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Local memory access question in the specification

I have read the specification 1.0.48.

According to '3.3 Memory Model',
Local Memory is local to a work-group and allocated on the device.
And Table 3.1 refer to behavior of a host and kernels.
A host allocates 'local memory' dynamically but has 'No access'.

On the other hand, I have read ..

Alternatively, the local memory region may be mapped onto sections of the global memory.

.

I can't understand. I think it's not able to use clEnqueurMapBuffer.
Is a local memory allocated on a host memory dynamically?
Can I map a local memory to global memory region using something API explicitly?
Or is it the deal within OpenCL implementation?

Re: Local memory access question in the specification

Host cannot read nor write local memory. From host you can only allocate amount of local memory you need in work-groups.
Of course if you try to allocate some local memory and device runs out of free local memory, it will use global *internally*.

Re: Local memory access question in the specification

That depends. There's no such thing as "local" memory on a CPU so the implementation will probably just allocate regular memory for CPU devices. On GPUs there is physical local memory so if you try to use too much you should get an error.