Push user provided device control constructs into the ArrayFire device manager pool This function should be used only when the user would like ArrayFire to use an user generated OpenCL context and related objects for ArrayFire operations. \param[in] dev is the OpenCL device for which user provided context will be used by ArrayFire \param[in] ctx is the user provided OpenCL cl_context
| 245 | \note ArrayFire does not take control of releasing the objects passed to it. The user needs to release them appropriately. |
| 246 | */ |
| 247 | static inline void addDevice(cl_device_id dev, cl_context ctx, cl_command_queue que) |
| 248 | { |
| 249 | af_err err = afcl_add_device_context(dev, ctx, que); |
| 250 | if (err!=AF_SUCCESS) throw af::exception("Failed to push user provided device/context to ArrayFire pool"); |
| 251 | } |
| 252 | #endif |
| 253 | |
| 254 | #if AF_API_VERSION >= 33 |
no test coverage detected