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

Function init

src/core/device.rs:148–153  ·  view source on GitHub ↗

Initialize ArrayFire library 0th device will be the default device unless init call is followed by set_device

()

Source from the content-addressed store, hash-verified

146/// 0th device will be the default device unless init call
147/// is followed by set_device
148pub 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
156pub fn device_count() -> i32 {

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 1

HANDLE_ERRORFunction · 0.85

Tested by

no test coverage detected