|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
#include <algorithm>#include <cmath>#include <complex>#include <vector>

Go to the source code of this file.
Classes | |
| struct | gsl_fft_real_wavetable |
| GSL-compatible interface for FFT routines. More... | |
| struct | gsl_fft_real_workspace |
| Workspace for real FFT routines. More... | |
| struct | gsl_fft_halfcomplex_wavetable |
| Halfcomplex FFT types for inverse transforms. More... | |
| struct | gsl_fft_halfcomplex_workspace |
| Workspace for halfcomplex FFT routines. More... | |
| struct | gsl_fft_complex_wavetable |
| Complex FFT types. More... | |
| struct | gsl_fft_complex_workspace |
| Workspace for complex FFT routines. More... | |
Namespaces | |
| namespace | FFT |
| Simple FFT implementation using Cooley-Tukey algorithm. | |
Functions | |
| void | FFT::fft_real_transform (double *data, size_t stride, size_t n) |
| Forward FFT for real data (packed output). | |
| gsl_fft_real_wavetable * | gsl_fft_real_wavetable_alloc (size_t n) |
| Allocate a real FFT wavetable of size \(n\). | |
| gsl_fft_real_workspace * | gsl_fft_real_workspace_alloc (size_t n) |
| Allocate a real FFT workspace of size \(n\). | |
| void | gsl_fft_real_transform (double *data, size_t stride, size_t n, gsl_fft_real_wavetable *, gsl_fft_real_workspace *) |
| Forward real FFT with GSL-compatible packed output. | |
| void | gsl_fft_real_wavetable_free (gsl_fft_real_wavetable *w) |
| Free a real FFT wavetable. | |
| void | gsl_fft_real_workspace_free (gsl_fft_real_workspace *w) |
| Free a real FFT workspace. | |
| gsl_fft_halfcomplex_wavetable * | gsl_fft_halfcomplex_wavetable_alloc (size_t n) |
| Allocate a halfcomplex FFT wavetable of size \(n\). | |
| gsl_fft_halfcomplex_workspace * | gsl_fft_halfcomplex_workspace_alloc (size_t n) |
| Allocate a halfcomplex FFT workspace of size \(n\). | |
| void | gsl_fft_halfcomplex_transform (double *data, size_t stride, size_t n, gsl_fft_halfcomplex_wavetable *, gsl_fft_halfcomplex_workspace *) |
| Inverse transform from halfcomplex packed data. | |
| void | gsl_fft_halfcomplex_wavetable_free (gsl_fft_halfcomplex_wavetable *w) |
| Free a halfcomplex FFT wavetable. | |
| void | gsl_fft_halfcomplex_workspace_free (gsl_fft_halfcomplex_workspace *w) |
| Free a halfcomplex FFT workspace. | |
| void | gsl_fft_halfcomplex_inverse (double *data, size_t stride, size_t n, gsl_fft_halfcomplex_wavetable *wavetable, gsl_fft_halfcomplex_workspace *workspace) |
| Alias for halfcomplex inverse transform. | |
| void | gsl_fft_halfcomplex_inverse (double *data, size_t stride, size_t n, gsl_fft_halfcomplex_wavetable *, gsl_fft_real_workspace *) |
| Allow real workspace to be used with halfcomplex (compat helper). | |
| gsl_fft_complex_wavetable * | gsl_fft_complex_wavetable_alloc (size_t n) |
| Allocate a complex FFT wavetable of size \(n\). | |
| gsl_fft_complex_workspace * | gsl_fft_complex_workspace_alloc (size_t n) |
| Allocate a complex FFT workspace of size \(n\). | |
| void | gsl_fft_complex_forward (double *data, size_t stride, size_t n, gsl_fft_complex_wavetable *, gsl_fft_complex_workspace *) |
| Forward complex FFT. | |
| void | gsl_fft_complex_inverse (double *data, size_t stride, size_t n, gsl_fft_complex_wavetable *, gsl_fft_complex_workspace *) |
| Inverse complex FFT (GSL scaling: multiplies by \(n\)). | |
| void | gsl_fft_complex_wavetable_free (gsl_fft_complex_wavetable *w) |
| Free a complex FFT wavetable. | |
| void | gsl_fft_complex_workspace_free (gsl_fft_complex_workspace *w) |
| Free a complex FFT workspace. | |
| void | gsl_fft_complex_radix2_forward (double *data, size_t stride, size_t n) |
| Radix-2 forward complex FFT (allocates temporary wavetable/workspace). | |
| void | gsl_fft_complex_radix2_inverse (double *data, size_t stride, size_t n) |
| Radix-2 inverse complex FFT (GSL scaling, allocates temporaries). | |
| struct gsl_fft_real_wavetable |
GSL-compatible interface for FFT routines.

| Class Members | ||
|---|---|---|
| size_t | n | |
| struct gsl_fft_real_workspace |
Workspace for real FFT routines.

| Class Members | ||
|---|---|---|
| size_t | n | |
| vector< double > | work | |
| struct gsl_fft_halfcomplex_wavetable |
Halfcomplex FFT types for inverse transforms.

| Class Members | ||
|---|---|---|
| size_t | n | |
| struct gsl_fft_halfcomplex_workspace |
Workspace for halfcomplex FFT routines.

| Class Members | ||
|---|---|---|
| size_t | n | |
| vector< double > | work | |
| struct gsl_fft_complex_wavetable |
| struct gsl_fft_complex_workspace |
Workspace for complex FFT routines.

| Class Members | ||
|---|---|---|
| size_t | n | |
| vector< complex< double > > | work | |
|
inline |
Forward complex FFT.
Input/output layout is interleaved: \([Re_0, Im_0, Re_1, Im_1, ...]\).
| data | Input/Output: interleaved complex data overwritten with spectrum. |
| stride | Input: complex element stride. |
| n | Input: number of complex samples. |
| wavetable | Input: wavetable (unused). |
| workspace | Input: workspace (unused). |
Definition at line 306 of file GSLFFT.h.
Referenced by gsl_fft_complex_radix2_forward(), TEST_F(), and TEST_F().
|
inline |
Inverse complex FFT (GSL scaling: multiplies by \(n\)).
Input/output layout is interleaved: \([Re_0, Im_0, Re_1, Im_1, ...]\).
| data | Input/Output: interleaved complex spectrum overwritten with signal. |
| stride | Input: complex element stride. |
| n | Input: number of complex samples. |
| wavetable | Input: wavetable (unused). |
| workspace | Input: workspace (unused). |
Definition at line 327 of file GSLFFT.h.
Referenced by gsl_fft_complex_radix2_inverse(), TEST_F(), and TEST_F().
|
inline |
Radix-2 forward complex FFT (allocates temporary wavetable/workspace).
| data | Input/Output: interleaved complex data overwritten with spectrum. |
| stride | Input: complex element stride. |
| n | Input: number of complex samples. |
Definition at line 356 of file GSLFFT.h.
References gsl_fft_complex_forward(), gsl_fft_complex_wavetable_alloc(), gsl_fft_complex_wavetable_free(), gsl_fft_complex_workspace_alloc(), and gsl_fft_complex_workspace_free().
Referenced by TEST_F().

|
inline |
Radix-2 inverse complex FFT (GSL scaling, allocates temporaries).
| data | Input/Output: interleaved complex spectrum overwritten with signal. |
| stride | Input: complex element stride. |
| n | Input: number of complex samples. |
Definition at line 368 of file GSLFFT.h.
References gsl_fft_complex_inverse(), gsl_fft_complex_wavetable_alloc(), gsl_fft_complex_wavetable_free(), gsl_fft_complex_workspace_alloc(), and gsl_fft_complex_workspace_free().
Referenced by TEST_F().

|
inline |
Allocate a complex FFT wavetable of size \(n\).
| n | Input: transform size. |
Definition at line 283 of file GSLFFT.h.
References gsl_fft_complex_wavetable::n.
Referenced by gsl_fft_complex_radix2_forward(), gsl_fft_complex_radix2_inverse(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Free a complex FFT wavetable.
| w | Input: wavetable to release (can be null). |
Definition at line 346 of file GSLFFT.h.
Referenced by gsl_fft_complex_radix2_forward(), gsl_fft_complex_radix2_inverse(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Allocate a complex FFT workspace of size \(n\).
| n | Input: transform size. |
Definition at line 292 of file GSLFFT.h.
References gsl_fft_complex_workspace::n, and gsl_fft_complex_workspace::work.
Referenced by gsl_fft_complex_radix2_forward(), gsl_fft_complex_radix2_inverse(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Free a complex FFT workspace.
| w | Input: workspace to release (can be null). |
Definition at line 350 of file GSLFFT.h.
Referenced by gsl_fft_complex_radix2_forward(), gsl_fft_complex_radix2_inverse(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Allow real workspace to be used with halfcomplex (compat helper).
| data | Input/Output: packed spectrum overwritten with real sequence. |
| stride | Input: element stride in data. |
| n | Input: number of samples. |
| wavetable | Input: wavetable (unused). |
| workspace | Input: workspace (unused). |
Definition at line 257 of file GSLFFT.h.
References gsl_fft_halfcomplex_transform(), gsl_fft_halfcomplex_wavetable_alloc(), gsl_fft_halfcomplex_wavetable_free(), gsl_fft_halfcomplex_workspace_alloc(), and gsl_fft_halfcomplex_workspace_free().

|
inline |
Alias for halfcomplex inverse transform.
| data | Input/Output: packed spectrum overwritten with real sequence. |
| stride | Input: element stride in data. |
| n | Input: number of samples. |
| wavetable | Input: wavetable (unused). |
| workspace | Input: workspace (unused). |
Definition at line 245 of file GSLFFT.h.
References gsl_fft_halfcomplex_transform().
Referenced by FixedFFTLowPassFilter::apply(), RelativeFFTLowPassFilter::apply(), FixedFFTLowPassFilter::calc_derivative(), RelativeFFTLowPassFilter::calc_derivative(), and convlv().

|
inline |
Inverse transform from halfcomplex packed data.
| data | Input/Output: packed spectrum overwritten with real sequence. |
| stride | Input: element stride in data. |
| n | Input: number of samples. |
| wavetable | Input: wavetable (unused). |
| workspace | Input: workspace (unused). |
Definition at line 203 of file GSLFFT.h.
Referenced by gsl_fft_halfcomplex_inverse(), and gsl_fft_halfcomplex_inverse().
|
inline |
Allocate a halfcomplex FFT wavetable of size \(n\).
| n | Input: transform size. |
Definition at line 181 of file GSLFFT.h.
References gsl_fft_halfcomplex_wavetable::n.
Referenced by FixedFFTLowPassFilter::apply(), RelativeFFTLowPassFilter::apply(), FixedFFTLowPassFilter::calc_derivative(), RelativeFFTLowPassFilter::calc_derivative(), convlv(), and gsl_fft_halfcomplex_inverse().
|
inline |
Free a halfcomplex FFT wavetable.
| w | Input: wavetable to release (can be null). |
Definition at line 233 of file GSLFFT.h.
Referenced by FixedFFTLowPassFilter::apply(), RelativeFFTLowPassFilter::apply(), FixedFFTLowPassFilter::calc_derivative(), RelativeFFTLowPassFilter::calc_derivative(), convlv(), and gsl_fft_halfcomplex_inverse().
|
inline |
Allocate a halfcomplex FFT workspace of size \(n\).
| n | Input: transform size. |
Definition at line 190 of file GSLFFT.h.
References gsl_fft_halfcomplex_workspace::n, and gsl_fft_halfcomplex_workspace::work.
Referenced by gsl_fft_halfcomplex_inverse().
|
inline |
Free a halfcomplex FFT workspace.
| w | Input: workspace to release (can be null). |
Definition at line 237 of file GSLFFT.h.
Referenced by gsl_fft_halfcomplex_inverse().
|
inline |
Forward real FFT with GSL-compatible packed output.
| data | Input/Output: real input sequence overwritten with packed spectrum. |
| stride | Input: element stride in data. |
| n | Input: number of samples. |
| wavetable | Input: wavetable (unused). |
| workspace | Input: workspace (unused). |
Definition at line 151 of file GSLFFT.h.
References FFT::fft_real_transform().
Referenced by FixedFFTLowPassFilter::apply(), RelativeFFTLowPassFilter::apply(), FixedFFTLowPassFilter::calc_derivative(), RelativeFFTLowPassFilter::calc_derivative(), convlv(), and TEST_F().

|
inline |
Allocate a real FFT wavetable of size \(n\).
| n | Input: transform size. |
Definition at line 129 of file GSLFFT.h.
References gsl_fft_real_wavetable::n.
Referenced by FixedFFTLowPassFilter::apply(), RelativeFFTLowPassFilter::apply(), FixedFFTLowPassFilter::calc_derivative(), RelativeFFTLowPassFilter::calc_derivative(), convlv(), and TEST_F().
|
inline |
Free a real FFT wavetable.
| w | Input: wavetable to release (can be null). |
Definition at line 159 of file GSLFFT.h.
Referenced by FixedFFTLowPassFilter::apply(), RelativeFFTLowPassFilter::apply(), FixedFFTLowPassFilter::calc_derivative(), RelativeFFTLowPassFilter::calc_derivative(), convlv(), and TEST_F().
|
inline |
Allocate a real FFT workspace of size \(n\).
| n | Input: transform size. |
Definition at line 138 of file GSLFFT.h.
References gsl_fft_real_workspace::n, and gsl_fft_real_workspace::work.
Referenced by FixedFFTLowPassFilter::apply(), RelativeFFTLowPassFilter::apply(), FixedFFTLowPassFilter::calc_derivative(), RelativeFFTLowPassFilter::calc_derivative(), convlv(), and TEST_F().
|
inline |
Free a real FFT workspace.
| w | Input: workspace to release (can be null). |
Definition at line 163 of file GSLFFT.h.
Referenced by FixedFFTLowPassFilter::apply(), RelativeFFTLowPassFilter::apply(), FixedFFTLowPassFilter::calc_derivative(), RelativeFFTLowPassFilter::calc_derivative(), convlv(), and TEST_F().