Either I'm doing something wrong or indeed it's by design that I can't
use custom struct-types with ReductionKernel? How do I proceed?
Igor



Fxy= [('f','double'), ('i', gpuarray.vec.int2)]

max = ReductionKernel(dtype_out=Fxy, neutral="0",
reduce_expr="max(a.f,b.f)", map_expr="a[i]", arguments="Fxy *x")





Traceback (most recent call last):
...

  File 
"/usr/local/sage/sage-test/sage-4.7.1/local/lib/python2.6/site-packages/pycuda-2011.1.2-py2.6-linux-x86_64.egg/pycuda/reduction.py",
line 187, in __init__
    dtype_to_ctype(dtype_out), self.block_size,
  File 
"/usr/local/sage/sage-test/sage-4.7.1/local/lib/python2.6/site-packages/pycuda-2011.1.2-py2.6-linux-x86_64.egg/pycuda/tools.py",
line 399, in dtype_to_ctype
    raise ValueError, "unable to map dtype '%s'" % dtype
ValueError: unable to map dtype '[('f', '<f8'), ('i', [('x', '<u4'),
('y', '<u4')])]'

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

Reply via email to