[go: up one dir, main page]

dot_product

Function dot_product 

Source
pub unsafe fn dot_product(
    n: usize,
    x: *const f64,
    incx: usize,
    y: *const f64,
    incy: usize,
) -> f64
Expand description

Computes the dot product of two vectors.

§Arguments

  • n - The number of elements in both vectors x and y.
  • x - A raw constant pointer to the first element of vector x.
  • incx - The stride between consecutive elements of x.
  • y - A raw constant pointer to the first element of vector y.
  • incy - The stride between consecutive elements of y.

§Returns

The dot product as an f64 value.