From within Python, you can make a string containing
your C++ code
that uses thrust, save it to file, invoke nvcc to build it as a
library. Then use ctypes to load it and get the handle to the
function.
The function can accept a device pointer. Then, suppose you've done
some work using PyCUDA. Get the GPU pointer and pass it to the
function -- no memory copying occurs here. Call the function letting
thrust do its stuff inside there and the output can be a device
pointer again or whatever.
That's the way I combine the two great libraries PyCUDA and thrust.
Tell me if it sounds suitable and I'll send you an example.
Igor
On Wed, May 23, 2012 at 7:58 AM, Apostolis Glenis <apostglen46(a)gmail.com> wrote:
Just curious :
What would it take to compile a thrust function with pyCUDA?
Apostolis
_______________________________________________
PyCUDA mailing list
PyCUDA(a)tiker.net
http://lists.tiker.net/listinfo/pycuda