Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Fft.cuh
1 #ifndef SKA_CHEETAH_FFT_CUDA_FFT_H
2 #define SKA_CHEETAH_FFT_CUDA_FFT_H
3 
4 #include "cheetah/fft/FftType.h"
5 #include "cheetah/fft/cuda/FftPlan.cuh"
6 #include "cheetah/fft/cuda/Config.h"
7 #include "cheetah/fft/Config.h"
8 #include "cheetah/data/FrequencySeries.h"
9 #include "cheetah/data/TimeSeries.h"
10 #include "cheetah/data/ComplexTypeTraits.h"
11 #include "cheetah/utils/AlgorithmBase.h"
12 
13 #include "panda/arch/nvidia/DeviceCapability.h"
14 
15 namespace ska {
16 namespace cheetah {
17 namespace fft {
18 namespace cuda {
19 
41 class Fft: utils::AlgorithmBase<Config, fft::Config>
42 {
43  public:
44  typedef cheetah::Cuda Architecture;
45  typedef panda::nvidia::DeviceCapability<2,0, panda::nvidia::giga/2> ArchitectureCapability;
46  typedef panda::PoolResource<Architecture> ResourceType;
47 
48  public:
54  Fft(fft::Config const& algo_config);
55  Fft(Fft const&) = delete;
56  Fft(Fft&&) = default;
57 
77  template <typename T, typename InputAlloc, typename OutputAlloc>
78  void process(ResourceType& gpu,
80  data::FrequencySeries<cheetah::Cuda, typename data::ComplexTypeTraits<cheetah::Cuda,T>::type, OutputAlloc>& output);
81 
101  template <typename T, typename InputAlloc, typename OutputAlloc>
102  void process(ResourceType& gpu,
103  data::FrequencySeries<cheetah::Cuda,typename data::ComplexTypeTraits<cheetah::Cuda,T>::type,InputAlloc> const& input,
105 
125  template <typename T, typename InputAlloc, typename OutputAlloc>
126  void process(ResourceType& gpu,
127  data::TimeSeries<cheetah::Cuda, thrust::complex<T>, InputAlloc> const& input,
128  data::FrequencySeries<cheetah::Cuda,typename data::ComplexTypeTraits<cheetah::Cuda,T>::type,OutputAlloc>& output);
129 
149  template <typename T, typename InputAlloc, typename OutputAlloc>
150  void process(ResourceType& gpu,
151  data::FrequencySeries<cheetah::Cuda, thrust::complex<T>, InputAlloc> const& input,
152  data::TimeSeries<cheetah::Cuda,typename data::ComplexTypeTraits<cheetah::Cuda,T>::type,OutputAlloc>& output);
153 
154  private:
155  FftPlan _plan;
156 };
157 
158 } // namespace cuda
159 } // namespace fft
160 } // namespace cheetah
161 } // namespace ska
162 
163 #include "cheetah/fft/cuda/detail/Fft.cu"
164 
165 #endif // SKA_CHEETAH_FFT_CUDA_FFT_H
Configuration for the fft module.
Definition: Config.h:42
A cuda-specific implementation of the fft module.
Definition: Fft.cuh:41
void process(ResourceType &gpu, data::TimeSeries< cheetah::Cuda, T, InputAlloc > const &input, data::FrequencySeries< cheetah::Cuda, typename data::ComplexTypeTraits< cheetah::Cuda, T >::type, OutputAlloc > &output)
Perform a real-to-complex 1D FFT.
Definition: Fft.cu:81
A helper class to determine the type of complex data for different architectures. ...
A container of Fourier series data.
Fft(fft::Config const &algo_config)
Construct and Fft instance.
Definition: Fft.cu:8
Some limits and constants for FLDO.
Definition: Brdz.h:35
Class for time series data.
Definition: TimeSeries.h:47