Go to the documentation of this file.00001 #ifndef vnl_fft_prime_factors_txx_
00002 #define vnl_fft_prime_factors_txx_
00003
00004
00005
00006 #include "vnl_fft_prime_factors.h"
00007 #include <vnl/algo/vnl_fft.h>
00008 #include <vcl_cassert.h>
00009
00010 template <class T>
00011 vnl_fft_prime_factors<T>::vnl_fft_prime_factors()
00012 : trigs_(0)
00013 , number_(0)
00014 {
00015 }
00016
00017 template <class T>
00018 void vnl_fft_prime_factors<T>::construct(int N)
00019 {
00020 assert(N>0);
00021 trigs_ = new T[2*N];
00022 number_ = N;
00023 vnl_fft_setgpfa (trigs_, number_, pqr_, &info_);
00024
00025 if (info_ == -1)
00026 assert(!"you probably gave a signal size not of the form 2^p 3^q 5^r");
00027 }
00028
00029 template <class T>
00030 void vnl_fft_prime_factors<T>::destruct()
00031 {
00032 if (trigs_)
00033 delete [] trigs_;
00034 }
00035
00036 #undef VNL_FFT_PRIME_FACTORS_INSTANTIATE
00037 #define VNL_FFT_PRIME_FACTORS_INSTANTIATE(T) \
00038 template struct vnl_fft_prime_factors<T >
00039
00040 #endif