Function arrayfire::sum_all
[−]
[src]
pub fn sum_all(input: &Array) -> (f64, f64)
Sum all values of the Array
Parameters
input
is the input Array
Return Values
A tuple containing the summation result.
Note: For non-complex data type Arrays, second value of tuple is zero.
Examples
use arrayfire::{Dim4, print, randu, sum_all}; let dims = Dim4::new(&[5, 5, 1, 1]); let a = randu::<f32>(dims); print(&a); println!("Result : {:?}", sum_all(&a));