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
On 24 February 2011 21:10, Andreas Kloeckner <lists(a)informa.tiker.net> wrote:
On Tue, 22 Feb 2011 16:06:14 +0530, nithin s
is there any way to interpret a gpuarray's dtype as a vector? I
understand that it tied to numpy.dtype. But I also saw code in
pycuda/tools.py that interprets pycuda::complex<float> .
Not yet. That said, numpy has support for record data types.  We
would just have to provide canned ones for CUDA's vector types and
recognize them in pycuda.tools.dtype_to_ctype() and
pycuda.tools.parse_c_arg(). That should do the trick.