Hi Nithin,

On Mon, 28 Feb 2011 21:40:41 +0530, nithin s <nithin19...@gmail.com> wrote:
>      A related aspect is passing kernel arguments. How do you pass a
> simple float3 vector by value to a kernel?.
> 
>      As of now there are 2 options. split the vector into scalar types
> and grow the kernel argset and reasseble in the kernel. Or one could
> pass it as a tiny gpuarray ( or numpy array wrapped with In/Out).
> 
>     The second would require some tiny mem allocs (which might not so
> bad a thing).
> 
>     Is there a way to wrap it as neatly as np.int32(x) and toss it at
> pycuda/driver.py:function_param_set ?

This turned out to be a bit thornier than I had thought, but it should
be easy now. See here:

http://documen.tician.de/pycuda/array.html#vector-types
http://git.tiker.net/pycuda.git/blob/9a22d393296f1:/test/test_driver.py#l88

Andreas

Attachment: pgpEErbDo69WL.pgp
Description: PGP signature

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

Reply via email to