Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Namespaces | Macros | Functions
aligned_allocator.h File Reference
#include <type_traits>
#include <memory>
Include dependency graph for aligned_allocator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mrpt::aligned_allocator_cpp11< T, AligmentBytes >
 Aligned allocator that is compatible with C++11. More...
 
struct  mrpt::aligned_allocator_cpp11< T, AligmentBytes >::rebind< U >
 

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 

Macros

#define MRPT_MAX_ALIGN_BYTES   16
 
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
 Put this macro inside any class with members that require {16,32,64}-byte memory alignment (e.g. More...
 

Functions

voidmrpt::aligned_malloc (size_t size, size_t alignment)
 
voidmrpt::aligned_realloc (void *ptr, size_t size, size_t alignment)
 
void mrpt::aligned_free (void *ptr)
 
voidmrpt::aligned_calloc (size_t bytes, size_t alignment)
 Identical to aligned_malloc, but it zeroes the reserved memory block. More...
 
template<typename T , class... Args>
std::shared_ptr< T > mrpt::make_aligned_shared (Args &&... args)
 Creates a shared_ptr with aligned memory via aligned_allocator_cpp11<>. More...
 

Macro Definition Documentation

◆ MRPT_MAKE_ALIGNED_OPERATOR_NEW

#define MRPT_MAKE_ALIGNED_OPERATOR_NEW

Put this macro inside any class with members that require {16,32,64}-byte memory alignment (e.g.

Eigen matrices), to override default new()/delete(). Obviously, this macro is only required if the class is to be instantiated in dynamic memory.

Definition at line 90 of file aligned_allocator.h.

◆ MRPT_MAX_ALIGN_BYTES

#define MRPT_MAX_ALIGN_BYTES   16

Definition at line 21 of file aligned_allocator.h.




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST