MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / Kernel

Class Kernel

src/library/generator.stockham.cpp:2783–4471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2781 // FFT kernel
2782 template <Precision PR>
2783 class Kernel
2784 {
2785 size_t length; // Length of FFT
2786 size_t workGroupSize; // Work group size
2787 size_t cnPerWI; // complex numbers per work-item
2788
2789 size_t numTrans; // Number of transforms per work-group
2790 size_t workGroupSizePerTrans; // Work group subdivision per transform
2791 size_t numPasses; // Number of FFT passes
2792 std::vector<size_t> radices; // Base radix at each pass
2793 std::vector<Pass<PR> > passes; // Array of pass objects
2794
2795 bool halfLds; // LDS used to store one component (either real or imaginary) at a time
2796 // for passing intermediate data between the passes, if this is set
2797 // then each pass-function should accept same set of registers
2798
2799 bool linearRegs; // scalar registers
2800
2801 // Future optimization ideas
2802 // bool limitRegs; // TODO: Incrementally write to LDS, thereby using same set of registers for more than 1 butterflies
2803 // bool combineReadTwMul; // TODO: Combine reading into registers and Twiddle multiply
2804
2805 bool r2c2r; // real to complex or complex to real transform
2806 bool r2c, c2r;
2807 bool rcFull;
2808 bool rcSimple;
2809
2810 bool blockCompute; // When we have to compute FFT in blocks (either read or write is along columns)
2811 BlockComputeType blockComputeType;
2812 size_t blockWidth, blockWGS, blockLDS;
2813
2814 bool realSpecial;
2815
2816 const FFTKernelGenKeyParams params; // key params
2817
2818
2819 inline std::string IterRegs(const std::string &pfx, bool initComma = true)
2820 {
2821 std::string str = "";
2822
2823 if(linearRegs)
2824 {
2825 if(initComma) str += ", ";
2826
2827 for(size_t i=0; i<cnPerWI; i++)
2828 {
2829 if(i != 0) str += ", ";
2830 str += pfx; str += "R";
2831 str += SztToStr(i);
2832 }
2833 }
2834
2835 return str;
2836 }
2837
2838 inline bool IsGroupedReadWritePossible()
2839 {
2840 bool possible = true;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected