PandaRoot
PndFTSInternal::Allocator< T, PndFTSFullyCacheLineAligned > Class Template Reference

#include <PndFTSArray.h>

Public Types

typedef CacheLineSizeHelper< T > T2
 

Static Public Member Functions

static T2Alloc (int s)
 
static void Free (T2 *const p, int size)
 

Detailed Description

template<typename T>
class PndFTSInternal::Allocator< T, PndFTSFullyCacheLineAligned >

Definition at line 223 of file PndFTSArray.h.

Member Typedef Documentation

◆ T2

Definition at line 225 of file PndFTSArray.h.

Member Function Documentation

◆ Alloc()

template<typename T >
static T2* PndFTSInternal::Allocator< T, PndFTSFullyCacheLineAligned >::Alloc ( int  s)
inlinestatic

Definition at line 240 of file PndFTSArray.h.

241  {
242  T2 *p;
243  posix_memalign(&p, 128, s * sizeof(T2));
244  return new (p) T2[s];
245  }

◆ Free()

template<typename T >
static void PndFTSInternal::Allocator< T, PndFTSFullyCacheLineAligned >::Free ( T2 *const  p,
int  size 
)
inlinestatic

Definition at line 246 of file PndFTSArray.h.

References i.

247  {
248  for (int i = 0; i < size; ++i) {
249  p[i].~T2();
250  }
251  std::free(p);
252  }
unsigned int i
Definition: P4_F32vec4.h:33

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