I wanted to know if it is possible to allocate memmory with cudaMalloc for cuComplex data types, so that a cuda kernel can accept arrays of cuComplex types. I guess it is always possible to do two separate arrays for real and imaginary parts and pass them individually, but it would be nice, for example, to copy from a c++ array of complex to a cuda array of complex with a short syntaxis.
I already use cuComplex, but I was wandering if I could pass cuDoubleComplex* arrays as parameters to the kernel from the host. That would mean that some way of using cudaMalloc like
I think if you study the header file as I suggested, you can figure these things out. And, as I suggested, there are numerous examples of usage of cuComplex.
Instead of assuming what the size of the cuDoubleComplex type is, you could actually look at the header file, as I suggested, and deduce it: