AlignedAllocator class.
More...
#include <AlignedAllocator.h>
|
struct | rebind |
| Equivalent allocator for other types Class whose member other is an alias of allocator for type U. More...
|
|
|
using | value_type = T |
| value type
|
|
using | pointer = T * |
| pointer type
|
|
using | const_pointer = const T * |
| const pointer type
|
|
using | reference = T & |
| reference type
|
|
using | const_reference = const T & |
| const reference type
|
|
using | size_type = size_t |
| size type
|
|
|
| AlignedAllocator ()=default |
| Default empty constructor.
|
|
template<class U > |
| AlignedAllocator (const AlignedAllocator< U, Alignment > &) |
| Copy constructor.
|
|
| ~AlignedAllocator ()=default |
| Default destructor.
|
|
size_t | max_size () const noexcept |
| Returns maximum possible value of n, with which we can call allocate(n)
|
|
T * | allocate (std::size_t n) |
| Allocate aligned memory for n objects of type T.
|
|
void | deallocate (T *ptr, std::size_t) |
| Deallocate memory pointed to by ptr.
|
|
template<class U , class... Args> |
void | construct (U *p, Args &&...args) |
| Construct object of type U at already allocated memory, pointed to by p.
|
|
template<class U > |
void | destroy (U *p) |
| Destroy object pointed to by p, but does not deallocate the memory.
|
|
template<class T, size_t Alignment = DEFAULT_CACHE_LINE_SIZE>
class autopas::AlignedAllocator< T, Alignment >
AlignedAllocator class.
- Template Parameters
-
◆ allocate()
template<class T , size_t Alignment = DEFAULT_CACHE_LINE_SIZE>
Allocate aligned memory for n objects of type T.
- Parameters
-
- Returns
- Pointer to the allocated memory
◆ construct()
template<class T , size_t Alignment = DEFAULT_CACHE_LINE_SIZE>
template<class U , class... Args>
Construct object of type U at already allocated memory, pointed to by p.
- Parameters
-
p | pointer to the object |
args | arguments for the construction |
◆ deallocate()
template<class T , size_t Alignment = DEFAULT_CACHE_LINE_SIZE>
Deallocate memory pointed to by ptr.
- Parameters
-
◆ destroy()
template<class T , size_t Alignment = DEFAULT_CACHE_LINE_SIZE>
template<class U >
Destroy object pointed to by p, but does not deallocate the memory.
- Parameters
-
p | pointer to the object that should be destroyed |
◆ max_size()
template<class T , size_t Alignment = DEFAULT_CACHE_LINE_SIZE>
Returns maximum possible value of n, with which we can call allocate(n)
- Returns
- maximum size possible to allocate
The documentation for this class was generated from the following file: