|
HDK
|
This class implements a pool for UT_Ramps on the GPU. More...
#include <CE_RampCache.h>
Classes | |
| class | MemoryClient |
| class | RampEntry |
Public Member Functions | |
| CE_RampCache (exint size) | |
| Initialize the pool with specified maximum size. More... | |
| ~CE_RampCache () | |
| void | clear () |
| Empty the memory pool of all held buffers. More... | |
| cl::Buffer | lookupRamp (UT_SharedPtr< UT_Ramp > ramp, int tuplesize, int rampsize) |
| void | cacheRamp (cl::Buffer buffer, UT_SharedPtr< UT_Ramp > ramp, int tuplesize, int rampsize) |
| Adds to the cache. More... | |
| void | getUsage (exint &total, exint ¬_in_use) const |
| exint | freeMemory (exint amount) |
Protected Types | |
| using | RampLRU = UT_LRUCache< CE_RampKey, RampEntry, RampEntry::computeNumBytes > |
Protected Attributes | |
| RampLRU | myRampCache |
| UT_Lock | myRampCacheLock |
| MemoryClient | myMemoryClient |
| The memory client that's registered with the OpenCL device. More... | |
Friends | |
| size_t | hash_value (const CE_RampKey &val) |
This class implements a pool for UT_Ramps on the GPU.
Definition at line 90 of file CE_RampCache.h.
|
protected |
Definition at line 198 of file CE_RampCache.h.
| CE_RampCache::CE_RampCache | ( | exint | size | ) |
Initialize the pool with specified maximum size.
| CE_RampCache::~CE_RampCache | ( | ) |
| void CE_RampCache::cacheRamp | ( | cl::Buffer | buffer, |
| UT_SharedPtr< UT_Ramp > | ramp, | ||
| int | tuplesize, | ||
| int | rampsize | ||
| ) |
Adds to the cache.
| void CE_RampCache::clear | ( | ) |
Empty the memory pool of all held buffers.
Attempts to release the requested amount of memory back to the system. Returns the amount actually freed.
Query the current usage; total is the total amount of memory held by the pool, not_in_use is the amount that can be freed immediately on demand.
| cl::Buffer CE_RampCache::lookupRamp | ( | UT_SharedPtr< UT_Ramp > | ramp, |
| int | tuplesize, | ||
| int | rampsize | ||
| ) |
Returns empty buffer if not in cache. This buffer remains owned by the cache; insofar as calling CE_Context::releaseBuffer.
|
friend |
|
protected |
The memory client that's registered with the OpenCL device.
Definition at line 203 of file CE_RampCache.h.
|
protected |
Definition at line 199 of file CE_RampCache.h.
|
mutableprotected |
Definition at line 200 of file CE_RampCache.h.