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

Function setDevice

src/backend/cpu/platform.cpp:134–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132size_t getHostMemorySize() { return common::getHostMemorySize(); }
133
134int setDevice(int device) {
135 thread_local bool flag = false;
136 if (!flag && device != 0) {
137#ifndef NDEBUG
138 fprintf(
139 stderr,
140 "WARNING af_set_device(device): device can only be 0 for CPU\n");
141#endif
142 flag = true;
143 }
144 return 0;
145}
146
147queue& getQueue(int device) {
148 return DeviceManager::getInstance().queues[device];

Callers 1

shutdownMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected