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

Function setDeviceId

include/af/oneapi.h:211–215  ·  view source on GitHub ↗

Set ArrayFire's active device based on \p id of type cl_device_id \param[in] id the cl_device_id of the device to be set as active device */

Source from the content-addressed store, hash-verified

209 \param[in] id the cl_device_id of the device to be set as active device
210 */
211 static inline void setDeviceId(cl_device_id id)
212 {
213 af_err err = afcl_set_device_id(id);
214 if (err != AF_SUCCESS) throw af::exception("Failed to set OpenCL device as active device");
215 }
216#endif
217
218#if AF_API_VERSION >= 39

Callers

nothing calls this directly

Calls 1

afcl_set_device_idFunction · 0.50

Tested by

no test coverage detected