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

Function getDeviceId

include/af/oneapi.h:196–203  ·  view source on GitHub ↗

Get the device ID for ArrayFire's current active device \returns the cl_device_id of the current device */

Source from the content-addressed store, hash-verified

194 \returns the cl_device_id of the current device
195 */
196 static inline cl_device_id getDeviceId()
197 {
198 cl_device_id id;
199 af_err err = afcl_get_device_id(&id);
200 if (err != AF_SUCCESS) throw af::exception("Failed to get OpenCL device ID");
201
202 return id;
203 }
204
205#if AF_API_VERSION >= 39
206 /**

Callers

nothing calls this directly

Calls 1

afcl_get_device_idFunction · 0.50

Tested by

no test coverage detected