Function dot_plus

Source
pub unsafe extern "C" fn dot_plus(
    n: c_int,
    sb: c_float,
    x: *const c_float,
    inc_x: c_int,
    y: *const c_float,
    inc_y: c_int,
) -> c_float
Expand description

Computes the dot product of two single-precision vectors, with an added scalar.

§Precision

This function operates on f32 numbers.

§Parameters

  • n: The number of elements in the vectors x and y.
  • sb: A scalar value to be added to the result of the dot product.
  • x: A pointer to the first input vector of f32 numbers.
  • inc_x: The increment between elements in x.
  • y: A pointer to the second input vector of f32 numbers.
  • inc_y: The increment between elements in y.

§Returns

  • The scalar sb added to the dot product of x and y.

§Safety

This is an unsafe C function. The caller must ensure that the memory regions accessed by x and y (up to n * inc_x and n * inc_y) are valid and within bounds.