Konno23
Konno23

Reputation: 3

cufftcomplex.h Programmers reference/Documentation

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

Answers (1)

havogt
havogt

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

Related Questions