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

Function setDevice

include/af/oneapi.h:247–251  ·  view source on GitHub ↗

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 */

Source from the content-addressed store, hash-verified

245 \param[in] ctx is the OpenCL cl_context being used by ArrayFire
246*/
247static 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

Callers

nothing calls this directly

Calls 1

afcl_set_device_contextFunction · 0.50

Tested by

no test coverage detected