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

Method DeviceManager

src/backend/cpu/device_manager.cpp:125–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123namespace cpu {
124
125DeviceManager::DeviceManager()
126 : queues(MAX_QUEUES)
127 , fgMngr(new common::ForgeManager())
128 , memManager(new common::DefaultMemoryManager(
129 getDeviceCount(), common::MAX_BUFFERS,
130 AF_MEM_DEBUG || AF_CPU_MEM_DEBUG)) {
131 // Use the default ArrayFire memory manager
132 std::unique_ptr<cpu::Allocator> deviceMemoryManager(new cpu::Allocator());
133 memManager->setAllocator(std::move(deviceMemoryManager));
134 memManager->initialize();
135}
136
137DeviceManager& DeviceManager::getInstance() {
138 static auto* my_instance = new DeviceManager();

Callers

nothing calls this directly

Calls 3

setAllocatorMethod · 0.80
getDeviceCountFunction · 0.70
initializeMethod · 0.45

Tested by

no test coverage detected