Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ian_bellinfantie
Beginner
38 Views

implementing fftw3 plan for complex numbers

Hi,

I'm using the dp_plan_dft_1d.c type implementation from the MKL fftw3xc examples directory.

However, I'm having trouble assigning a value to the fft inputs. Below is the code extract and the debug info from vs2010.

in_y[0] = yy.real();

in_y[1] = yy.imag();


I get

- in_y 0x0000000000000000 double [2]*

[0] CXX0030: Error: expression cannot be evaluated

[1] CXX0030: Error: expression cannot be evaluated

- yy [131072](0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,-0.00000000000000000,...,...) std::vector<:COMPLEX>,std::allocator<:COMPLEX> > >

[size] 131072 long

[capacity] 131072 long

+ [0] 0.00000000000000000 std::complex



Can someone please advise where i am going wrong?

Thanks
0 Kudos
1 Reply
Ying_H_Intel
Employee
38 Views

Hi ian,

Could you please provide a test case to show the problem?

we can't reproduce the problem with MSVC2010, win32 console application.i modify thefile to CPP file as complex isfrom C++. and do exact as yourassignments. The below the related code, Attached is the wholecpp file.

int N=131072;

/* Initialize array x with harmonic H */
static void init(fftw_complex *x, int N, int H)
{

std::complex *yy;
yy= new std::complex;

for (n = 0; n < N; n++)
{
std::complex tmp(0.1*n, 0.5*n);
yy=tmp;

x[0] = yy.real();
x[1] = yy.imag();


}
}

Regards,
Ying

Reply