Get the device ID for ArrayFire's current active device \returns the cl_device_id of the current device */
| 208 | \returns the cl_device_id of the current device |
| 209 | */ |
| 210 | static inline cl_device_id getDeviceId() |
| 211 | { |
| 212 | cl_device_id id; |
| 213 | af_err err = afcl_get_device_id(&id); |
| 214 | if (err != AF_SUCCESS) throw af::exception("Failed to get OpenCL device ID"); |
| 215 | |
| 216 | return id; |
| 217 | } |
| 218 | |
| 219 | #if AF_API_VERSION >= 32 |
| 220 | /** |
no test coverage detected