oa::matrix::from_f32

Create an FP32 matrix on this thread’s default engine. Errors Returns an error when the default engine cannot be initialized, the shape does not match values, or allocation and upload fail.

FnRust public API

Function Documentation

pub fn from_f32( shape: impl Into<Vec<usize>>, values: &[f32] ) -> Result<Matrix>
Create an FP32 matrix on this thread’s default engine. Errors Returns an error when the default engine cannot be initialized, the shape does not match values, or allocation and upload fail.

Examples