Reputation: 3
I am working on an cufft implementation and can't find any reference to the cufftcomplex functions. I found cucomplex.h through google, though, but that doesn't help me. Specifically i want to know, how to read out the imaginary part and the real part of the cufftcomplex struct.
Upvotes: 0
Views: 224
Reputation: 2802
The types cufftComplex
and cuComplex
are actually same. It is documented in the cuFFT documentation. In cufft.h
you will find the typedef:
typedef cuComplex cufftComplex;
In cuComplex.h
you will find that cuComplex
is indeed a float2
, i.e. you can read out the real value with c.x
and the imaginary value with c.y
. Or better use the functions cuCrealf()
and cuCimagf()
which are provided in cuComplex.h
.
Upvotes: 1