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)
| 21 | /// |
| 22 | /// Integer identifier of device in CUDA context |
| 23 | pub 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 | /// |
nothing calls this directly
no test coverage detected