PDA

View Full Version : Global memory access



Rui
03-22-2010, 09:50 AM
Is it possible to make all work-items (from different work-groups) to access a specific global variable consistently and write to it in a synchronized way?

dbs2
03-23-2010, 12:18 PM
Depends on what you mean by "consistently." You can use global atomics to do something like this, but if you want to do cross work-group synchronization then the answer is no. That is explicitly not supported because the OpenCL 1.0 standard does not guarantee forward progress in the scheduler. On some systems this will work (certainly on Nvidia if the number of work-groups is <= number of SMs) but it may not on others.