c# - Dynamic Thread Pooling with the GPU -


so far have implemented simple programm thread pool paradigm, in have number of threads working on number of tasks. tasks available @ time independant each other. each task, have output , number of tasks generated it. (e.g

func(a, b): tasks.enque((a+b, b+1), (a*b, b+2)); return sin(a);

in reality there may lot more tasks, generated each task finished, workload grows pretty fast. in order keep computing time reasonably low, thought might generate tree using gpu, tasks independant, created.

and come question: there posibility somehow straigth forward e.g. using opencl?
wonder if idea. far haven't seen possibility add tasks queue dynamically in opencl, , if i'd say: ok - first calculate first queue, , generate new queue, start later again, fear overhead memory copying between gpu , cpu might large won't efficient anymore simple calculations intend do. not sure, if able keep data in gpus ram, or if extracted automatically, , therefore needs copied there , again. (i plan use opencl.net)

thank enlightning me knowledge, absolutly beginner both, multithreading , gpus

since opencl 2.0 possible enqueue kernels device without host interaction. have @ opencl™ 2.0: device enqueue , workgroup built-in functions.

however doubt find .net bindings opencl 2.0, far i'm aware there aren't still c++ bindings.


Comments