On Jul 17, 2013, at 6:50 PM, Andreas Kloeckner <[email protected]> wrote:
> Are you trying to get a pointer into or out of PyCUDA?
> 
> If into, you can just use Python ints, or alternatively:

Thanks!  That's what I needed to know.  The following seems to work fine:

import numbapro.cuda
import pycuda.gpuarray
import pycuda.autoinit

A = np.random.random((2, 2, 2))
cu_A = numbapro.cuda.to_device(A)
pycu_A = pycuda.gpuarray.GPUArray(
    shape=cu_A.shape, dtype=cu_A.dtype, 
    gpudata=cu_A.gpu_data.device_ctypes_pointer.value, 
    strides=cu_A.strides)
pycu_A.get()

Michael.
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to