vSMC
vSMC: Scalable Monte Carlo
|
Aligned allocator. More...
#include <vsmc/utility/aligned_memory.hpp>
Classes | |
class | rebind |
Public Types | |
using | const_pointer = const T * |
using | const_reference = typename std::add_lvalue_reference< const T >::type |
using | difference_type = std::ptrdiff_t |
using | is_always_equal = std::true_type |
using | pointer = T * |
using | reference = typename std::add_lvalue_reference< T >::type |
using | size_type = std::size_t |
using | value_type = T |
Public Member Functions | |
AlignedAllocator ()=default | |
AlignedAllocator (const AlignedAllocator< T, Alignment, Memory > &)=default | |
template<typename U > | |
AlignedAllocator (const AlignedAllocator< U, Alignment, Memory > &other) | |
Static Public Member Functions | |
static pointer | allocate (size_type n, const void *=nullptr) |
static void | deallocate (pointer ptr, size_type) |
Aligned allocator.
T | The value type |
Alignment | The alignment requirement of memory, must be a power of two and no less than sizeof(void *) . |
Memory | The memory management class. Must provides two static member functions, aligned_malloc and aligned_free . The member function aligned_malloc shall behave similar to std::malloc but take an additional arguments for alignment. The member function aligned_free shall behave just like std::free . |
Definition at line 253 of file aligned_memory.hpp.
using vsmc::AlignedAllocator< T, Alignment, Memory >::const_pointer = const T * |
Definition at line 267 of file aligned_memory.hpp.
using vsmc::AlignedAllocator< T, Alignment, Memory >::const_reference = typename std::add_lvalue_reference<const T>::type |
Definition at line 269 of file aligned_memory.hpp.
using vsmc::AlignedAllocator< T, Alignment, Memory >::difference_type = std::ptrdiff_t |
Definition at line 265 of file aligned_memory.hpp.
using vsmc::AlignedAllocator< T, Alignment, Memory >::is_always_equal = std::true_type |
Definition at line 270 of file aligned_memory.hpp.
using vsmc::AlignedAllocator< T, Alignment, Memory >::pointer = T * |
Definition at line 266 of file aligned_memory.hpp.
using vsmc::AlignedAllocator< T, Alignment, Memory >::reference = typename std::add_lvalue_reference<T>::type |
Definition at line 268 of file aligned_memory.hpp.
using vsmc::AlignedAllocator< T, Alignment, Memory >::size_type = std::size_t |
Definition at line 264 of file aligned_memory.hpp.
using vsmc::AlignedAllocator< T, Alignment, Memory >::value_type = T |
Definition at line 263 of file aligned_memory.hpp.
|
default |
|
default |
|
inline |
Definition at line 284 of file aligned_memory.hpp.
|
inlinestatic |
Definition at line 289 of file aligned_memory.hpp.
|
inlinestatic |
Definition at line 298 of file aligned_memory.hpp.