IMHO, memcpy and to_device should act as closely to C memcpy as possible - just 
blindly copying bytes. Anything else has the potential to be very unintuitive 
and frustrating to C programmers, which seems like a bad thing to me seeing as 
CUDA is C(++).

If you want something to be smart about arrays, isn't that what GPUArray is for?

Just my 2 cents.

Ian Cullinan
________________________________________
From: [email protected] [[email protected]] On Behalf Of Andreas 
Klöckner [[email protected]]
Sent: Monday, 2 March 2009 8:21 AM
To: Nicholas Tung
Cc: [email protected]
Subject: Re: [PyCuda] pycuda memcpy_htod

2) I'm torn about the flag check. I don't want people falling into the same
trap as you. On the other hand, your change outlaws legitimate code (and
forces it into a sketchy-sounding "_unchecked" code path). Also, having this
check just for C-contiguity and not F is kind of asymmetric.

If there are strong opinion one way or the other, now is the time to say
something.
_______________________________________________
PyCuda mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net

Reply via email to