228"clFFT_1DTwistInterleaved(__global float2 *in, unsigned int startRow, unsigned int numCols, unsigned int N, unsigned int numRowsToProcess, int dir) \\\n"
229"{ \\\n"
230" float2 a, w; \\\n"
231" float ang; \\\n"
232" unsigned int j; \\\n"
233" unsigned int i = get_global_id(0); \\\n"
234" unsigned int startIndex = i; \\\n"
235" \\\n"
236" if(i < numCols) \\\n"
237" { \\\n"
238" for(j = 0; j < numRowsToProcess; j++) \\\n"
239" { \\\n"
240" a = in[startIndex]; \\\n"
241" ang = 2.0f * M_PI * dir * i * (startRow + j) / N; \\\n"
242" w = (float2)(native_cos(ang), native_sin(ang)); \\\n"
243" a = complexMul(a, w); \\\n"
244" in[startIndex] = a; \\\n"
245" startIndex += numCols; \\\n"
246" } \\\n"
247" } \\\n"
248"} \\\n"
249 );
250
251staticstring twistKernelPlannar = string(
252"__kernel void \\\n"
253"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"
254"{ \\\n"
255" float2 a, w; \\\n"
256" float ang; \\\n"
257" unsigned int j; \\\n"
258" unsigned int i = get_global_id(0); \\\n"
259" unsigned int startIndex = i; \\\n"
260" \\\n"
261" if(i < numCols) \\\n"
262" { \\\n"
263" for(j = 0; j < numRowsToProcess; j++) \\\n"
264" { \\\n"
265" a = (float2)(in_real[startIndex], in_imag[startIndex]); \\\n"
266" ang = 2.0f * M_PI * dir * i * (startRow + j) / N; \\\n"
267" w = (float2)(native_cos(ang), native_sin(ang)); \\\n"