Greetings,
I am basically trying to pass buffer objects to my kernel in an array.
I have got a varying amount of buffer objects on my GPU.
Those buffers i want to pass to a kernel. (all int arrays)
I have also got a list of all the corresponding cl_mem objects.
Is there a way to do this?
My Question is basically a duplicate of this:
http://stackoverflow.com/questions/17249895/how-to-pass-an-array-of-cl-mem-buffers-to-opencl-device
Maybe with openCL 2.0+ its possible to achieve?
If not what is a good way to work around it?
-
Maybe writing a big buffer and write all the smaller buffers to it?<- Sounds like a lot of unused memory due to the varying amount of buffers as well as a lot of unnecessary memory writing. The small buffers are already on the GPU…
-
The other method as mentioned in the link to change the plain text seems bad and is limited by the max parameter size etc.
-
Maybe with program-space variables?
Maybe you have got an idea or a comment on the methods?
Thanks,
Cery