| 94 | void DefaultMemoryManager::shutdown() { signalMemoryCleanup(); } |
| 95 | |
| 96 | void DefaultMemoryManager::addMemoryManagement(int device) { |
| 97 | // If there is a memory manager allocated for this device id, we might |
| 98 | // as well use it and the buffers allocated for it |
| 99 | if (static_cast<size_t>(device) < memory.size()) { return; } |
| 100 | |
| 101 | // Assuming, device need not be always the next device Lets resize to |
| 102 | // current_size + device + 1 +1 is to account for device being 0-based |
| 103 | // index of devices |
| 104 | memory.resize(memory.size() + device + 1); |
| 105 | } |
| 106 | |
| 107 | void DefaultMemoryManager::removeMemoryManagement(int device) { |
| 108 | if (static_cast<size_t>(device) >= memory.size()) { |
no outgoing calls
no test coverage detected