Initialize ArrayFire library 0th device will be the default device unless init call is followed by set_device
()
| 146 | /// 0th device will be the default device unless init call |
| 147 | /// is followed by set_device |
| 148 | pub fn init() { |
| 149 | unsafe { |
| 150 | let err_val = af_init(); |
| 151 | HANDLE_ERROR(AfError::from(err_val)); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /// Get total number of available devices |
| 156 | pub fn device_count() -> i32 { |
no test coverage detected