Cuda battery library
|
#include <allocator.hpp>
Public Member Functions | |
CUDA NI | pool_allocator ()=default |
CUDA NI | pool_allocator (const pool_allocator &other) |
CUDA NI | pool_allocator (pool_allocator &&other) |
CUDA NI | pool_allocator (unsigned char *mem, size_t capacity, size_t alignment=alignof(std::max_align_t)) |
CUDA NI | ~pool_allocator () |
CUDA NI pool_allocator & | operator= (pool_allocator &&other) |
CUDA size_t | align_at (size_t alignment) |
CUDA NI void * | allocate (size_t bytes) |
CUDA NI void | deallocate (void *ptr) |
CUDA NI void | print () const |
CUDA size_t | used () const |
CUDA size_t | capacity () const |
CUDA size_t | num_deallocations () const |
CUDA size_t | num_allocations () const |
CUDA size_t | unaligned_wasted_bytes () const |
CUDA bool | operator== (const pool_allocator &rhs) const |
An allocator allocating memory from a pool of memory. The memory can for instance be the CUDA shared memory. This allocator is incomplete as it never frees the memory allocated. It allocates a control block using the "normal" operator new
, where the address to the pool, its capacity and current offset are stored.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |