On a related note; I made this little snippet of CUDA code, to prototype
using greenlets in the place of threads, and it works great:

http://pastebin.com/mGGWn28A

I imagine it would work just as well for openCL; rather than having a
thread which switches at unpredictable times, greenlets yield at specified
times, which allows one to overcome any such issues in a rather simple
manner, while at the same time being far lower in overhead than threads.
The downside is that one needs explicit statements to yield in end user
code; but then again, some wise man once said there is something to be said
for explicit over implicit.
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to