riccaticpp
|
#include <memory.hpp>
Public Types | |
using | value_type = T |
Public Member Functions | |
RICCATI_NO_INLINE | arena_allocator (ArenaType *alloc, bool owns_alloc=false) |
RICCATI_NO_INLINE | arena_allocator () |
RICCATI_NO_INLINE | arena_allocator (const arena_allocator &rhs) |
template<typename U , typename UArena > | |
RICCATI_NO_INLINE | arena_allocator (const arena_allocator< U, UArena > &rhs) |
~arena_allocator () | |
template<typename T_ = T> | |
RICCATI_ALWAYS_INLINE T_ * | allocate (std::size_t n) |
RICCATI_ALWAYS_INLINE void | recover_memory () noexcept |
void | deallocate (T *, std::size_t) noexcept |
constexpr bool | operator== (const arena_allocator &) const noexcept |
constexpr bool | operator!= (const arena_allocator &) const noexcept |
Public Attributes | |
ArenaType * | alloc_ |
bool | owns_alloc_ {false} |
std library compatible allocator that uses AD stack.
T | type of scalar |
Definition at line 310 of file memory.hpp.
using riccati::arena_allocator< T, ArenaType >::value_type = T |
Definition at line 313 of file memory.hpp.
|
inlineexplicit |
Definition at line 314 of file memory.hpp.
|
inline |
Definition at line 317 of file memory.hpp.
|
inline |
Definition at line 320 of file memory.hpp.
|
inline |
Definition at line 323 of file memory.hpp.
|
inline |
Definition at line 326 of file memory.hpp.
References riccati::arena_allocator< T, ArenaType >::alloc_, and riccati::arena_allocator< T, ArenaType >::owns_alloc_.
|
inline |
Allocates space for n
items of type T
.
n | number of items to allocate space for |
Definition at line 339 of file memory.hpp.
References riccati::arena_allocator< T, ArenaType >::alloc_.
|
inlinenoexcept |
No-op. Memory is deallocated by calling recover_memory()
.
Definition at line 353 of file memory.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Recovers memory
Definition at line 346 of file memory.hpp.
References riccati::arena_allocator< T, ArenaType >::alloc_.
ArenaType* riccati::arena_allocator< T, ArenaType >::alloc_ |
Definition at line 311 of file memory.hpp.
bool riccati::arena_allocator< T, ArenaType >::owns_alloc_ {false} |
Definition at line 312 of file memory.hpp.