Loading [MathJax]/extensions/TeX/AMSmath.js
Radium Engine  1.5.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Ra::Core::AlignedAllocator< T, Alignment > Class Template Reference

#include <Core/Containers/AlignedAllocator.hpp>

+ Collaboration diagram for Ra::Core::AlignedAllocator< T, Alignment >:

Public Types

using pointer = T *
 
using const_pointer = const T *
 
using reference = T &
 
using const_reference = const T &
 
using value_type = T
 
using size_type = std::size_t
 
using difference_type = ptrdiff_t
 

Public Member Functions

T * address (T &r) const
 
const T * address (const T &s) const
 
std::size_t max_size () const
 
bool operator!= (const AlignedAllocator &other) const
 
void construct (T *const p, const T &t) const
 
void destroy (T *const p) const
 
bool operator== (const AlignedAllocator &) const
 
 AlignedAllocator (const AlignedAllocator &)
 
template<typename U >
 AlignedAllocator (const AlignedAllocator< U, Alignment > &)
 
T * allocate (const std::size_t n) const
 
void deallocate (T *const p, const std::size_t) const
 
template<typename U >
T * allocate (const std::size_t n, const U *) const
 

Detailed Description

template<typename T, std::size_t Alignment>
class Ra::Core::AlignedAllocator< T, Alignment >

Allocator for aligned data. Adapted from https://gist.github.com/donny-dont/1471329 Modified from the Mallocator from Stephan T. Lavavej. http://blogs.msdn.com/b/vcblog/archive/2008/08/28/the-mallocator.aspx July 2021: use aligned_alloc (c++11) instead of platform-dependant mm_malloc

Definition at line 24 of file AlignedAllocator.hpp.


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