Function rustml::ops_inplace::d_axpy
[−]
[src]
pub fn d_axpy(alpha: f64, x: &[f64], y: &mut [f64])
Computes alpha * x + y
and stores the result in y
. (optimized via BLAS)
Panics if the dimensions of the vectors do not match.
use rustml::ops_inplace::*; let x = [1.0, 2.0, 3.0]; let mut y = [4.0, 2.0, 9.0]; d_axpy(3.0, &x, &mut y); assert_eq!(y, [7.0, 8.0, 18.0]);