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

Function setDeviceId

include/af/opencl.h:225–229  ·  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

223 \param[in] id the cl_device_id of the device to be set as active device
224 */
225 static inline void setDeviceId(cl_device_id id)
226 {
227 af_err err = afcl_set_device_id(id);
228 if (err != AF_SUCCESS) throw af::exception("Failed to set OpenCL device as active device");
229 }
230#endif
231
232#if AF_API_VERSION >= 33

Callers

nothing calls this directly

Calls 1

afcl_set_device_idFunction · 0.50

Tested by

no test coverage detected