MRPT  1.9.9
mrpt::aligned_allocator_cpp11< T, AligmentBytes > Class Template Reference

Detailed Description

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
class mrpt::aligned_allocator_cpp11< T, AligmentBytes >

Aligned allocator that is compatible with C++11.

Default alignment can be 16 (default), 32 (if AVX is defined) or 64 (if AVX2 is defined). See also: https://bitbucket.org/eigen/eigen/commits/f5b7700

Definition at line 38 of file aligned_allocator.h.

#include <mrpt/core/aligned_allocator.h>

Inheritance diagram for mrpt::aligned_allocator_cpp11< T, AligmentBytes >:
Inheritance graph

Classes

struct  rebind
 

Public Types

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

Public Member Functions

 aligned_allocator_cpp11 ()
 
 aligned_allocator_cpp11 (const aligned_allocator_cpp11 &other)
 
template<class U >
 aligned_allocator_cpp11 (const aligned_allocator_cpp11< U > &other)
 
 ~aligned_allocator_cpp11 ()
 
pointer allocate (size_type num, const void *=nullptr)
 
void deallocate (pointer p, size_type)
 

Public Attributes

elements
 STL member. More...
 

Member Typedef Documentation

◆ const_pointer

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
using mrpt::aligned_allocator_cpp11< T, AligmentBytes >::const_pointer = const T*

Definition at line 44 of file aligned_allocator.h.

◆ const_reference

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
using mrpt::aligned_allocator_cpp11< T, AligmentBytes >::const_reference = const T&

Definition at line 46 of file aligned_allocator.h.

◆ difference_type

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
using mrpt::aligned_allocator_cpp11< T, AligmentBytes >::difference_type = std::ptrdiff_t

Definition at line 42 of file aligned_allocator.h.

◆ pointer

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
using mrpt::aligned_allocator_cpp11< T, AligmentBytes >::pointer = T*

Definition at line 43 of file aligned_allocator.h.

◆ reference

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
using mrpt::aligned_allocator_cpp11< T, AligmentBytes >::reference = T&

Definition at line 45 of file aligned_allocator.h.

◆ size_type

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
using mrpt::aligned_allocator_cpp11< T, AligmentBytes >::size_type = std::size_t

Definition at line 41 of file aligned_allocator.h.

◆ value_type

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
using mrpt::aligned_allocator_cpp11< T, AligmentBytes >::value_type = T

Definition at line 47 of file aligned_allocator.h.

Constructor & Destructor Documentation

◆ aligned_allocator_cpp11() [1/3]

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
mrpt::aligned_allocator_cpp11< T, AligmentBytes >::aligned_allocator_cpp11 ( )
inline

Definition at line 55 of file aligned_allocator.h.

◆ aligned_allocator_cpp11() [2/3]

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
mrpt::aligned_allocator_cpp11< T, AligmentBytes >::aligned_allocator_cpp11 ( const aligned_allocator_cpp11< T, AligmentBytes > &  other)
inline

Definition at line 56 of file aligned_allocator.h.

◆ aligned_allocator_cpp11() [3/3]

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
template<class U >
mrpt::aligned_allocator_cpp11< T, AligmentBytes >::aligned_allocator_cpp11 ( const aligned_allocator_cpp11< U > &  other)
inline

Definition at line 61 of file aligned_allocator.h.

◆ ~aligned_allocator_cpp11()

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
mrpt::aligned_allocator_cpp11< T, AligmentBytes >::~aligned_allocator_cpp11 ( )
inline

Definition at line 65 of file aligned_allocator.h.

Member Function Documentation

◆ allocate()

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
pointer mrpt::aligned_allocator_cpp11< T, AligmentBytes >::allocate ( size_type  num,
const void = nullptr 
)
inline

Definition at line 66 of file aligned_allocator.h.

References mrpt::aligned_malloc().

◆ deallocate()

template<class T, size_t AligmentBytes = MRPT_MAX_ALIGN_BYTES>
void mrpt::aligned_allocator_cpp11< T, AligmentBytes >::deallocate ( pointer  p,
size_type   
)
inline

Definition at line 71 of file aligned_allocator.h.

References mrpt::aligned_free().

Member Data Documentation

◆ elements

T std::allocator< T >::elements
inherited

STL member.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020