astrotypes  0.0
Public Types | Public Member Functions | List of all members
pss::astrotypes::StandardAllocator< LocalType > Class Template Reference

Minimal allocator. More...

#include <src/cpp/pss/astrotypes/multiarray/StandardAllocator.h>

Inheritance diagram for pss::astrotypes::StandardAllocator< LocalType >:
Inheritance graph

Public Types

using value_type = LocalType
 

Public Member Functions

 StandardAllocator () noexcept=default
 
template<typename OtherType >
 StandardAllocator (StandardAllocator< OtherType > const &) noexcept
 
value_typeallocate (std::size_t size)
 Allocate an area of contiguos memory. More...
 
void deallocate (value_type *pointer, std::size_t) noexcept
 Free a previously allocated memory area. More...
 

Detailed Description

template<typename LocalType>
class pss::astrotypes::StandardAllocator< LocalType >

Minimal allocator.

Definition at line 39 of file StandardAllocator.h.

Member Typedef Documentation

template<typename LocalType>
using pss::astrotypes::StandardAllocator< LocalType >::value_type = LocalType

Definition at line 42 of file StandardAllocator.h.

Constructor & Destructor Documentation

template<typename LocalType>
pss::astrotypes::StandardAllocator< LocalType >::StandardAllocator ( )
defaultnoexcept
template<typename LocalType>
template<typename OtherType >
pss::astrotypes::StandardAllocator< LocalType >::StandardAllocator ( StandardAllocator< OtherType > const &  )
inlinenoexcept

Definition at line 45 of file StandardAllocator.h.

Member Function Documentation

template<typename LocalType>
value_type* pss::astrotypes::StandardAllocator< LocalType >::allocate ( std::size_t  size)
inline

Allocate an area of contiguos memory.

Parameters
sizeNumber of elements that the allocated memory area should fit
Returns
Pointer to the allocated memory area

Definition at line 52 of file StandardAllocator.h.

template<typename LocalType>
void pss::astrotypes::StandardAllocator< LocalType >::deallocate ( value_type pointer,
std::size_t   
)
inlinenoexcept

Free a previously allocated memory area.

Parameters
pointerPointer to the memory area to deallocate
sizeNumber of elements that the allocated memory area should fit

Definition at line 61 of file StandardAllocator.h.