21 void operator ()(PFFFT_Setup *p){
if (p) Pffft_destroy_setup(p); }
23 void Pffft_destroy_setup(PFFFT_Setup *);
28 static void *Pffft_aligned_malloc(
size_t nb_bytes);
29 static void Pffft_aligned_free(
void *);
72 operator size_t()
const {
return value; }
78template<
typename Integral>
81 std::is_unsigned_v<Integral> &&
sizeof(Integral) <=
sizeof(
size_t),
87template<
typename Integral>
90 std::is_unsigned_v<Integral> &&
sizeof(Integral) <=
sizeof(
size_t),
112 float *
get() const noexcept {
return p; }
115 p += c;
return *
this;
128 explicit operator bool() const noexcept {
return p !=
nullptr; }
151 const float *
get() const noexcept {
return p; }
154 p += c;
return *
this;
167 explicit operator bool() const noexcept {
return p !=
nullptr; }
185 using std::vector<float, PffftAllocator<float>>::vector;
194 {
return aligned(rowSize * nRow); }
199 {
return aligned(rowSize * nRow); }
std::unique_ptr< PFFFT_Setup, PffftSetupDeleter > PffftSetupHolder
auto operator*(PffftAlignedCount x, Integral y) -> std::enable_if_t< std::is_unsigned_v< Integral > &&sizeof(Integral)<=sizeof(size_t), PffftAlignedCount >
Much faster that FFT.h's PowerSpectrum, at least in Short-Time Fourier Transform-like situations,...
PffftAlignedCount(size_t nFloats)
Construct from some number of floats, rounding up as needed.
PffftAlignedCount()=default
static constexpr size_t ByteAlignment
PffftAlignedCount(const PffftAlignedCount &)=default
PffftAlignedCount & operator=(const PffftAlignedCount &)=default
static constexpr auto FloatAlignment
static void Pffft_aligned_free(void *)
static void * Pffft_aligned_malloc(size_t nb_bytes)
Aligned memory is required by pffft, so this defines an allocator.
void deallocate(T *p, std::size_t n)
PffftAllocator(const PffftAllocator< U > &)
PffftAllocator(const PffftAllocator &)
T * allocate(std::size_t n)
T * allocate(std::size_t n, const void *)
A read-only pointer to an aligned range of floats.
PffftConstFloats(PffftFloats p)
friend PffftConstFloats operator+(PffftConstFloats p, PffftAlignedCount c)
PffftConstFloats operator+=(PffftAlignedCount c)
PffftConstFloats()=default
PffftConstFloats(const PffftConstFloats &)=default
PffftConstFloats & operator=(const PffftConstFloats &)=default
PffftConstFloats(const float *p)
const float * get() const noexcept
A vector of floats guaranteeing alignment as demanded by pffft.
PffftConstFloats aligned(PffftAlignedCount rowSize, size_t nRow) const
PffftFloats aligned(PffftAlignedCount rowSize, size_t nRow)
A pointer to an aligned range of floats.
PffftFloats(const PffftFloats &)=default
PffftFloats operator+=(PffftAlignedCount c)
friend PffftFloats operator+(PffftFloats p, PffftAlignedCount c)
PffftFloats & operator=(const PffftFloats &)=default
float * get() const noexcept