I have attached wrappers for CUFFT and complex arithmetics and some test
codes. In pycuda_complex.py, I replace some functions in
+ elif dtype == numpy.complex64:
+ return "float2"
This is incorrect.
"float2" is the structure defined in CUDA. It has an
"x" and a "y"
fields. This structure is used in CUFFT to represent complex numbers.
These two additional lines are used for moving complex arrays to and
from GPUs, and for my CUFFT and complex arithmetics wrapper.
I don't quite like this. I'd much rather provide a complex data type in
PyCUDA--then we'd have an actual mapping. Is this what you are speaking of
After checking, dtype_to_ctype is probably not needed in my wrappers, as
I hardcoded the CUDA complex datatype (float2) in the kernels.