pub fn print_gen<T: HasAfEnum>(
msg: String,
input: &Array<T>,
precision: Option<i32>
)
Generalized Array print function
Use this function to print Array data with arbitrary preicsion
msg
is message to be printed before printing the Array datainput
is the Array to be printedprecision
is data precision with which Array has to be printeduse arrayfire::{Dim4, print_gen, randu}; println!("Create a 5-by-3 matrix of random floats on the GPU"); let dims = Dim4::new(&[5, 3, 1, 1]); let a = randu::<f32>(dims); print_gen(String::from("Random Array"), &a, Some(6));
The sample output will look like below:
Random Array
[5 3 1 1]
0.740276 0.446440 0.776202
0.921094 0.667321 0.294810
0.039014 0.109939 0.714090
0.969058 0.470269 0.358590
0.925181 0.513225 0.681451
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4