core
vnl
algo
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
*/
6
#include "
vnl_fft_prime_factors.h
"
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>
14
vnl_fft_prime_factors<T>::vnl_fft_prime_factors
()
15
: trigs_(nullptr)
16
, number_(0)
17
{
18
}
19
20
template
<
class
T>
21
void
vnl_fft_prime_factors<T>::construct
(
int
N)
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>
33
void
vnl_fft_prime_factors<T>::destruct
()
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
vnl_fft_prime_factors::vnl_fft_prime_factors
vnl_fft_prime_factors()
Definition:
vnl_fft_prime_factors.hxx:14
vnl_fft.h
vnl_fft_prime_factors::destruct
void destruct()
Definition:
vnl_fft_prime_factors.hxx:33
vnl_fft_setgpfa
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
vnl_fft_prime_factors.h
Holds prime factor information.
vnl_fft_prime_factors::construct
void construct(int N)
Definition:
vnl_fft_prime_factors.hxx:21
Generated by
1.8.15