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

A read-only pointer to an aligned range of floats. More...

#include <PowerSpectrumGetter.h>

Public Member Functions

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

Private Member Functions

 PffftConstFloats (const float *p)
 

Private Attributes

friend PffftFloatVector
 
const float * p {}
 

Friends

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

Detailed Description

A read-only pointer to an aligned range of floats.

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

Definition at line 142 of file PowerSpectrumGetter.h.

Constructor & Destructor Documentation

◆ PffftConstFloats() [1/4]

PffftConstFloats::PffftConstFloats ( )
default

◆ PffftConstFloats() [2/4]

PffftConstFloats::PffftConstFloats ( const PffftConstFloats )
default

◆ PffftConstFloats() [3/4]

PffftConstFloats::PffftConstFloats ( PffftFloats  p)
inline

Definition at line 146 of file PowerSpectrumGetter.h.

146: PffftConstFloats{ p.get() } {}
A read-only pointer to an aligned range of floats.

◆ PffftConstFloats() [4/4]

PffftConstFloats::PffftConstFloats ( const float *  p)
inlineexplicitprivate

Definition at line 170 of file PowerSpectrumGetter.h.

170: p{ p } {}

Member Function Documentation

◆ get()

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

Definition at line 151 of file PowerSpectrumGetter.h.

151{ return p; }

References p.

◆ operator bool()

PffftConstFloats::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 167 of file PowerSpectrumGetter.h.

167{ return p != nullptr; }

References p.

◆ operator+=()

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

Definition at line 153 of file PowerSpectrumGetter.h.

153 {
154 p += c; return *this;
155 }

References p.

◆ operator=()

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

Friends And Related Function Documentation

◆ operator+ [1/2]

PffftConstFloats operator+ ( PffftAlignedCount  c,
PffftConstFloats  p 
)
friend

Definition at line 161 of file PowerSpectrumGetter.h.

162 {
163 PffftConstFloats result(p);
164 return result += c;
165 }

◆ operator+ [2/2]

PffftConstFloats operator+ ( PffftConstFloats  p,
PffftAlignedCount  c 
)
friend

Definition at line 156 of file PowerSpectrumGetter.h.

157 {
158 PffftConstFloats result(p);
159 return result += c;
160 }

Member Data Documentation

◆ p

const float* PffftConstFloats::p {}
private

Definition at line 172 of file PowerSpectrumGetter.h.

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

◆ PffftFloatVector

friend PffftConstFloats::PffftFloatVector
private

Definition at line 171 of file PowerSpectrumGetter.h.


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