|
QDP++
|
#include <qdp_default_allocator.h>
Public Member Functions | |
| void | init (size_t PoolSizeinMB) |
| void | pushFunc (const char *func, int line) |
| void | popFunc () |
| void * | allocate (size_t n_bytes, const MemoryPoolHint &mem_pool_hint) |
| void | free (void *mem) |
| Free an aligned pointer, which was allocated by us. | |
| void | dump () |
| Dump the map. | |
Friends | |
| class | QDP::CreateUsingNew< QDP::Allocator::QDPDefaultAllocator > |
| class | QDP::CreateStatic< QDP::Allocator::QDPDefaultAllocator > |
Definition at line 58 of file qdp_default_allocator.h.
| void * QDP::Allocator::QDPDefaultAllocator::allocate | ( | size_t | n_bytes, |
| const MemoryPoolHint & | mem_pool_hint ) |
Allocator function. Allocates n_bytes, into a memory pool This is a default implementation, with only 1 memory pool So we simply ignore the memory pool hint.
The raw unaligned pointer returned by the allocator
The aligned pointer that we make out of the unaligned one.
Definition at line 21 of file qdp_default_allocator.cc.
References QDP::QDPIO::cerr, QDP::QDP_abort(), and QDP_ALIGNMENT_SIZE.
| void QDP::Allocator::QDPDefaultAllocator::dump | ( | ) |
Dump the map.
Definition at line 157 of file qdp_default_allocator.cc.
References QDP::QDPIO::cout, and QDP::Layout::primaryNode().
Referenced by QDP::OSubLattice< typename SinglePrecType< T >::Type_t >::alloc_mem().
| void QDP::Allocator::QDPDefaultAllocator::free | ( | void * | mem | ) |
Free an aligned pointer, which was allocated by us.
Definition at line 74 of file qdp_default_allocator.cc.
References QDP::QDPIO::cerr, and QDP::QDP_abort().
Referenced by QDP::OSubLattice< typename SinglePrecType< T >::Type_t >::free_mem().
| void QDP::Allocator::QDPDefaultAllocator::init | ( | size_t | PoolSizeinMB | ) |
Definition at line 182 of file qdp_default_allocator.cc.
References QDP::QDPIO::cout.
Referenced by QDP::Layout::create().
| void QDP::Allocator::QDPDefaultAllocator::popFunc | ( | ) |
Definition at line 178 of file qdp_default_allocator.cc.
| void QDP::Allocator::QDPDefaultAllocator::pushFunc | ( | const char * | func, |
| int | line ) |
Definition at line 174 of file qdp_default_allocator.cc.
|
friend |
Definition at line 78 of file qdp_default_allocator.h.
|
friend |
Definition at line 78 of file qdp_default_allocator.h.