Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
fft.hpp File Reference
#include <pulp/signal/checked_allocation.hpp>
#include <pulp/signal/rt_work_counter.hpp>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <memory>
#include <numbers>
#include <type_traits>
#include <vector>
#include <Accelerate/Accelerate.h>
#include <pulp/signal/overlap_add_convolver.hpp>

Go to the source code of this file.

Classes

class  pulp::signal::FftT< SampleType >
struct  pulp::signal::detail::FftRealSplit
 The packed split-complex form of a real transform, for Pulp's own frequency-domain stages (the overlap-add ConvolverT). More...

Namespaces

namespace  pulp
namespace  pulp::signal
namespace  pulp::signal::detail
 Round-2 effect-wave vocabulary.

Macros

#define PULP_FFT_HAS_VDSP   1
#define PULP_FFT_USE_MUFFT   0

Typedefs

using pulp::signal::Fft = FftT<float>
using pulp::signal::Fft64 = FftT<double>

Functions

constexpr bool pulp::signal::detail::is_power_of_two (int value) noexcept
constexpr std::size_t pulp::signal::detail::fft_twiddle_index (int phase_index, int stride) noexcept
template<typename SampleType>
bool pulp::signal::checked_fft_platform_setup_bytes (std::uint64_t fft_size, std::uint64_t target_max_bytes, std::uint64_t &bytes) noexcept
template<typename SampleType>
constexpr bool pulp::signal::detail::fft_real_split_needs_scratch (std::uint64_t fft_size) noexcept
 Whether a FftT of fft_size points keeps a real_bins()-long complex scratch for the split-spectrum path (FftRealSplit): every size the portable real transform serves, which is all of them except vDSP's float sizes.
template<typename SampleType>
bool pulp::signal::checked_fft_retained_bytes (std::uint64_t fft_size, std::uint64_t target_max_bytes, std::uint64_t &bytes) noexcept
 Complete retained-storage contract for one prepared FftT.
template<typename SampleType>
void pulp::signal::detail::multiply_packed_split (const SampleType *a_re, const SampleType *a_im, const SampleType *b_re, const SampleType *b_im, SampleType *out_re, SampleType *out_im, int half) noexcept
 Product of two packed split spectra of half = size() / 2 slots each (see FftRealSplit): bin k of out is bin k of a times bin k of b for k = 1..half-1, and slot 0's DC and Nyquist reals multiply separately.
template<typename SampleType>
void pulp::signal::detail::multiply_accumulate_packed_split (const SampleType *a_re, const SampleType *a_im, const SampleType *b_re, const SampleType *b_im, SampleType *acc_re, SampleType *acc_im, int half) noexcept
 acc += a * b over packed split spectra, with the product as in multiply_packed_split().

Variables

constexpr std::uint64_t pulp::signal::kVdspFftSetupChargeBytesPerPoint = 64
 Conservative policy charge for Accelerate's opaque float FFT setup.
constexpr std::uint64_t pulp::signal::kVdspSplitPaddingFloats = 84
 Floats a float FftT's vDSP split buffer holds beyond its two N-point halves: up to 15 to reach a 64-byte boundary, a 4-float (16-byte) step off it, and a 64-float (256-byte) gap between the halves, which is how their placement is pinned (see FftT).

Macro Definition Documentation

◆ PULP_FFT_HAS_VDSP

#define PULP_FFT_HAS_VDSP   1

◆ PULP_FFT_USE_MUFFT

#define PULP_FFT_USE_MUFFT   0