33 #ifndef DART_COMMON_DETAIL_ALIGNEDALLOCATOR_HPP_
34 #define DART_COMMON_DETAIL_ALIGNEDALLOCATOR_HPP_
38 #include "dart/config.hpp"
43 #if EIGEN_VERSION_AT_LEAST(3,2,1) && EIGEN_VERSION_AT_MOST(3,2,8)
52 class aligned_allocator_cpp11 :
public std::allocator<T>
55 typedef std::size_t size_type;
56 typedef std::ptrdiff_t difference_type;
58 typedef const T* const_pointer;
60 typedef const T& const_reference;
66 typedef aligned_allocator_cpp11<U> other;
69 aligned_allocator_cpp11()
70 :
std::allocator<T>() {}
72 aligned_allocator_cpp11(
const aligned_allocator_cpp11& other)
73 :
std::allocator<T>(other) {}
76 aligned_allocator_cpp11(
const aligned_allocator_cpp11<U>& other)
77 :
std::allocator<T>(other) {}
79 ~aligned_allocator_cpp11() {}
81 pointer allocate(size_type num,
const void* = 0)
83 Eigen::internal::check_size_for_overflow<T>(num);
84 return static_cast<pointer
>( Eigen::internal::aligned_malloc(num *
sizeof(T)) );
87 void deallocate(pointer p, size_type )
89 Eigen::internal::aligned_free(p);
Definition: BulletCollisionDetector.cpp:63
Definition: SharedLibraryManager.hpp:43