Audacity 3.2.0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
PffftFloats Struct Reference

A pointer to an aligned range of floats. More...

#include <PowerSpectrumGetter.h>

Public Member Functions

 PffftFloats ()=default
 
 PffftFloats (const PffftFloats &)=default
 
PffftFloatsoperator= (const PffftFloats &)=default
 
float * get () const noexcept
 
PffftFloats operator+= (PffftAlignedCount c)
 
 operator bool () const noexcept
 

Private Member Functions

 PffftFloats (float *p)
 

Private Attributes

friend PffftFloatVector
 
float * p {}
 

Friends

PffftFloats operator+ (PffftFloats p, PffftAlignedCount c)
 
PffftFloats operator+ (PffftAlignedCount c, PffftFloats p)
 

Detailed Description

A pointer to an aligned range of floats.

It can be constructed only defaulted to null or else returned by PffftFloatVector::aligned It restricts pointer arithmetic to addition of well-aligned increments

Definition at line 104 of file PowerSpectrumGetter.h.

Constructor & Destructor Documentation

◆ PffftFloats() [1/3]

PffftFloats::PffftFloats ( )
default

◆ PffftFloats() [2/3]

PffftFloats::PffftFloats ( const PffftFloats )
default

◆ PffftFloats() [3/3]

PffftFloats::PffftFloats ( float *  p)
inlineexplicitprivate

Definition at line 131 of file PowerSpectrumGetter.h.

131: p{ p } {}

Member Function Documentation

◆ get()

float * PffftFloats::get ( ) const
inlinenoexcept
Invariant
result is well aligned for pffft

Definition at line 112 of file PowerSpectrumGetter.h.

112{ return p; }

References p.

Referenced by PowerSpectrumGetter::operator()().

Here is the caller graph for this function:

◆ operator bool()

PffftFloats::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 128 of file PowerSpectrumGetter.h.

128{ return p != nullptr; }

References p.

◆ operator+=()

PffftFloats PffftFloats::operator+= ( PffftAlignedCount  c)
inline

Definition at line 114 of file PowerSpectrumGetter.h.

114 {
115 p += c; return *this;
116 }

References p.

◆ operator=()

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

Friends And Related Function Documentation

◆ operator+ [1/2]

PffftFloats operator+ ( PffftAlignedCount  c,
PffftFloats  p 
)
friend

Definition at line 122 of file PowerSpectrumGetter.h.

123 {
124 PffftFloats result(p);
125 return result += c;
126 }
A pointer to an aligned range of floats.

◆ operator+ [2/2]

PffftFloats operator+ ( PffftFloats  p,
PffftAlignedCount  c 
)
friend

Definition at line 117 of file PowerSpectrumGetter.h.

118 {
119 PffftFloats result(p);
120 return result += c;
121 }

Member Data Documentation

◆ p

float* PffftFloats::p {}
private

Definition at line 133 of file PowerSpectrumGetter.h.

Referenced by get(), operator bool(), and operator+=().

◆ PffftFloatVector

friend PffftFloats::PffftFloatVector
private

Definition at line 132 of file PowerSpectrumGetter.h.


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