MCPcopy Index your code
hub / github.com/arrayfire/arrayfire-rust / get_device_native_id

Function get_device_native_id

cuda-interop/src/lib.rs:23–30  ·  view source on GitHub ↗

Get active device's id in CUDA context # Parameters - `id` is the integer identifier of concerned CUDA device as per ArrayFire context # Return Values Integer identifier of device in CUDA context

(id: i32)

Source from the content-addressed store, hash-verified

21///
22/// Integer identifier of device in CUDA context
23pub fn get_device_native_id(id: i32) -> i32 {
24 unsafe {
25 let mut temp: i32 = 0;
26 let err_val = afcu_get_native_id(&mut temp as *mut c_int, id);
27 handle_error_general(AfError::from(err_val));
28 temp
29 }
30}
31
32/// Set active device using CUDA context's id
33///

Callers

nothing calls this directly

Calls 1

handle_error_generalFunction · 0.85

Tested by

no test coverage detected