# HG changeset patch # User Shohei KOKUBO # Date 1402453498 -32400 # Node ID 6fced32f85fd8e3783e3d5c305397c4e838ff14d # Parent 113b1edd2a9a4bacfac1aee17c18dfa69e7a16bf wrong result diff -r 113b1edd2a9a -r 6fced32f85fd example/cuda_fft/fft.cu --- a/example/cuda_fft/fft.cu Tue Jun 03 18:12:25 2014 +0900 +++ b/example/cuda_fft/fft.cu Wed Jun 11 11:24:58 2014 +0900 @@ -123,7 +123,6 @@ spinFact(float2* w, int n) { unsigned long i = blockIdx.x*blockDim.x+threadIdx.x; // (unsigned long)s->get_param(0); - float2 angle; angle.x = (float)(2*i*PI/(float)n); angle.y = (float)((2*i*PI/(float)n) + PI_2); diff -r 113b1edd2a9a -r 6fced32f85fd example/cuda_fft/main.cc --- a/example/cuda_fft/main.cc Tue Jun 03 18:12:25 2014 +0900 +++ b/example/cuda_fft/main.cc Wed Jun 11 11:24:58 2014 +0900 @@ -27,21 +27,22 @@ } int -setWorkSize(int* block, int* thread, int x, int y) +setWorkSize(int* xblocks, int* yblocks, int x, int y) { switch(y) { case 1: - *block = x; - *thread = 1; + *xblocks = x; + *yblocks = 1; break; default: - *block = x; - *thread = y; + *xblocks = x; + *yblocks = y; break; } return 0; } + int fftCore(CUdeviceptr dst, CUdeviceptr src, CUdeviceptr spin, int m, enum Mode direction) { @@ -53,8 +54,8 @@ } int n = 1<