|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Stateless allocator for standard containers that allocates with posix_memalign() at N-byte alignment (default 16). More...
#include <AlignmentAllocator.hh>
Classes | |
| struct | rebind |
| Gives the same allocator for element type T2 (as other). More... | |
Public Types | |
| typedef T | value_type |
| Element type T. | |
| typedef std::size_t | size_type |
| Size type (std::size_t). | |
| typedef std::ptrdiff_t | difference_type |
| Pointer difference type (std::ptrdiff_t). | |
| typedef T * | pointer |
| Pointer to T. | |
| typedef const T * | const_pointer |
| Pointer to const T. | |
| typedef T & | reference |
| Reference to T. | |
| typedef const T & | const_reference |
| Reference to const T. | |
Public Member Functions | |
| AlignmentAllocator () throw () | |
| Does nothing; empty body. | |
| template<typename T2 > | |
| AlignmentAllocator (const AlignmentAllocator< T2, N > &) throw () | |
| Converting constructor from an allocator of another element type; does nothing. | |
| ~AlignmentAllocator () throw () | |
| Does nothing; empty body. | |
| pointer | address (reference r) |
| Return the address of r. | |
| const_pointer | address (const_reference r) const |
| Return the address of the const element r. | |
| pointer | allocate (size_type n) |
| Return n elements of storage aligned to N bytes from posix_memalign(), or nullptr if it fails. | |
| void | deallocate (pointer p, size_type) |
| Free p with free(); the size argument is not used. | |
| void | construct (pointer p, const value_type &wert) |
| Copy-construct wert in place at p. | |
| void | destroy (pointer p) |
| Call the destructor of the element at p. | |
| size_type | max_size () const throw () |
| Return the largest size_type value divided by the element size. | |
| bool | operator!= (const AlignmentAllocator< T, N > &other) const |
| Return the negation of operator==, which is always true, so this always returns false. | |
| bool | operator== (const AlignmentAllocator< T, N > &other) const |
| Always returns true, since the allocator holds no state (per the code comment). | |
Stateless allocator for standard containers that allocates with posix_memalign() at N-byte alignment (default 16).
| typedef const T* Pds::AlignmentAllocator< T, N >::const_pointer |
Pointer to const T.
| typedef const T& Pds::AlignmentAllocator< T, N >::const_reference |
Reference to const T.
| typedef std::ptrdiff_t Pds::AlignmentAllocator< T, N >::difference_type |
Pointer difference type (std::ptrdiff_t).
| typedef T* Pds::AlignmentAllocator< T, N >::pointer |
Pointer to T.
| typedef T& Pds::AlignmentAllocator< T, N >::reference |
Reference to T.
| typedef std::size_t Pds::AlignmentAllocator< T, N >::size_type |
Size type (std::size_t).
| typedef T Pds::AlignmentAllocator< T, N >::value_type |
Element type T.
|
inline | |||||||||||||
Does nothing; empty body.
|
inline | ||||||||||||||
Converting constructor from an allocator of another element type; does nothing.
|
inline | |||||||||||||
Does nothing; empty body.
|
inline |
Return the address of the const element r.
|
inline |
Return the address of r.
|
inline |
Return n elements of storage aligned to N bytes from posix_memalign(), or nullptr if it fails.
|
inline |
Copy-construct wert in place at p.
|
inline |
Free p with free(); the size argument is not used.
|
inline |
Call the destructor of the element at p.
|
inline | |||||||||||||
Return the largest size_type value divided by the element size.
|
inline |
Return the negation of operator==, which is always true, so this always returns false.
|
inline |
Always returns true, since the allocator holds no state (per the code comment).