Hi all,
I am using cufftExecC2C for a FFT. The input is a cufftComplex array with random generated x and y elements. However, the outputs are all ZEROs except the 0th element. Could someone help?
threadsPerBlock.x = 512;
numBlocks.x = 4;
numBlocks.y = 256;
const int rank = 1;
int n[rank] = { res_axis };
cufftPlanMany(&cufftPlan, rank, n,
NULL, 1, 2048,
NULL, 1, 2048,
CUFFT_C2C, 256);
cufftExecC2C(cufftPlan, tempComplex, tempComplex, CUFFT_FORWARD);
// Where tempComplex is a 1D random cufftComplex array with length of 2048 * 256
cudaDeviceSynchronize();
printf(“%e\n”, tempComplex[0].x);
printf(“%e\n”, tempComplex[0].y);
printf(“%e\n”, tempComplex[1].x);
printf(“%e\n”, tempComplex[1].y);
printf(“%e\n”, tempComplex[22110].x);
printf(“%e\n”, tempComplex[22110].y);
Results:
4.166942e+05
4.525892e+05
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00