On Mittwoch 21 Oktober 2009, Peter Schmidtke wrote:
> The kernel has correct access to the data in x,y and writes correctly to
> out. But dim1 is not 0, why? Normally the code like this should only fill
> up dest[0] and nothing else.

Leave out the drv.In(). "In" means "allocate space on the device and pass a 
pointer".

> Another question a bit disconnected from the first one is, if I allocate a
> numpy array with zeros (numpy.zeros(4,dtype="float32")) and I run the
> kernel without writing actually to all fields in the array dest, why I have
> a resulting array that has no 0 element, but some memory crap?

I'm not sure I understand--a numpy array and a kernel aren't connected in any 
way. Is there a copy operation in between?

Andreas

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyCUDA mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net

Reply via email to