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

Function setDevice

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

259 \param[in] ctx is the OpenCL cl_context being used by ArrayFire
260*/
261static inline void setDevice(cl_device_id dev, cl_context ctx)
262{
263 af_err err = afcl_set_device_context(dev, ctx);
264 if (err!=AF_SUCCESS) throw af::exception("Failed to set device based on cl_device_id & cl_context");
265}
266#endif
267
268#if AF_API_VERSION >= 33

Callers 15

mainFunction · 0.50
mainFunction · 0.50
fft.cppFile · 0.50
sparseTesterFunction · 0.50
sparseTransposeTesterFunction · 0.50
convertCSRFunction · 0.50
convertCSCFunction · 0.50
TEST_FFunction · 0.50
calcFunction · 0.50
TESTFunction · 0.50
doubleAllocationTestFunction · 0.50
morphTestFunction · 0.50

Calls 1

afcl_set_device_contextFunction · 0.50

Tested by 1

deathTestFunction · 0.40