QUDA  v1.1.0
A library for QCD on GPUs
Functions
quda::pool Namespace Reference

Functions

void init ()
 Initialize the memory pool allocator. More...
 
void * device_malloc_ (const char *func, const char *file, int line, size_t size)
 Allocate device-memory. If free pre-existing allocation exists reuse this. More...
 
void device_free_ (const char *func, const char *file, int line, void *ptr)
 Virtual free of pinned-memory allocation. More...
 
void * pinned_malloc_ (const char *func, const char *file, int line, size_t size)
 Allocate pinned-memory. If a free pre-existing allocation exists reuse this. More...
 
void pinned_free_ (const char *func, const char *file, int line, void *ptr)
 Virtual free of pinned-memory allocation. More...
 
void flush_device ()
 Free all outstanding device-memory allocations. More...
 
void flush_pinned ()
 Free all outstanding pinned-memory allocations. More...
 

Function Documentation

◆ device_free_()

void quda::pool::device_free_ ( const char *  func,
const char *  file,
int  line,
void *  ptr 
)

Virtual free of pinned-memory allocation.

Parameters
ptrPointer to be (virtually) freed

Definition at line 730 of file malloc.cpp.

◆ device_malloc_()

void * quda::pool::device_malloc_ ( const char *  func,
const char *  file,
int  line,
size_t  size 
)

Allocate device-memory. If free pre-existing allocation exists reuse this.

Parameters
sizeSize of allocation
Returns
Pointer to allocated memory

Definition at line 703 of file malloc.cpp.

◆ flush_device()

void quda::pool::flush_device ( )

Free all outstanding device-memory allocations.

Definition at line 761 of file malloc.cpp.

◆ flush_pinned()

void quda::pool::flush_pinned ( )

Free all outstanding pinned-memory allocations.

Definition at line 753 of file malloc.cpp.

◆ init()

void quda::pool::init ( )

Initialize the memory pool allocator.

Definition at line 632 of file malloc.cpp.

◆ pinned_free_()

void quda::pool::pinned_free_ ( const char *  func,
const char *  file,
int  line,
void *  ptr 
)

Virtual free of pinned-memory allocation.

Parameters
ptrPointer to be (virtually) freed

Definition at line 692 of file malloc.cpp.

◆ pinned_malloc_()

void * quda::pool::pinned_malloc_ ( const char *  func,
const char *  file,
int  line,
size_t  size 
)

Allocate pinned-memory. If a free pre-existing allocation exists reuse this.

Parameters
sizeSize of allocation
Returns
Pointer to allocated memory

Definition at line 665 of file malloc.cpp.