Function set

Source
pub unsafe extern "C" fn set(
    n: c_int,
    alpha: c_double,
    x: *mut c_double,
    inc_x: c_int,
)
Expand description

Sets all elements in the double-precision vector x to the given value alpha.

§Precision

This function operates on f64 numbers.

§Parameters

  • n: The number of elements in the vector x.
  • alpha: The scalar value to set all elements of x.
  • x: A pointer to the vector to be modified in-place.
  • inc_x: The increment between elements in x.

§Safety

This is an unsafe C function, and it is the caller’s responsibility to ensure that the memory region accessed by x (up to n * inc_x) is valid and within bounds.