QUDA  v1.1.0
A library for QCD on GPUs
Classes | Namespaces | Enumerations | Functions
malloc.cpp File Reference
#include <cstdlib>
#include <cstdio>
#include <string>
#include <map>
#include <unistd.h>
#include <execinfo.h>
#include <quda_internal.h>
#include <shmem_helper.cuh>

Go to the source code of this file.

Classes

class  quda::MemAlloc
 

Namespaces

 quda
 
 quda::pool
 

Enumerations

enum  quda::AllocType {
  quda::DEVICE , quda::DEVICE_PINNED , quda::HOST , quda::PINNED ,
  quda::MAPPED , quda::MANAGED , quda::SHMEM , quda::N_ALLOC_TYPE ,
  quda::DEVICE , quda::DEVICE_PINNED , quda::HOST , quda::PINNED ,
  quda::MAPPED , quda::MANAGED , quda::N_ALLOC_TYPE
}
 

Functions

size_t quda::device_allocated ()
 
size_t quda::pinned_allocated ()
 
size_t quda::mapped_allocated ()
 
size_t quda::managed_allocated ()
 
size_t quda::host_allocated ()
 
size_t quda::device_allocated_peak ()
 
size_t quda::pinned_allocated_peak ()
 
size_t quda::mapped_allocated_peak ()
 
size_t quda::managed_allocated_peak ()
 
size_t quda::host_allocated_peak ()
 
bool quda::use_managed_memory ()
 
bool quda::is_prefetch_enabled ()
 
void * quda::device_malloc_ (const char *func, const char *file, int line, size_t size)
 
void * quda::device_pinned_malloc_ (const char *func, const char *file, int line, size_t size)
 
void * quda::safe_malloc_ (const char *func, const char *file, int line, size_t size)
 
void * quda::pinned_malloc_ (const char *func, const char *file, int line, size_t size)
 
void * quda::mapped_malloc_ (const char *func, const char *file, int line, size_t size)
 
void * quda::managed_malloc_ (const char *func, const char *file, int line, size_t size)
 
void * quda::device_comms_pinned_malloc_ (const char *func, const char *file, int line, size_t size)
 
void quda::device_free_ (const char *func, const char *file, int line, void *ptr)
 
void quda::device_pinned_free_ (const char *func, const char *file, int line, void *ptr)
 
void quda::managed_free_ (const char *func, const char *file, int line, void *ptr)
 
void quda::host_free_ (const char *func, const char *file, int line, void *ptr)
 
void quda::device_comms_pinned_free_ (const char *func, const char *file, int line, void *ptr)
 
void quda::printPeakMemUsage ()
 
void quda::assertAllMemFree ()
 
QudaFieldLocation quda::get_pointer_location (const void *ptr)
 
void * quda::get_mapped_device_pointer_ (const char *func, const char *file, int line, const void *ptr)
 
void quda::pool::init ()
 Initialize the memory pool allocator. More...
 
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. More...
 
void quda::pool::pinned_free_ (const char *func, const char *file, int line, void *ptr)
 Virtual free of pinned-memory allocation. More...
 
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. More...
 
void quda::pool::device_free_ (const char *func, const char *file, int line, void *ptr)
 Virtual free of pinned-memory allocation. More...
 
void quda::pool::flush_pinned ()
 Free all outstanding pinned-memory allocations. More...
 
void quda::pool::flush_device ()
 Free all outstanding device-memory allocations. More...