cufft API

Hai,

I have done the sample of cufft.But the output getting is wrong.

The code which I have tried is given below:

[i]#include<stdio.h>

#include<cufft.h>

#define NX 32

#define BATCH 1

int main()

{

cufftHandle plan;

cufftComplex *in;

cufftComplex *out;



in = ( cufftComplex*)malloc( sizeof(cufftComplex)* NX * BATCH );



for(int i = 0;i < NX;i++)

{

	in[i].x = i+1;

	in[i].y = 0;

}



out = ( cufftComplex*)malloc( sizeof(cufftComplex)* NX * BATCH );

cufftPlan1d(&plan, NX, CUFFT_C2C, BATCH);

cufftExecC2C(plan, in,out, CUFFT_FORWARD);



cufftDestroy(plan);

free(in);

free(out);

}[/i]

OUTPUT:

cufft: ERROR: C:/cygwin/home/cuda0/cuda/sw/gpgpu_rel1.1/cufft/src/config.cu, lin

e 106

cufft: ERROR: CUFFT_INTERNAL_ERROR

cufft: ERROR: C:/cygwin/home/cuda0/cuda/sw/gpgpu_rel1.1/cufft/src/cufft.cu, line

115

cufft: ERROR: CUFFT_INVALID_PLAN

cufft: ERROR: C:/cygwin/home/cuda0/cuda/sw/gpgpu_rel1.1/cufft/src/cufft.cu, line

94

cufft: ERROR: CUFFT_INVALID_PLAN

I am using the emulator for running the program.May be that is the problem for this.

Any one please help me and provide the proper solution for this.

Thanks in advance