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

Function addDevice

include/af/oneapi.h:233–237  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

231 \note ArrayFire does not take control of releasing the objects passed to it. The user needs to release them appropriately.
232*/
233static inline void addDevice(cl_device_id dev, cl_context ctx, cl_command_queue que)
234{
235 af_err err = afcl_add_device_context(dev, ctx, que);
236 if (err!=AF_SUCCESS) throw af::exception("Failed to push user provided device/context to ArrayFire pool");
237}
238#endif
239
240#if AF_API_VERSION >= 39

Callers

nothing calls this directly

Calls 1

afcl_add_device_contextFunction · 0.50

Tested by

no test coverage detected