In my OpenCL program, Iβm going to end up with more than 60 global global memory buffers that each core will need. What is the recommended way to let each core know the location of each of these buffers?
The buffers themselves are stable throughout the life of the application β that is, we will allocate buffers when the application starts, call several cores, and then free only the buffers at the end of the application. Their contents, however, may change as the kernels read / write from them.
In CUDA, I did this to create 60+ global program area variables in my CUDA code. Then on the host I will write the address of the device buffers that I allocated to these global variables. Then the kernels would simply use these global variables to find the buffer in which it should run.
What would be the best way to do this in OpenCL? It seems that the CL global variables are slightly different from CUDA, but I canβt find a clear answer if my CUDA method works, and if so, how do I go about passing buffer pointers to global variables. If that doesn't work, what's the best way?
int3h source
share