Thas class represents an plan object that allows to calculate FFTs and IFFTs.
More...
#include <FFTPlan.h>
|
| FFTPlan (double measureTime=0) |
| Creates a new FFTPlan object with DEFAULT_N size (4096).
|
|
| FFTPlan (int n, double measureTime=0) |
| Creates a new FFTPlan object with a custom size.
|
|
int | getSize () |
| Retrieves the size of the FFT plan.
|
|
void | FFT (void *buffer) |
| Calculates the FFT of an input buffer with the current plan.
|
|
void | IFFT (void *buffer) |
| Calculates the IFFT of an input buffer with the current plan.
|
|
void * | getBuffer () |
| Reserves memory for a buffer that can be used for inplace transformations with this plan.
|
|
void | freeBuffer (void *buffer) |
| Frees one of the buffers reserved with the getRealOnlyBuffer(), getComplexOnlyBuffer() or getInplaceBuffer() method.
|
|
Thas class represents an plan object that allows to calculate FFTs and IFFTs.
◆ FFTPlan() [1/2]
FFTPlan::FFTPlan |
( |
double | measureTime = 0 | ) |
|
Creates a new FFTPlan object with DEFAULT_N size (4096).
- Parameters
-
measureTime | The aproximate amount of seconds that FFTW will spend searching for the optimal plan, which means faster FFTs and IFFTs while using this plan. If measureTime is negative, it will take all the time it needs. |
◆ FFTPlan() [2/2]
FFTPlan::FFTPlan |
( |
int | n, |
|
|
double | measureTime = 0 ) |
Creates a new FFTPlan object with a custom size.
- Parameters
-
n | The size of the FFT plan. Values that are a power of two are faster. The useful range usually is between 2048 and 8192, but bigger values can be useful in certain situations (when using the StreamBuffer class per example). Generally, low values use more CPU power and are a bit faster than large ones, there is also a huge decrease in efficiency when n is lower than 2048. |
measureTime | The aproximate amount of seconds that FFTW will spend searching for the optimal plan, which means faster FFTs while using this plan. If measureTime is negative, it will take all the time it needs. |
◆ FFT()
void FFTPlan::FFT |
( |
void * | buffer | ) |
|
Calculates the FFT of an input buffer with the current plan.
- Parameters
-
[in,out] | buffer | A buffer with the input data an in which the output data will be written. |
◆ freeBuffer()
void FFTPlan::freeBuffer |
( |
void * | buffer | ) |
|
Frees one of the buffers reserved with the getRealOnlyBuffer(), getComplexOnlyBuffer() or getInplaceBuffer() method.
- Parameters
-
buffer | A pointer to the buufer taht must be freed. |
◆ getBuffer()
void * FFTPlan::getBuffer |
( |
| ) |
|
Reserves memory for a buffer that can be used for inplace transformations with this plan.
- Returns
- A pointer to a buffer of size ((N/2)+1)*2*sizeof(fftwf_complex).
- Warning
- The returned buffer must be freed with the freeBuffer method of this class.
◆ getSize()
Retrieves the size of the FFT plan.
- Returns
- The size of the plan.
◆ IFFT()
void FFTPlan::IFFT |
( |
void * | buffer | ) |
|
Calculates the IFFT of an input buffer with the current plan.
- Parameters
-
[in,out] | buffer | A buffer with the input data an in which the output data will be written. |
The documentation for this class was generated from the following file: