HOPS
HOPS class reference
MHO_OpenCLFastFourierTransformPlan.hh
Go to the documentation of this file.
1 #ifndef MHO_OpenCLFastFourierTransformPlan_HH__
2 #define MHO_OpenCLFastFourierTransformPlan_HH__
3 
8 
9 #include "MHO_OpenCLInterface.hh"
11 
12 #include <sstream>
13 #include <string>
14 #include <tuple>
15 
16 namespace hops
17 {
18 
20 {
21 
22  public:
25 
26  //sets the dimension of the global array, and size of the
27  //dimension associated with this plan
28  //reconfigures the kernel and necessary buffers
29  void Build(std::size_t NDIM, std::size_t N);
30 
31  cl::Kernel* GetKernel(); //retrieve the kernel
32 
33  std::size_t GetNLocal() { return fNLocal; }
34 
35  private:
38  std::size_t fNDim;
39  std::size_t fN;
40 
41  std::size_t fNLocal;
42  std::size_t fPreferredWorkgroupMultiple;
43  cl::Kernel* fFFTKernel;
44 
45  void ConstructKernel(const std::string& file_name, const std::string& kernel_name, const std::string& cflags);
46 
47  enum fft_plan_type
48  {
49  radix2_strided,
50  radix2_strided_const,
51  radix2_private,
52  radix2_private_const
53  // bluestein_strided,
54  // bluestein_strided_const,
55  // bluestein_private,
56  // bluestein_private_const
57  }
58 
59  using kfile_kfunc_cflags = std::tuple< std::string, std::string, std::string >;
60 
61  std::map< fft_plan_type, kfile_kfunc_cflags > fSourceCodeMap;
62 
63  void BuildCodeList();
64 
65  void Clear();
66 };
67 
68 } // namespace hops
69 
70 #endif
#define NDIM
Definition: TestMultiObjectStreaming.cc:16
Definition: MHO_OpenCLFastFourierTransformPlan.hh:20
MHO_OpenCLFastFourierTransformPlan()
Definition: MHO_OpenCLFastFourierTransformPlan.cc:6
std::size_t GetNLocal()
Definition: MHO_OpenCLFastFourierTransformPlan.hh:33
void Build(std::size_t NDIM, std::size_t N)
virtual ~MHO_OpenCLFastFourierTransformPlan()
Definition: MHO_OpenCLFastFourierTransformPlan.cc:11
Definition: MHO_ChannelLabeler.hh:17