vnl_fft_prime_factors.hxx
Go to the documentation of this file.
1 #ifndef vnl_fft_prime_factors_hxx_
2 #define vnl_fft_prime_factors_hxx_
3 /*
4  fsm
5 */
7 #include <vnl/algo/vnl_fft.h>
8 #include <cassert>
9 #ifdef _MSC_VER
10 # include <vcl_msvc_warnings.h>
11 #endif
12 
13 template <class T>
15  : trigs_(nullptr)
16  , number_(0)
17 {
18 }
19 
20 template <class T>
22 {
23  assert(N>0);
24  trigs_ = new T[2*N];
25  number_ = N;
26  vnl_fft_setgpfa (trigs_, number_, pqr_, &info_);
27  // info_ == -1 if cannot split into primes
28  if (info_ == -1)
29  assert(!"you probably gave a signal size not of the form 2^p 3^q 5^r");
30 }
31 
32 template <class T>
34 {
35  if (trigs_)
36  delete [] trigs_;
37 }
38 
39 #undef VNL_FFT_PRIME_FACTORS_INSTANTIATE
40 #define VNL_FFT_PRIME_FACTORS_INSTANTIATE(T) \
41 template struct VNL_ALGO_EXPORT vnl_fft_prime_factors<T >
42 
43 #endif
void vnl_fft_setgpfa(float *triggs, long size, long pqr[3], long *info)
use C++ overloading to find the correct FORTRAN routine from templated FFT code.
Definition: vnl_fft.cxx:8
Holds prime factor information.