Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
FftPlan.cuh
1 #ifndef SKA_CHEETAH_FFT_FFTPLAN_H
2 #define SKA_CHEETAH_FFT_FFTPLAN_H
3 
4 #include "cheetah/fft/FftType.h"
5 #include "cheetah/utils/Architectures.h"
6 #include "cheetah/cuda_utils/cuda_cufft.h"
7 #include "cheetah/cuda_utils/cuda_errorhandling.h"
8 
9 namespace ska {
10 namespace cheetah {
11 namespace fft {
12 namespace cuda {
13 
17 class FftPlan
18 {
19  public:
23  FftPlan();
24 
28  ~FftPlan();
29 
46  template <typename T>
47  cufftHandle const& plan(FftType fft_type, std::size_t size, std::size_t batch);
48 
49  private:
53  bool valid(cufftType cufft_type, std::size_t size, std::size_t batch) const;
54 
58  void destroy_plan();
59 
63  template <typename T>
64  cufftType convert_to_cufft_type(FftType fft_type) const;
65 
66  private:
67  cufftHandle _plan;
68  cufftType _cufft_type;
69  std::size_t _size;
70  std::size_t _batch;
71 };
72 
73 } // namespace cuda
74 } // namespace fft
75 } // namespace cheetah
76 } // namespace ska
77 
78 #include "cheetah/fft/cuda/detail/FftPlan.cu"
79 
80 #endif // SKA_CHEETAH_FFT_FFTPLAN_H
~FftPlan()
Destroys the undetlying cufft plan if allocated.
Definition: FftPlan.cu:22
cufftHandle const & plan(FftType fft_type, std::size_t size, std::size_t batch)
Get (or create) a cufft plan.
Definition: FftPlan.cu:9
FftPlan()
Construct an uninitialised cufft plan.
Definition: FftPlan.cu:14
Some limits and constants for FLDO.
Definition: Brdz.h:35