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

#include <PndFTSArray.h>

Static Public Member Functions

static T * Alloc (int s)
 
static void Free (T *const p, int size)
 

Detailed Description

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

Definition at line 244 of file PndFTSArray.h.

Member Function Documentation

◆ Alloc()

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

Definition at line 260 of file PndFTSArray.h.

261  {
262  T *p;
263  posix_memalign(&p, 128, s * sizeof(T));
264  return new (p) T[s];
265  }

◆ Free()

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

Definition at line 266 of file PndFTSArray.h.

References i.

267  {
268  for (int i = 0; i < size; ++i) {
269  p[i].~T();
270  }
271  std::free(p);
272  }
unsigned int i
Definition: P4_F32vec4.h:21

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