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

Method shutdown

src/backend/opencl/memory.cpp:188–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186Allocator::Allocator() { logger = common::loggerFactory("mem"); }
187
188void Allocator::shutdown() {
189 for (int n = 0; n < opencl::getDeviceCount(); n++) {
190 try {
191 opencl::setDevice(n);
192 shutdownMemoryManager();
193 } catch (const AfError &err) {
194 continue; // Do not throw any errors while shutting down
195 }
196 }
197}
198
199int Allocator::getActiveDeviceId() { return opencl::getActiveDeviceId(); }
200

Callers 2

shutdownMemoryManagerFunction · 0.45

Calls 4

getDeviceCountFunction · 0.70
setDeviceFunction · 0.70
shutdownMemoryManagerFunction · 0.70

Tested by

no test coverage detected