Get the device ID for ArrayFire's current active device \returns the cl_device_id of the current device */
| 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 | /** |
nothing calls this directly
no test coverage detected