190"clFFT_1DTwistInterleaved(__global float2 *in, unsigned int startRow, unsigned int numCols, unsigned int N, unsigned int numRowsToProcess, int dir) \\\n"
191"{ \\\n"
192" float2 a, w; \\\n"
193" float ang; \\\n"
194" unsigned int j; \\\n"
195" unsigned int i = get_global_id(0); \\\n"
196" unsigned int startIndex = i; \\\n"
197" \\\n"
198" if(i < numCols) \\\n"
199" { \\\n"
200" for(j = 0; j < numRowsToProcess; j++) \\\n"
201" { \\\n"
202" a = in[startIndex]; \\\n"
203" ang = 2.0f * M_PI * dir * i * (startRow + j) / N; \\\n"
204" w = (float2)(native_cos(ang), native_sin(ang)); \\\n"
205" a = complexMul(a, w); \\\n"
206" in[startIndex] = a; \\\n"
207" startIndex += numCols; \\\n"
208" } \\\n"
209" } \\\n"
210"} \\\n");
211
212staticstring twistKernelPlannar = string(
213"__kernel void \\\n"
214"clFFT_1DTwistSplit(__global float *in_real, __global float *in_imag , unsigned int startRow, unsigned int numCols, unsigned int N, unsigned int numRowsToProcess, int dir) \\\n"
215"{ \\\n"
216" float2 a, w; \\\n"
217" float ang; \\\n"
218" unsigned int j; \\\n"
219" unsigned int i = get_global_id(0); \\\n"
220" unsigned int startIndex = i; \\\n"
221" \\\n"
222" if(i < numCols) \\\n"
223" { \\\n"
224" for(j = 0; j < numRowsToProcess; j++) \\\n"
225" { \\\n"
226" a = (float2)(in_real[startIndex], in_imag[startIndex]); \\\n"
227" ang = 2.0f * M_PI * dir * i * (startRow + j) / N; \\\n"
228" w = (float2)(native_cos(ang), native_sin(ang)); \\\n"