QUDA
1.0.0
|
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... | |
Variables | |
static std::multimap< size_t, void * > | pinnedCache |
static std::map< void *, size_t > | pinnedSize |
static std::multimap< size_t, void * > | deviceCache |
static std::map< void *, size_t > | deviceSize |
static bool | pool_init = false |
static bool | device_memory_pool = true |
static bool | pinned_memory_pool = true |
void quda::pool::device_free_ | ( | const char * | func, |
const char * | file, | ||
int | line, | ||
void * | ptr | ||
) |
Virtual free of pinned-memory allocation.
ptr | Pointer to be (virtually) freed |
Definition at line 553 of file malloc.cpp.
References quda::device_free_(), and errorQuda.
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.
size | Size of allocation |
Definition at line 524 of file malloc.cpp.
References quda::device_free_(), quda::device_malloc_(), and quda::it.
void quda::pool::flush_device | ( | ) |
Free all outstanding device-memory allocations.
Definition at line 578 of file malloc.cpp.
References device_free, and quda::it.
Referenced by endQuda().
void quda::pool::flush_pinned | ( | ) |
Free all outstanding pinned-memory allocations.
Definition at line 566 of file malloc.cpp.
References host_free, and quda::it.
Referenced by endQuda().
void quda::pool::init | ( | ) |
Initialize the memory pool allocator.
Definition at line 457 of file malloc.cpp.
References warningQuda.
Referenced by initQudaMemory().
void quda::pool::pinned_free_ | ( | const char * | func, |
const char * | file, | ||
int | line, | ||
void * | ptr | ||
) |
Virtual free of pinned-memory allocation.
ptr | Pointer to be (virtually) freed |
Definition at line 511 of file malloc.cpp.
References errorQuda, and quda::host_free_().
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.
size | Size of allocation |
Definition at line 482 of file malloc.cpp.
References host_free, quda::it, and quda::pinned_malloc_().
|
static |
whether to use a memory pool allocator for device memory
Definition at line 452 of file malloc.cpp.
|
static |
Cache of inactive device-memory allocations. We cache pinned memory allocations so that fields can reuse these with minimal overhead.
Definition at line 442 of file malloc.cpp.
|
static |
Sizes of active device-memory allocations. For convenience, we keep track of the sizes of active allocations (i.e., those not in the cache).
Definition at line 447 of file malloc.cpp.
|
static |
whether to use a memory pool allocator for pinned memory
Definition at line 455 of file malloc.cpp.
|
static |
Cache of inactive pinned-memory allocations. We cache pinned memory allocations so that fields can reuse these with minimal overhead.
Definition at line 432 of file malloc.cpp.
|
static |
Sizes of active pinned-memory allocations. For convenience, we keep track of the sizes of active allocations (i.e., those not in the cache).
Definition at line 437 of file malloc.cpp.
|
static |
Definition at line 449 of file malloc.cpp.