[][src]Function arrayfire::count_all

pub fn count_all<T>(input: &Array<T>) -> (u64, u64) where
    T: HasAfEnum,
    u64: HasAfEnum + Fromf64

Count number of non-zero values in the Array

Parameters

Return Values

A tuple containing the count of non-zero values in the Array.

Examples

use arrayfire::{Dim4, print, randu, count_all};
let dims = Dim4::new(&[5, 5, 1, 1]);
let a = randu::<f32>(dims);
print(&a);
println!("Result : {:?}", count_all(&a));