Task parallelism

I’m trying to parallelize Ant Colony Optimization metaheuristic (http://en.wikipedia.org/wiki/Ant_colony_optimization) with OpenCL, but i don’t know how can I enqueue a common C++ function, instead of a kernel. I need this for enqueue my ants.


You can try using a native kernel, clEnqueueNativeKernel, if your CL implementation supports it.