| 2940 | |
| 2941 | public: |
| 2942 | Kernel( const FFTKernelGenKeyParams ¶msVal) : |
| 2943 | params(paramsVal), r2c2r(false) |
| 2944 | |
| 2945 | { |
| 2946 | length = params.fft_N[0]; |
| 2947 | workGroupSize = params.fft_SIMD; |
| 2948 | numTrans = (workGroupSize * params.fft_R) / length; |
| 2949 | |
| 2950 | r2c = false; |
| 2951 | c2r = false; |
| 2952 | // Check if it is R2C or C2R transform |
| 2953 | if(params.fft_inputLayout == CLFFT_REAL) r2c = true; |
| 2954 | if(params.fft_outputLayout == CLFFT_REAL) c2r = true; |
| 2955 | r2c2r = (r2c || c2r); |
| 2956 | |
| 2957 | if(r2c) |
| 2958 | { |
| 2959 | rcFull = ( (params.fft_outputLayout == CLFFT_COMPLEX_INTERLEAVED) || |
| 2960 | (params.fft_outputLayout == CLFFT_COMPLEX_PLANAR) ) ? true : false; |
| 2961 | } |
| 2962 | if(c2r) |
| 2963 | { |
| 2964 | rcFull = ( (params.fft_inputLayout == CLFFT_COMPLEX_INTERLEAVED) || |
| 2965 | (params.fft_inputLayout == CLFFT_COMPLEX_PLANAR) ) ? true : false; |
| 2966 | } |
| 2967 | |
| 2968 | rcSimple = params.fft_RCsimple; |
| 2969 | |
| 2970 | halfLds = true; |
| 2971 | linearRegs = true; |
| 2972 | |
| 2973 | realSpecial = params.fft_realSpecial; |
| 2974 | |
| 2975 | blockCompute = params.blockCompute; |
| 2976 | blockComputeType = params.blockComputeType; |
| 2977 | // Make sure we can utilize all Lds if we are going to |
| 2978 | // use blocked columns to compute FFTs |
| 2979 | if(blockCompute) |
| 2980 | { |
| 2981 | assert(length <= 256); // 256 parameter comes from prototype experiments |
| 2982 | // largest length at which block column possible given 32KB LDS limit |
| 2983 | // if LDS limit is different this number need to be changed appropriately |
| 2984 | halfLds = false; |
| 2985 | linearRegs = true; |
| 2986 | } |
| 2987 | |
| 2988 | assert( ((length*numTrans)%workGroupSize) == 0 ); |
| 2989 | cnPerWI = (numTrans * length) / workGroupSize; |
| 2990 | workGroupSizePerTrans = workGroupSize/numTrans; |
| 2991 | |
| 2992 | // !!!! IMPORTANT !!!! Keep these assertions unchanged, algorithm depend on these to be true |
| 2993 | assert( (cnPerWI * workGroupSize) == (numTrans * length) ); |
| 2994 | assert( cnPerWI <= length ); // Don't do more than 1 fft per work-item |
| 2995 | |
| 2996 | // Breakdown into passes |
| 2997 | |
| 2998 | size_t LS = 1; |
| 2999 | size_t L; |
nothing calls this directly
no test coverage detected