|
QUDA
0.9.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 520 of file malloc.cpp.
References quda::device_free_(), device_memory_pool, deviceCache, deviceSize, errorQuda, func, and ptr.

Allocate device-memory. If free pre-existing allocation exists reuse this.
| size | Size of allocation |
Definition at line 491 of file malloc.cpp.
References quda::device_free_(), quda::device_malloc_(), device_memory_pool, deviceCache, deviceSize, func, quda::it, and ptr.

| void quda::pool::flush_device | ( | ) |
Free all outstanding device-memory allocations.
Definition at line 545 of file malloc.cpp.
References device_free, device_memory_pool, deviceCache, quda::it, and ptr.
Referenced by endQuda().

| void quda::pool::flush_pinned | ( | ) |
Free all outstanding pinned-memory allocations.
Definition at line 533 of file malloc.cpp.
References host_free, quda::it, pinned_memory_pool, pinnedCache, and ptr.
Referenced by endQuda().

| void quda::pool::init | ( | ) |
Initialize the memory pool allocator.
Definition at line 424 of file malloc.cpp.
References device_memory_pool, getenv(), pinned_memory_pool, pool_init, strcmp(), and 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 478 of file malloc.cpp.
References errorQuda, func, quda::host_free_(), pinned_memory_pool, pinnedCache, pinnedSize, and ptr.

Allocate pinned-memory. If a free pre-existing allocation exists reuse this.
| size | Size of allocation |
Definition at line 449 of file malloc.cpp.
References func, host_free, quda::it, quda::pinned_malloc_(), pinned_memory_pool, pinnedCache, pinnedSize, and ptr.

|
static |
whether to use a memory pool allocator for device memory
Definition at line 419 of file malloc.cpp.
Referenced by device_free_(), device_malloc_(), flush_device(), and init().
|
static |
Cache of inactive device-memory allocations. We cache pinned memory allocations so that fields can reuse these with minimal overhead.
Definition at line 409 of file malloc.cpp.
Referenced by device_free_(), device_malloc_(), and flush_device().
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 414 of file malloc.cpp.
Referenced by device_free_(), and device_malloc_().
|
static |
whether to use a memory pool allocator for pinned memory
Definition at line 422 of file malloc.cpp.
Referenced by flush_pinned(), init(), pinned_free_(), and pinned_malloc_().
|
static |
Cache of inactive pinned-memory allocations. We cache pinned memory allocations so that fields can reuse these with minimal overhead.
Definition at line 399 of file malloc.cpp.
Referenced by flush_pinned(), pinned_free_(), and pinned_malloc_().
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 404 of file malloc.cpp.
Referenced by pinned_free_(), and pinned_malloc_().
|
static |
Definition at line 416 of file malloc.cpp.
Referenced by init().
1.8.14