Andreas, thanks, but it currently implies Linux, I'll see if I can make it work on Windows. Or maybe I'll submit and someone will try it on Windows. I just need to extract it from Sage into a plain Python script. Give me a couple of days. http://dev.math.canterbury.ac.nz/home/pub/14/ http://dev.math.canterbury.ac.nz/home/pub/19/
On Thu, May 24, 2012 at 10:39 AM, Andreas Kloeckner <li...@informa.tiker.net> wrote: > On Thu, 24 May 2012 09:54:15 +1200, Igor <rych...@gmail.com> wrote: >> 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. > > If you wouldn't mind contributing an example for the wiki, I'd be very > happy to add it. :) > > Andreas > _______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda