FairRoot/PandaRoot
Static Public Member Functions | List of all members
PndCAInternal::Allocator< T, alignment > Class Template Reference

#include <PndCAArray.h>

Static Public Member Functions

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

Detailed Description

template<typename T, int alignment>
class PndCAInternal::Allocator< T, alignment >

Definition at line 151 of file PndCAArray.h.

Member Function Documentation

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

Definition at line 163 of file PndCAArray.h.

References p, and T.

Referenced by PndCAResizableArray< T, Dim, alignment >::PndCAResizableArray().

163 { T *p; posix_memalign( &p, alignment, s * sizeof( T ) ); return new( p ) T[s]; }
TLorentzVector s
Definition: Pnd2DStar.C:50
Double_t p
Definition: anasim.C:58
TTree * T
Definition: anaLmdReco.C:32
template<typename T , int alignment>
static void PndCAInternal::Allocator< T, alignment >::Free ( T *const  p,
int  size 
)
inlinestatic

Definition at line 164 of file PndCAArray.h.

References i.

Referenced by PndCAResizableArray< T, Dim, alignment >::Resize(), and PndCAResizableArray< T, Dim, alignment >::~PndCAResizableArray().

164  {
165  for ( int i = 0; i < size; ++i ) {
166  p[i].~T();
167  }
168  std::free( p );
169  }
Int_t i
Definition: run_full.C:25
Double_t p
Definition: anasim.C:58

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