On Tue, 20 Jul 2010 21:13:25 -0700, Bryan Catanzaro 
<catan...@eecs.berkeley.edu> wrote:
> Hi All -
>
> I needed to slice a GPUArray and then pass the gpudata of the
> resulting slice to a CUDA kernel expecting a pointer.
>
> The current slicing logic in pycuda.gpuarray.GPUArray calculates the
> gpudata of the slice as an integer, which causes problems if I try to
> pass it as a pointer to a CUDA Kernel, due to the type mismatch
> between int and pointer.

I'm not sure I understand what the mismatch is. If you cast to a
numpy.intp, you're guaranteed a pointer-sized integer that will work
just fine as a kernel argument. I'm therefore not sure what the problem
is. Can you clarify?

Andreas

Attachment: pgpp3Uhl3bRfi.pgp
Description: PGP signature

_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to