NEURON
neuron::unified_allocator< T > Struct Template Reference

C++ allocator that uses [de]allocate_unified. More...

#include <memory.h>

Public Types

using value_type = T
 

Public Member Functions

 unified_allocator ()=default
 
template<typename U >
 unified_allocator (unified_allocator< U > const &) noexcept
 
value_typeallocate (std::size_t n)
 
void deallocate (value_type *p, std::size_t n) noexcept
 

Detailed Description

template<typename T>
struct neuron::unified_allocator< T >

C++ allocator that uses [de]allocate_unified.

Definition at line 53 of file memory.h.

Member Typedef Documentation

◆ value_type

template<typename T >
using neuron::unified_allocator< T >::value_type = T

Definition at line 54 of file memory.h.

Constructor & Destructor Documentation

◆ unified_allocator() [1/2]

template<typename T >
neuron::unified_allocator< T >::unified_allocator ( )
default

◆ unified_allocator() [2/2]

template<typename T >
template<typename U >
neuron::unified_allocator< T >::unified_allocator ( unified_allocator< U > const &  )
inlinenoexcept

Definition at line 59 of file memory.h.

Member Function Documentation

◆ allocate()

template<typename T >
value_type* neuron::unified_allocator< T >::allocate ( std::size_t  n)
inline

Definition at line 61 of file memory.h.

◆ deallocate()

template<typename T >
void neuron::unified_allocator< T >::deallocate ( value_type p,
std::size_t  n 
)
inlinenoexcept

Definition at line 65 of file memory.h.


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