Skip to main content

symmetric_product

Function symmetric_product 

Source
pub fn symmetric_product<T: LinalgFloat>(
    a: &[T],
    c: &[T],
    batch: usize,
    m: usize,
    n: usize,
    alpha: T,
    beta: T,
) -> Vec<T>
Expand description

alpha a a^T + beta c for each a ([batch, m, n]) and c ([batch, m, m]), as JAX’s symmetric_product_p computes it on CPU (the whole matrix; on GPU, cuBLAS’s syrk gives the lower triangle).

§Panics

Panics if the lengths of the buffers do not match the sizes.