FTransformPlan.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2006 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9#ifndef __FTransformPlan_h_
10#define __FTransformPlan_h_
11
12#include "FTransform.h"
13
14namespace FTransform {
15
17 class Plan : public Reference::Able {
18 public:
19
20 Plan();
21 virtual ~Plan ();
22
24 virtual void frc1d (size_t nfft, float* into, const float* from) = 0;
25
27 virtual void bcr1d (size_t nfft, float* into, const float* from) = 0;
28
30 virtual void fcc1d (size_t nfft, float* into, const float* from) = 0;
31
33 virtual void bcc1d (size_t nfft, float* into, const float* from) = 0;
34
36 bool matches (size_t n, type t)
37 { return nfft == n && call == t; }
38
39 protected:
40
41 bool optimized;
42 type call;
43 size_t nfft;
44
45 };
46
48 class Plan2 : public Reference::Able {
49 public:
50
51 virtual ~Plan2 () { }
52
54 virtual void fcc2d (size_t x, size_t y, float* into, const float* from)= 0;
55
57 virtual void bcc2d (size_t x, size_t y, float* into, const float* from)= 0;
58
60 bool matches (size_t x, size_t y, type t)
61 { return nx == x && ny == y && call == t; }
62
63 protected:
64
65 bool optimized;
66 type call;
67 size_t nx;
68 size_t ny;
69
70 };
71
73 class NotImplemented : public Plan2 {
74
75 public:
76
77 NotImplemented (const char* name)
78 { throw Error (InvalidState, "FTransform::NotImplemented",
79 "two-dimensional FFT not implemented by %s", name); }
80
81 void fcc2d (size_t nx, size_t ny, float* dest, const float* src) {}
82 void bcc2d (size_t nx, size_t ny, float* dest, const float* src) {}
83
84 };
85
86}
87
88#endif
A convenient exception handling class.
Definition Error.h:54
void bcc2d(size_t nx, size_t ny, float *dest, const float *src)
Backward complex-to-complex FFT.
Definition FTransformPlan.h:82
void fcc2d(size_t nx, size_t ny, float *dest, const float *src)
Forward complex-to-complex FFT.
Definition FTransformPlan.h:81
Abstract base class of two-dimensional Fast Fourier Transforms.
Definition FTransformPlan.h:48
virtual void bcc2d(size_t x, size_t y, float *into, const float *from)=0
Backward complex-to-complex FFT.
bool matches(size_t x, size_t y, type t)
Return true if the plan matches the arguments.
Definition FTransformPlan.h:60
virtual void fcc2d(size_t x, size_t y, float *into, const float *from)=0
Forward complex-to-complex FFT.
virtual void bcr1d(size_t nfft, float *into, const float *from)=0
Backward complex-to-real FFT.
virtual void fcc1d(size_t nfft, float *into, const float *from)=0
Forward complex-to-complex FFT.
virtual void bcc1d(size_t nfft, float *into, const float *from)=0
Backward complex-to-complex FFT.
bool matches(size_t n, type t)
Return true if the plan matches the arguments.
Definition FTransformPlan.h:36
virtual void frc1d(size_t nfft, float *into, const float *from)=0
Forward real-to-complex FFT.
Manages Reference::To references to the instance.
Definition ReferenceAble.h:35
Defines a single interface to a variety of Fourier transform libraries.
Definition FFTW3_Transform.h:14
type
The FFT type.
Definition FTransform.h:74

Generated using doxygen 1.14.0