A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://arrayfire.github.io/arrayfire-rust/arrayfire/fn.product_all.html below:

arrayfire::product_all - Rust

[−][src]Function arrayfire::product_all
pub fn product_all<T>(
    input: &Array<T>
) -> (<<T as HasAfEnum>::ProductOutType as HasAfEnum>::BaseType, <<T as HasAfEnum>::ProductOutType as HasAfEnum>::BaseType) where
    T: HasAfEnum,
    <T as HasAfEnum>::ProductOutType: HasAfEnum,
    <<T as HasAfEnum>::ProductOutType as HasAfEnum>::BaseType: HasAfEnum + Fromf64

Product of all values of the Array

A tuple containing the product result.

Note: For non-complex data type Arrays, second value of tuple is zero.

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

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