SAXPY(3) BLAS routine of NEC Numeric Library Collection SAXPY(3) NAME SAXPY - BLAS level one axpy subroutine SYNOPSIS SUBROUTINE SAXPY ( n, alpha, x, incx, y, incy ) INTEGER n, incx, incy REAL alpha, x, y DESCRIPTION SAXPY adds a scalar multiple of a real vector to another real vector. SAXPY computes a constant alpha times a vector x plus a vector y. The result overwrites the initial values of vector y. This routine performs the following vector operation: y <-- alpha*x + y incx and incy specify the increment between two consecutive elements of respectively vector x and y. ARGUMENTS n INTEGER. (input) Number of elements in the vectors. If n <= 0, these routines return without any computation. alpha REAL. (input) If alpha = 0 this routine returns without any computation. x REAL. (input) Array of dimension (n-1) * |incx| + 1. Contains the vector to be scaled before summation. incx INTEGER. (input) Increment between elements of x. If incx = 0, the results will be unpredictable. y REAL. (input and output) array of dimension (n-1) * |incy| + 1. Before calling the routine, y contains the vector to be summed. After the routine ends, y contains the result of the summation. incy INTEGER. (input) Increment between elements of y. If incy = 0, the results will be unpredictable. NOTES This routine is Level 1 Basic Linear Algebra Subprograms (Level 1 BLAS). When working backward (incx < 0 or incy < 0), each routine starts at the end of the vector and moves backward, as follows: x(1-incx * (n-1)), x(1-incx * (n-2)), ..., x(1) y(1-incy * (n-1)), y(1-incy * (n-2)), ..., y(1) RETURN VALUES When n <= 0, real alpha = 0., this routine returns immediately with no change in its arguments. BLAS routine SAXPY(3)