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

Function af_get_device_id

src/api/c/device.cpp:94–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94af_err af_get_device_id(int* device, const af_array in) {
95 try {
96 if (in) {
97 const ArrayInfo& info = getInfo(in, false);
98 *device = static_cast<int>(info.getDevId());
99 } else {
100 return AF_ERR_ARG;
101 }
102 }
103 CATCHALL;
104 return AF_SUCCESS;
105}
106
107af_err af_get_active_backend(af_backend* result) {
108 *result = static_cast<af_backend>(getBackend());

Callers 1

getDeviceIdFunction · 0.50

Calls 1

getDevIdMethod · 0.80

Tested by

no test coverage detected