|
sparrow 1.4.0
C++20 idiomatic APIs for the Apache Arrow Columnar Format
|
Allocator for aligned memory. More...
#include <xsimd_aligned_allocator.hpp>
Classes | |
| struct | rebind |
Public Types | |
| using | value_type = T |
| using | pointer = T* |
| using | const_pointer = const T* |
| using | reference = T& |
| using | const_reference = const T& |
| using | size_type = size_t |
| using | difference_type = ptrdiff_t |
Public Member Functions | |
| XSIMD_INLINE | aligned_allocator () noexcept |
| Default constructor. | |
| XSIMD_INLINE | aligned_allocator (const aligned_allocator &rhs) noexcept |
| Copy constructor. | |
| template<class U> | |
| XSIMD_INLINE | aligned_allocator (const aligned_allocator< U, Align > &rhs) noexcept |
| XSIMD_INLINE | ~aligned_allocator () |
| Destructor. | |
| XSIMD_INLINE pointer | address (reference) noexcept |
Returns the actual address of r even in presence of overloaded operator&. | |
| XSIMD_INLINE const_pointer | address (const_reference) const noexcept |
Returns the actual address of r even in presence of overloaded operator&. | |
| XSIMD_INLINE pointer | allocate (size_type n, const void *hint=0) |
Allocates n * sizeof(T) bytes of uninitialized memory, aligned by A. | |
| XSIMD_INLINE void | deallocate (pointer p, size_type n) |
| Deallocates the storage referenced by the pointer p, which must be a pointer obtained by an earlier call to allocate(). | |
| XSIMD_INLINE size_type | max_size () const noexcept |
Returns the maximum theoretically possible value of n, for which the call allocate(n, 0) could succeed. | |
| XSIMD_INLINE size_type | size_max () const noexcept |
| This method is deprecated, use max_size() instead. | |
| template<class U, class... Args> | |
| XSIMD_INLINE void | construct (U *p, Args &&... args) |
Constructs an object of type T in allocated uninitialized memory pointed to by p, using placement-new. | |
| template<class U> | |
| XSIMD_INLINE void | destroy (U *p) |
Calls the destructor of the object pointed to by p. | |
| template<class U> | |
| XSIMD_INLINE | aligned_allocator (const aligned_allocator< U, A > &) noexcept |
| Extended copy constructor. | |
Static Public Attributes | |
| static constexpr size_t | alignment = Align |
Allocator for aligned memory.
The aligned_allocator class template is an allocator that performs memory allocation aligned by the specified value.
| T | type of objects to allocate. |
| Align | alignment in bytes. |
Definition at line 49 of file xsimd_aligned_allocator.hpp.
| using xsimd::aligned_allocator< T, Align >::const_pointer = const T* |
Definition at line 54 of file xsimd_aligned_allocator.hpp.
| using xsimd::aligned_allocator< T, Align >::const_reference = const T& |
Definition at line 56 of file xsimd_aligned_allocator.hpp.
| using xsimd::aligned_allocator< T, Align >::difference_type = ptrdiff_t |
Definition at line 58 of file xsimd_aligned_allocator.hpp.
| using xsimd::aligned_allocator< T, Align >::pointer = T* |
Definition at line 53 of file xsimd_aligned_allocator.hpp.
| using xsimd::aligned_allocator< T, Align >::reference = T& |
Definition at line 55 of file xsimd_aligned_allocator.hpp.
| using xsimd::aligned_allocator< T, Align >::size_type = size_t |
Definition at line 57 of file xsimd_aligned_allocator.hpp.
| using xsimd::aligned_allocator< T, Align >::value_type = T |
Definition at line 52 of file xsimd_aligned_allocator.hpp.
|
noexcept |
Default constructor.
Definition at line 114 of file xsimd_aligned_allocator.hpp.
|
noexcept |
Copy constructor.
Definition at line 122 of file xsimd_aligned_allocator.hpp.
|
noexcept |
| XSIMD_INLINE xsimd::aligned_allocator< T, A >::~aligned_allocator | ( | ) |
Destructor.
Definition at line 139 of file xsimd_aligned_allocator.hpp.
|
noexcept |
Extended copy constructor.
Definition at line 131 of file xsimd_aligned_allocator.hpp.
|
noexcept |
Returns the actual address of r even in presence of overloaded operator&.
| r | the object to acquire address of. |
r. Definition at line 162 of file xsimd_aligned_allocator.hpp.
|
noexcept |
Returns the actual address of r even in presence of overloaded operator&.
| r | the object to acquire address of. |
r. Definition at line 150 of file xsimd_aligned_allocator.hpp.
| XSIMD_INLINE auto xsimd::aligned_allocator< T, A >::allocate | ( | size_type | n, |
| const void * | hint = 0 ) |
Allocates n * sizeof(T) bytes of uninitialized memory, aligned by A.
The alignment may require some extra memory allocation.
| n | the number of objects to allocate storage for. |
| hint | unused parameter provided for standard compliance. |
n objects of type T. Definition at line 177 of file xsimd_aligned_allocator.hpp.
| XSIMD_INLINE void xsimd::aligned_allocator< T, A >::construct | ( | U * | p, |
| Args &&... | args ) |
Constructs an object of type T in allocated uninitialized memory pointed to by p, using placement-new.
| p | pointer to allocated uninitialized memory. |
| args | the constructor arguments to use. |
Definition at line 230 of file xsimd_aligned_allocator.hpp.
| XSIMD_INLINE void xsimd::aligned_allocator< T, A >::deallocate | ( | pointer | p, |
| size_type | n ) |
Deallocates the storage referenced by the pointer p, which must be a pointer obtained by an earlier call to allocate().
The argument n must be equal to the first argument of the call to allocate() that originally produced p; otherwise, the behavior is undefined.
| p | pointer obtained from allocate(). |
| n | number of objects earlier passed to allocate(). |
Definition at line 195 of file xsimd_aligned_allocator.hpp.
| XSIMD_INLINE void xsimd::aligned_allocator< T, A >::destroy | ( | U * | p | ) |
Calls the destructor of the object pointed to by p.
| p | pointer to the object that is going to be destroyed. |
Definition at line 241 of file xsimd_aligned_allocator.hpp.
|
noexcept |
Returns the maximum theoretically possible value of n, for which the call allocate(n, 0) could succeed.
Definition at line 207 of file xsimd_aligned_allocator.hpp.
|
noexcept |
This method is deprecated, use max_size() instead.
Definition at line 217 of file xsimd_aligned_allocator.hpp.
|
staticconstexpr |
Definition at line 60 of file xsimd_aligned_allocator.hpp.