3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
11 * SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
13 * .. Scalar Arguments ..
17 * .. Array Arguments ..
27 *> SAXPY constant times a vector plus a vector.
28 *> uses unrolled loops for increments equal to one.
34 *> \author Univ. of Tennessee
35 *> \author Univ. of California Berkeley
36 *> \author Univ. of Colorado Denver
39 *> \date November 2011
41 *> \ingroup single_blas_level1
43 *> \par Further Details:
44 * =====================
48 *> jack dongarra, linpack, 3/11/78.
49 *> modified 12/3/93, array(1) declarations changed to array(*)
52 * =====================================================================
53 SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
55 * -- Reference BLAS level1 routine (version 3.4.0) --
56 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
57 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
60 * .. Scalar Arguments ..
64 * .. Array Arguments ..
68 * =====================================================================
73 * .. Intrinsic Functions ..
78 IF (INCX.EQ.1 .AND. INCY.EQ.1) THEN
80 * code for both increments equal to 1
88 SY(I) = SY(I) + SA*SX(I)
94 SY(I) = SY(I) + SA*SX(I)
95 SY(I+1) = SY(I+1) + SA*SX(I+1)
96 SY(I+2) = SY(I+2) + SA*SX(I+2)
97 SY(I+3) = SY(I+3) + SA*SX(I+3)
101 * code for unequal increments or equal increments
106 IF (INCX.LT.0) IX = (-N+1)*INCX + 1
107 IF (INCY.LT.0) IY = (-N+1)*INCY + 1
109 SY(IY) = SY(IY) + SA*SX(IX)