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

Function get_device

src/core/device.rs:196–203  ·  view source on GitHub ↗

Get the current active device id

()

Source from the content-addressed store, hash-verified

194
195/// Get the current active device id
196pub fn get_device() -> i32 {
197 unsafe {
198 let mut temp: i32 = 0;
199 let err_val = af_get_device(&mut temp as *mut c_int);
200 HANDLE_ERROR(AfError::from(err_val));
201 temp
202 }
203}
204
205/// Get memory information from the memory manager for the current active device
206///

Callers 3

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 1

HANDLE_ERRORFunction · 0.85

Tested by

no test coverage detected