|
EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
|
Simple RAII wrapper for commonly used C types from FFTW(f). More...
#include <FFTWBuffers.hpp>
Public Member Functions | |
| FFTWBuffers (std::size_t size, const std::optional< std::span< const float > > &inplace_input) | |
| Setup contextual buffers for FFTW. | |
| ~FFTWBuffers () noexcept | |
| Deallocate the buffers. | |
Public Attributes | |
| fftwf_complex_fwd *const | coefficients |
| Complex coefficients (output of real-to-complex FFT). | |
| float * | input |
| Real-valued inputs, either managed by us or aliased by the user. | |
| std::size_t | input_size |
| Size of the input vector. | |
Private Types | |
| using | fftwf_complex_fwd = float[2] |
Private Attributes | |
| bool | is_input_managed |
| Are we responsible for the input buffer? | |
Simple RAII wrapper for commonly used C types from FFTW(f).
This interface is intentionally "raw" (e.g. direct access to member variables) since it's often used in hot loops. We want to make it as easy as possible for the optimiser.
Definition at line 26 of file FFTWBuffers.hpp.
|
private |
Definition at line 28 of file FFTWBuffers.hpp.
|
explicit |
Setup contextual buffers for FFTW.
| size | The number of samples in the input data. |
| inplace_input | The array to which the input should be aliased; if not provided, FFTW allocates a real-valued array in the size of the given sample count. |
| std::runtime_error | One or more buffers could not be allocated. |
Definition at line 21 of file FFTWBuffers.cpp.
|
noexcept |
Deallocate the buffers.
Definition at line 48 of file FFTWBuffers.cpp.
| fftwf_complex_fwd* const echomap::FFTWBuffers::coefficients |
Complex coefficients (output of real-to-complex FFT).
Definition at line 31 of file FFTWBuffers.hpp.
| float* echomap::FFTWBuffers::input |
Real-valued inputs, either managed by us or aliased by the user.
Definition at line 32 of file FFTWBuffers.hpp.
| std::size_t echomap::FFTWBuffers::input_size |
Size of the input vector.
Definition at line 33 of file FFTWBuffers.hpp.
|
private |
Are we responsible for the input buffer?
Definition at line 58 of file FFTWBuffers.hpp.