Hi,

I have a question on the example here
http://documen.tician.de/pycuda/tutorial.html#advanced-topics. In the
__init__ function of DoubleOpStruct:

def __init__(self, array, struct_arr_ptr):

     # this copies array on the host to device and returns a 'pointer' to
the array on the device, correct?
     self.data = cuda.to_device(array)

     # why memcpy_htod? memcpy_dtod would make more sense to me because
self.data refers to something on the device
     cuda.memcpy_htod(int(struct_arr_ptr)+8, numpy.intp(int(self.data)))


Thanks

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

Reply via email to