MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / shutdown

Method shutdown

src/backend/cpu/memory.cpp:127–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125Allocator::Allocator() { logger = common::loggerFactory("mem"); }
126
127void Allocator::shutdown() {
128 for (int n = 0; n < cpu::getDeviceCount(); n++) {
129 try {
130 cpu::setDevice(n);
131 shutdownMemoryManager();
132 } catch (const AfError &err) {
133 continue; // Do not throw any errors while shutting down
134 }
135 }
136}
137
138int Allocator::getActiveDeviceId() {
139 return static_cast<int>(cpu::getActiveDeviceId());

Callers 1

shutdownMemoryManagerFunction · 0.45

Calls 3

getDeviceCountFunction · 0.70
setDeviceFunction · 0.70
shutdownMemoryManagerFunction · 0.70

Tested by

no test coverage detected