Skip to main content

inner_product

Function inner_product 

Source
pub fn inner_product<F: FieldOps>(
    a: impl IntoIterator<Item = F>,
    b: impl IntoIterator<Item = F>,
) -> F
Expand description

Computes the inner product sum_i a_i * b_i.

Arithmetic is element-wise. A packed element therefore yields one independent inner product per lane, not one scalar.

ยงPanics

Panics if the two sequences have different lengths.