| 136 | Allocator::Allocator() { logger = common::loggerFactory("mem"); } |
| 137 | |
| 138 | void Allocator::shutdown() { |
| 139 | for (int n = 0; n < getDeviceCount(); n++) { |
| 140 | try { |
| 141 | setDevice(n); |
| 142 | shutdownMemoryManager(); |
| 143 | } catch (const AfError &err) { |
| 144 | continue; // Do not throw any errors while shutting down |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | int Allocator::getActiveDeviceId() { return cuda::getActiveDeviceId(); } |
| 150 |
no test coverage detected