isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
FFTPlanBase.h
1 #pragma once
2 
3 #include <memory>
4 #include <thrust/complex.h>
5 #include <type_traits>
6 
7 #include "CufftWrapper.h"
8 
9 namespace isce3 { namespace cuda { namespace fft { namespace detail {
10 
11 template<int Sign, typename T>
12 class FFTPlanBase {
13 public:
14 
15  static_assert( Sign == CUFFT_FORWARD || Sign == CUFFT_INVERSE, "" );
16  static_assert( std::is_same<T, float>::value || std::is_same<T, double>::value, "" );
17 
18  FFTPlanBase();
19 
21  thrust::complex<T> * in,
22  int n,
23  int batch = 1);
24 
25  template<int Rank>
27  thrust::complex<T> * in,
28  const int (&n)[Rank],
29  int batch = 1);
30 
31  FFTPlanBase(thrust::complex<T> * out,
32  thrust::complex<T> * in,
33  int n,
34  int nembed,
35  int stride,
36  int dist,
37  int batch = 1);
38 
39  template<int Rank>
40  FFTPlanBase(thrust::complex<T> * out,
41  thrust::complex<T> * in,
42  const int (&n)[Rank],
43  const int (&nembed)[Rank],
44  int stride,
45  int dist,
46  int batch = 1);
47 
48  FFTPlanBase(thrust::complex<T> * out,
49  thrust::complex<T> * in,
50  int n,
51  int inembed,
52  int istride,
53  int idist,
54  int onembed,
55  int ostride,
56  int odist,
57  int batch = 1);
58 
59  template<int Rank>
60  FFTPlanBase(thrust::complex<T> * out,
61  thrust::complex<T> * in,
62  const int (&n)[Rank],
63  const int (&inembed)[Rank],
64  int istride,
65  int idist,
66  const int (&onembed)[Rank],
67  int ostride,
68  int odist,
69  int batch = 1);
70 
71  explicit operator bool() const { return *_plan; }
72 
73  void execute() const;
74 
75 protected:
76 
77  template<typename U, typename V>
78  FFTPlanBase(U * out,
79  V * in,
80  const int * n,
81  const int * inembed,
82  int istride,
83  int idist,
84  const int * onembed,
85  int ostride,
86  int odist,
87  int batch,
88  int rank,
89  cufftType type);
90 
91  void * _out;
92  void * _in;
93  cufftType _type;
94  std::shared_ptr<cufftHandle> _plan;
95 };
96 
97 }}}}
98 
99 #define ISCE_CUDA_FFT_DETAIL_FFTPLANBASE_ICC
100 #include "FFTPlanBase.icc"
101 #undef ISCE_CUDA_FFT_DETAIL_FFTPLANBASE_ICC
Definition: FFTPlanBase.h:12

Generated for ISCE3.0 by doxygen 1.8.5.