I have data stored as arrays of floats (single precision). I have one array for my real data, and one array for my complex data, which I use as the input to FFTs. I need to copy this data into the cufftComplex
data type if I want to use the CUDA cufft library. From nVidia: " cufftComplex
is a single‐precision, floating‐point complex data type that consists of interleaved real and imaginary components." Data to be operated on by cufft is stored in arrays of cufftComplex
.
How do I quickly copy my data from a normal C array into an array of cufftComplex
? I don't want to use a for
loop because it's probably the slowest possible option. I don't know how to use memcpy
on arrays data of this type, because I do not know how it is stored in memory. Thanks!