QDP++
QDP::Allocator::QDPDefaultAllocator Class Reference

#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 >

Detailed Description

Definition at line 58 of file qdp_default_allocator.h.

Member Function Documentation

◆ allocate()

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.

◆ dump()

void QDP::Allocator::QDPDefaultAllocator::dump ( )

◆ free()

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().

◆ init()

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().

◆ popFunc()

void QDP::Allocator::QDPDefaultAllocator::popFunc ( )

Definition at line 178 of file qdp_default_allocator.cc.

◆ pushFunc()

void QDP::Allocator::QDPDefaultAllocator::pushFunc ( const char * func,
int line )

Definition at line 174 of file qdp_default_allocator.cc.

◆ QDP::CreateStatic< QDP::Allocator::QDPDefaultAllocator >

Definition at line 78 of file qdp_default_allocator.h.

◆ QDP::CreateUsingNew< QDP::Allocator::QDPDefaultAllocator >

Definition at line 78 of file qdp_default_allocator.h.


The documentation for this class was generated from the following files: