QUDA  0.9.0
Namespaces | Macros | Functions
malloc_quda.h File Reference
#include <cstdlib>
Include dependency graph for malloc_quda.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 quda
 
 quda::pool
 

Macros

#define device_malloc(size)   quda::device_malloc_(__func__, quda::file_name(__FILE__), __LINE__, size)
 
#define device_pinned_malloc(size)   quda::device_pinned_malloc_(__func__, quda::file_name(__FILE__), __LINE__, size)
 
#define safe_malloc(size)   quda::safe_malloc_(__func__, quda::file_name(__FILE__), __LINE__, size)
 
#define pinned_malloc(size)   quda::pinned_malloc_(__func__, quda::file_name(__FILE__), __LINE__, size)
 
#define mapped_malloc(size)   quda::mapped_malloc_(__func__, quda::file_name(__FILE__), __LINE__, size)
 
#define device_free(ptr)   quda::device_free_(__func__, quda::file_name(__FILE__), __LINE__, ptr)
 
#define device_pinned_free(ptr)   quda::device_pinned_free_(__func__, quda::file_name(__FILE__), __LINE__, ptr)
 
#define host_free(ptr)   quda::host_free_(__func__, quda::file_name(__FILE__), __LINE__, ptr)
 
#define pool_device_malloc(size)   quda::pool::device_malloc_(__func__, __FILE__, __LINE__, size)
 
#define pool_device_free(ptr)   quda::pool::device_free_(__func__, __FILE__, __LINE__, ptr)
 
#define pool_pinned_malloc(size)   quda::pool::pinned_malloc_(__func__, __FILE__, __LINE__, size)
 
#define pool_pinned_free(ptr)   quda::pool::pinned_free_(__func__, __FILE__, __LINE__, ptr)
 

Functions

void quda::printPeakMemUsage ()
 
void quda::assertAllMemFree ()
 
long quda::device_allocated_peak ()
 
long quda::pinned_allocated_peak ()
 
long quda::mapped_allocated_peak ()
 
long quda::host_allocated_peak ()
 
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::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::host_free_ (const char *func, const char *file, int line, void *ptr)
 
constexpr const char * quda::str_end (const char *str)
 
constexpr bool quda::str_slant (const char *str)
 
constexpr const char * quda::r_slant (const char *str)
 
constexpr const char * quda::file_name (const char *str)
 
void quda::pool::init ()
 Initialize the memory pool allocator. 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::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::flush_device ()
 Free all outstanding device-memory allocations. More...
 
void quda::pool::flush_pinned ()
 Free all outstanding pinned-memory allocations. More...
 

Macro Definition Documentation

◆ device_free

#define device_free (   ptr)    quda::device_free_(__func__, quda::file_name(__FILE__), __LINE__, ptr)

◆ device_malloc

#define device_malloc (   size)    quda::device_malloc_(__func__, quda::file_name(__FILE__), __LINE__, size)

◆ device_pinned_free

#define device_pinned_free (   ptr)    quda::device_pinned_free_(__func__, quda::file_name(__FILE__), __LINE__, ptr)

◆ device_pinned_malloc

#define device_pinned_malloc (   size)    quda::device_pinned_malloc_(__func__, quda::file_name(__FILE__), __LINE__, size)

Definition at line 53 of file malloc_quda.h.

Referenced by quda::LatticeField::allocateGhostBuffer().

◆ host_free

#define host_free (   ptr)    quda::host_free_(__func__, quda::file_name(__FILE__), __LINE__, ptr)

◆ mapped_malloc

#define mapped_malloc (   size)    quda::mapped_malloc_(__func__, quda::file_name(__FILE__), __LINE__, size)

◆ pinned_malloc

#define pinned_malloc (   size)    quda::pinned_malloc_(__func__, quda::file_name(__FILE__), __LINE__, size)

Definition at line 55 of file malloc_quda.h.

Referenced by gauge_force_test(), quda::blas::initReduce(), and llfat_test().

◆ pool_device_free

#define pool_device_free (   ptr)    quda::pool::device_free_(__func__, __FILE__, __LINE__, ptr)

◆ pool_device_malloc

#define pool_device_malloc (   size)    quda::pool::device_malloc_(__func__, __FILE__, __LINE__, size)

◆ pool_pinned_free

#define pool_pinned_free (   ptr)    quda::pool::pinned_free_(__func__, __FILE__, __LINE__, ptr)

◆ pool_pinned_malloc

#define pool_pinned_malloc (   size)    quda::pool::pinned_malloc_(__func__, __FILE__, __LINE__, size)

◆ safe_malloc

#define safe_malloc (   size)    quda::safe_malloc_(__func__, quda::file_name(__FILE__), __LINE__, size)