LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ zaxpy()

subroutine zaxpy ( integer  N,
complex*16  ZA,
complex*16, dimension(*)  ZX,
integer  INCX,
complex*16, dimension(*)  ZY,
integer  INCY 
)

ZAXPY

Purpose:
    ZAXPY constant times a vector plus a vector.
Parameters
[in]N
          N is INTEGER
         number of elements in input vector(s)
[in]ZA
          ZA is COMPLEX*16
           On entry, ZA specifies the scalar alpha.
[in]ZX
          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
[in]INCX
          INCX is INTEGER
         storage spacing between elements of ZX
[in,out]ZY
          ZY is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
[in]INCY
          INCY is INTEGER
         storage spacing between elements of ZY
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2017
Further Details:
     jack dongarra, 3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 90 of file zaxpy.f.

90 *
91 * -- Reference BLAS level1 routine (version 3.8.0) --
92 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
93 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
94 * November 2017
95 *
96 * .. Scalar Arguments ..
97  COMPLEX*16 za
98  INTEGER incx,incy,n
99 * ..
100 * .. Array Arguments ..
101  COMPLEX*16 zx(*),zy(*)
102 * ..
103 *
104 * =====================================================================
105 *
106 * .. Local Scalars ..
107  INTEGER i,ix,iy
108 * ..
109 * .. External Functions ..
110  DOUBLE PRECISION dcabs1
111  EXTERNAL dcabs1
112 * ..
113  IF (n.LE.0) RETURN
114  IF (dcabs1(za).EQ.0.0d0) RETURN
115  IF (incx.EQ.1 .AND. incy.EQ.1) THEN
116 *
117 * code for both increments equal to 1
118 *
119  DO i = 1,n
120  zy(i) = zy(i) + za*zx(i)
121  END DO
122  ELSE
123 *
124 * code for unequal increments or equal increments
125 * not equal to 1
126 *
127  ix = 1
128  iy = 1
129  IF (incx.LT.0) ix = (-n+1)*incx + 1
130  IF (incy.LT.0) iy = (-n+1)*incy + 1
131  DO i = 1,n
132  zy(iy) = zy(iy) + za*zx(ix)
133  ix = ix + incx
134  iy = iy + incy
135  END DO
136  END IF
137 *
138  RETURN
double precision function dcabs1(Z)
DCABS1
Definition: dcabs1.f:49