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
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.
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?
PyCUDA mailing list