Dear pycuda users,
First of all I wish you all the best for this new year.
By the way I was wondering why "int8" or "char" are not defined as valid types
in elementwise kernels:
File "/usr/lib/python2.6/dist-packages/pycuda/compyte/dtypes.py", line 103,
in dtype_to_ctype
raise ValueError, "unable to map dtype '%s'" % dtype
ValueError: unable to map dtype 'int8'
whereas most others are ?
My code looks like:
constrains_real = ElementwiseKernel([VectorArg(numpy.complex64, "vol"),
VectorArg(numpy.complex64, "last"), VectorArg(numpy.uint8, "mask"),
ScalarArg(numpy.float32, "scale"), ScalarArg(numpy.float32, "size") ],
"""
pycuda::complex<float> data;
data = vol[i] / size;
if ((mask[i]>0) || (data.real()<0))
vol[i] = last[i]-scale*data;
else
vol[i] = data;
""")
Cheers,
--
Jérôme Kieffer
On-Line Data analysis / Software Group
ISDD / ESRF
tel +33 476 882 445
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda