Hi guys

I’m working on a homework project compare performance of Fast Fourier Transform on CPU vs GPU . I’m done with the CPU part , but with GPU , I have a problem.

The trouble is the kernel runtime is zero , the input is the same as the output image . I use VS2010 on win7 with AMD APP SDK . Here is the host code() , the kernel, an addition header to handle the image , they can be found in The OpenCL Programming Book (Ryoji Tsuchiyama…)

My guess the error is in the phase where we pass values from the image pixels to the cl_float2 *xm (line 169-174 in the host code). I can’t access the vector component to check it either , the compiler ain’t accept .sX or .xy , throws an error about it . Other parts –kernel,header…- looks fine with me .

Code :
for (i=0; i < n; i++) {  
for (j=0; j < n; j++) {  
((float*)xm)[(2*n*j)+2*i+0] = (float)ipgm.buf[n*j+i];   //real
((float*)xm)[(2*n*j)+2*i+1] = (float)0; //imag
}   
}

So hope you guys help me out . Any ideas will be appreciated .