I'm new to opencl and I'm trying to figure out how to return a variable length array of numbers. (I'm using Cloo for C# .net)
I am doing image processing and I've written a program to look for bubbles in oil. I want to port some of the code to opencl to take advantage of the GPU. I want my opencl function to return a list of co-ordinates and a radius for each bubble. The problem is, since I don't know how many bubbles their will be ahead of time, I seem to need a variable length array. I'm not sure how this is done (or if this can be done) in opencl.
EDIT
Alternatively, if there is a way to exchange datastructures between the GPU and the host, this would work too. However from what I've read from other people's experiences, this doesn't sound like it has been a good option.