|
dune-common 2.9.1
|
Loading...
Searching...
No Matches
Dune::AlignedAllocator< T, Alignment > Class Template Reference
Allocators which guarantee alignment of the memory. More...
#include <dune/common/alignedallocator.hh>
Inheritance diagram for Dune::AlignedAllocator< T, Alignment >:

Classes | |
| struct | rebind |
Public Types | |
| using | pointer = typename MallocAllocator< T >::pointer |
| using | size_type = typename MallocAllocator< T >::size_type |
| typedef std::ptrdiff_t | difference_type |
| typedef const T * | const_pointer |
| typedef T & | reference |
| typedef const T & | const_reference |
| typedef T | value_type |
Public Member Functions | |
| pointer | allocate (size_type n, const void *hint=0) |
| allocate n objects of type T | |
| pointer | address (reference x) const |
| const_pointer | address (const_reference x) const |
| void | deallocate (pointer p, size_type n) |
| deallocate n objects of type T at address p | |
| size_type | max_size () const noexcept |
| max size for allocate | |
| void | construct (pointer p, const T &val) |
| copy-construct an object of type T (i.e. make a placement new on p) | |
| template<typename ... Args> | |
| void | construct (pointer p, Args &&... args) |
| construct an object of type T from variadic parameters | |
| void | destroy (pointer p) |
| destroy an object of type T (i.e. call the destructor) | |
Static Public Attributes | |
| static constexpr int | alignment = fixAlignment(sizeof(void*)) |
Detailed Description
template<class T, int Alignment = -1>
class Dune::AlignedAllocator< T, Alignment >
class Dune::AlignedAllocator< T, Alignment >
Allocators which guarantee alignment of the memory.
- Template Parameters
-
T type of the object one wants to allocate Alignment explicitly specify the alignment, by default it is std::alignment_of<T>::value
Member Typedef Documentation
◆ const_pointer
template<class T >
|
inherited |
◆ const_reference
template<class T >
|
inherited |
◆ difference_type
template<class T >
|
inherited |
◆ pointer
template<class T , int Alignment = -1>
| using Dune::AlignedAllocator< T, Alignment >::pointer = typename MallocAllocator<T>::pointer |
◆ reference
template<class T >
|
inherited |
◆ size_type
template<class T , int Alignment = -1>
| using Dune::AlignedAllocator< T, Alignment >::size_type = typename MallocAllocator<T>::size_type |
◆ value_type
template<class T >
|
inherited |
Member Function Documentation
◆ address() [1/2]
template<class T >
|
inlineinherited |
◆ address() [2/2]
template<class T >
|
inlineinherited |
◆ allocate()
template<class T , int Alignment = -1>
|
inline |
allocate n objects of type T
◆ construct() [1/2]
template<class T >
template<typename ... Args>
|
inlineinherited |
construct an object of type T from variadic parameters
◆ construct() [2/2]
template<class T >
|
inlineinherited |
copy-construct an object of type T (i.e. make a placement new on p)
◆ deallocate()
template<class T >
|
inlineinherited |
deallocate n objects of type T at address p
◆ destroy()
template<class T >
|
inlineinherited |
destroy an object of type T (i.e. call the destructor)
◆ max_size()
template<class T >
|
inlinenoexceptinherited |
max size for allocate
Member Data Documentation
◆ alignment
template<class T , int Alignment = -1>
|
staticconstexpr |
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8