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

Method shutdown

src/backend/cuda/memory.cpp:138–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136Allocator::Allocator() { logger = common::loggerFactory("mem"); }
137
138void 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
149int Allocator::getActiveDeviceId() { return cuda::getActiveDeviceId(); }
150

Callers 2

shutdownMemoryManagerFunction · 0.45

Calls 4

getDeviceCountFunction · 0.70
setDeviceFunction · 0.70
shutdownMemoryManagerFunction · 0.70

Tested by

no test coverage detected