Skip to main content

product_in_f32_accumulation

Function product_in_f32_accumulation 

Source
pub fn product_in_f32_accumulation(values: &[Bf16]) -> Bf16
Expand description

Product of a slice, accumulating in f32 and rounding once.

ยงExamples

use tenferro_bf16_proof::{reduction::product_in_f32_accumulation, Bf16};

let values = [Bf16::from_f32(3.0), Bf16::from_f32(4.0)];
assert_eq!(product_in_f32_accumulation(&values).to_f32(), 12.0);