Audacity 3.2.0
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
PffftAlignedCount Struct Reference

#include <PowerSpectrumGetter.h>

Public Member Functions

 PffftAlignedCount ()=default
 
 PffftAlignedCount (size_t nFloats)
 Construct from some number of floats, rounding up as needed. More...
 
 PffftAlignedCount (const PffftAlignedCount &)=default
 
PffftAlignedCountoperator= (const PffftAlignedCount &)=default
 
 operator size_t () const
 

Static Public Attributes

static constexpr size_t ByteAlignment = 64
 
static constexpr auto FloatAlignment = ByteAlignment / sizeof(float)
 

Private Attributes

size_t value {}
 

Detailed Description

An unsigned number of floats that can span two addresses that are well aligned for pffft

Definition at line 54 of file PowerSpectrumGetter.h.

Constructor & Destructor Documentation

◆ PffftAlignedCount() [1/3]

PffftAlignedCount::PffftAlignedCount ( )
default

◆ PffftAlignedCount() [2/3]

PffftAlignedCount::PffftAlignedCount ( size_t  nFloats)
inlineexplicit

Construct from some number of floats, rounding up as needed.

Definition at line 63 of file PowerSpectrumGetter.h.

64 : value{
65 ((nFloats + (FloatAlignment) - 1) / FloatAlignment) * FloatAlignment }
66 {}
static constexpr auto FloatAlignment

◆ PffftAlignedCount() [3/3]

PffftAlignedCount::PffftAlignedCount ( const PffftAlignedCount )
default

Member Function Documentation

◆ operator size_t()

PffftAlignedCount::operator size_t ( ) const
inline
Invariant
result: result % FloatAlignment == 0

Definition at line 72 of file PowerSpectrumGetter.h.

72{ return value; }

References value.

◆ operator=()

PffftAlignedCount & PffftAlignedCount::operator= ( const PffftAlignedCount )
default

Member Data Documentation

◆ ByteAlignment

constexpr size_t PffftAlignedCount::ByteAlignment = 64
staticconstexpr

Definition at line 57 of file PowerSpectrumGetter.h.

◆ FloatAlignment

constexpr auto PffftAlignedCount::FloatAlignment = ByteAlignment / sizeof(float)
staticconstexpr

Definition at line 58 of file PowerSpectrumGetter.h.

◆ value

size_t PffftAlignedCount::value {}
private

Definition at line 75 of file PowerSpectrumGetter.h.

Referenced by operator size_t().


The documentation for this struct was generated from the following file: