MCPcopy Create free account
hub / github.com/arrayfire/arrayfire-rust / set_device_context

Function set_device_context

opencl-interop/src/lib.rs:107–112  ·  view source on GitHub ↗

Set the device identified by device & context pair as the active device for ArrayFire

(dev_id: cl_device_id, ctx: cl_context)

Source from the content-addressed store, hash-verified

105
106/// Set the device identified by device & context pair as the active device for ArrayFire
107pub fn set_device_context(dev_id: cl_device_id, ctx: cl_context) {
108 unsafe {
109 let err_val = afcl_set_device_context(dev_id, ctx);
110 handle_error_general(AfError::from(err_val));
111 }
112}
113
114/// Remove the user provided device, context pair from ArrayFire device mamanger
115pub fn delete_device_context(dev_id: cl_device_id, ctx: cl_context) {

Callers 1

mainFunction · 0.85

Calls 1

handle_error_generalFunction · 0.85

Tested by

no test coverage detected