Set active device using cl_context and cl_device_id \param[in] dev is the OpenCL device id that is to be set as Active device inside ArrayFire \param[in] ctx is the OpenCL cl_context being used by ArrayFire */
| 245 | \param[in] ctx is the OpenCL cl_context being used by ArrayFire |
| 246 | */ |
| 247 | static inline void setDevice(cl_device_id dev, cl_context ctx) |
| 248 | { |
| 249 | af_err err = afcl_set_device_context(dev, ctx); |
| 250 | if (err!=AF_SUCCESS) throw af::exception("Failed to set device based on cl_device_id & cl_context"); |
| 251 | } |
| 252 | #endif |
| 253 | |
| 254 | #if AF_API_VERSION >= 39 |
nothing calls this directly
no test coverage detected