CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
CNORXZ::Allocator< T > Class Template Reference

#include <allocator.h>

Classes

struct  VX
 

Public Types

typedef T value_type
 

Public Member Functions

 Allocator ()=default
 
template<typename U >
 Allocator (const Allocator< U > &x)
 
Tallocate (SizeT n)
 
void deallocate (T *p, SizeT n)
 

Static Public Attributes

static constexpr SizeT type_size = sizeof(T)
 
static constexpr SizeT N = MAX_VSIZE
 

Detailed Description

template<typename T>
class CNORXZ::Allocator< T >

Allocator implementation Takes care of proper alignment

Definition at line 34 of file allocator.h.

Member Typedef Documentation

◆ value_type

template<typename T >
typedef T CNORXZ::Allocator< T >::value_type

Definition at line 38 of file allocator.h.

Constructor & Destructor Documentation

◆ Allocator() [1/2]

template<typename T >
CNORXZ::Allocator< T >::Allocator ( )
default

default constructor

◆ Allocator() [2/2]

template<typename T >
template<typename U >
CNORXZ::Allocator< T >::Allocator ( const Allocator< U > & x)
inline

(copy) construct from allocator for different data type

Template Parameters
Uinput data type
Parameters
xinput allocator

Definition at line 60 of file allocator.h.

Member Function Documentation

◆ allocate()

template<typename T >
T * CNORXZ::Allocator< T >::allocate ( SizeT n)

allocate n element of type T

Parameters
nnumber of elements

Definition at line 22 of file allocator.cc.h.

◆ deallocate()

template<typename T >
void CNORXZ::Allocator< T >::deallocate ( T * p,
SizeT n )

deallocate n elements

Parameters
ppointer to first element
nnumber of elements

Definition at line 34 of file allocator.cc.h.

Member Data Documentation

◆ N

template<typename T >
constexpr SizeT CNORXZ::Allocator< T >::N = MAX_VSIZE
staticconstexpr

< type size

Definition at line 41 of file allocator.h.

◆ type_size

template<typename T >
constexpr SizeT CNORXZ::Allocator< T >::type_size = sizeof(T)
staticconstexpr

Definition at line 40 of file allocator.h.


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