Audacity 3.2.0
Classes | Public Member Functions | List of all members
PffftAllocator< T > Struct Template Reference

Aligned memory is required by pffft, so this defines an allocator. More...

#include <PowerSpectrumGetter.h>

Inheritance diagram for PffftAllocator< T >:
[legend]
Collaboration diagram for PffftAllocator< T >:
[legend]

Classes

struct  rebind
 

Public Member Functions

 PffftAllocator ()
 
 PffftAllocator (const PffftAllocator &)
 
template<typename U >
 PffftAllocator (const PffftAllocator< U > &)
 
T * allocate (std::size_t n, const void *)
 
T * allocate (std::size_t n)
 
void deallocate (T *p, std::size_t n)
 

Additional Inherited Members

- Static Protected Member Functions inherited from PffftAllocatorBase
static void * Pffft_aligned_malloc (size_t nb_bytes)
 
static void Pffft_aligned_free (void *)
 

Detailed Description

template<typename T>
struct PffftAllocator< T >

Aligned memory is required by pffft, so this defines an allocator.

Definition at line 33 of file PowerSpectrumGetter.h.

Constructor & Destructor Documentation

◆ PffftAllocator() [1/3]

template<typename T >
PffftAllocator< T >::PffftAllocator ( )
inline

Definition at line 36 of file PowerSpectrumGetter.h.

36{}

◆ PffftAllocator() [2/3]

template<typename T >
PffftAllocator< T >::PffftAllocator ( const PffftAllocator< T > &  )
inline

Definition at line 37 of file PowerSpectrumGetter.h.

37{}

◆ PffftAllocator() [3/3]

template<typename T >
template<typename U >
PffftAllocator< T >::PffftAllocator ( const PffftAllocator< U > &  )
inline

Definition at line 38 of file PowerSpectrumGetter.h.

38{}

Member Function Documentation

◆ allocate() [1/2]

template<typename T >
T * PffftAllocator< T >::allocate ( std::size_t  n)
inline

Definition at line 44 of file PowerSpectrumGetter.h.

44 {
45 return static_cast<T*>(Pffft_aligned_malloc(n * sizeof(T)));
46 }
static void * Pffft_aligned_malloc(size_t nb_bytes)

References PffftAllocatorBase::Pffft_aligned_malloc().

Here is the call graph for this function:

◆ allocate() [2/2]

template<typename T >
T * PffftAllocator< T >::allocate ( std::size_t  n,
const void *   
)
inline

Definition at line 41 of file PowerSpectrumGetter.h.

41 {
42 return allocate(n);
43 }
T * allocate(std::size_t n, const void *)

References PffftAllocator< T >::allocate().

Referenced by PffftAllocator< T >::allocate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deallocate()

template<typename T >
void PffftAllocator< T >::deallocate ( T *  p,
std::size_t  n 
)
inline

Definition at line 47 of file PowerSpectrumGetter.h.

47 {
48 if (p) Pffft_aligned_free(p);
49 }
static void Pffft_aligned_free(void *)

References PffftAllocatorBase::Pffft_aligned_free().

Here is the call graph for this function:

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