3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
11 * SUBROUTINE ZGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
13 * .. Scalar Arguments ..
15 * INTEGER INCX,INCY,LDA,M,N
17 * .. Array Arguments ..
18 * COMPLEX*16 A(LDA,*),X(*),Y(*)
27 *> ZGERC performs the rank 1 operation
29 *> A := alpha*x*y**H + A,
31 *> where alpha is a scalar, x is an m element vector, y is an n element
32 *> vector and A is an m by n matrix.
41 *> On entry, M specifies the number of rows of the matrix A.
42 *> M must be at least zero.
48 *> On entry, N specifies the number of columns of the matrix A.
49 *> N must be at least zero.
54 *> ALPHA is COMPLEX*16
55 *> On entry, ALPHA specifies the scalar alpha.
60 *> X is COMPLEX*16 array of dimension at least
61 *> ( 1 + ( m - 1 )*abs( INCX ) ).
62 *> Before entry, the incremented array X must contain the m
69 *> On entry, INCX specifies the increment for the elements of
70 *> X. INCX must not be zero.
75 *> Y is COMPLEX*16 array of dimension at least
76 *> ( 1 + ( n - 1 )*abs( INCY ) ).
77 *> Before entry, the incremented array Y must contain the n
84 *> On entry, INCY specifies the increment for the elements of
85 *> Y. INCY must not be zero.
90 *> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
91 *> Before entry, the leading m by n part of the array A must
92 *> contain the matrix of coefficients. On exit, A is
93 *> overwritten by the updated matrix.
99 *> On entry, LDA specifies the first dimension of A as declared
100 *> in the calling (sub) program. LDA must be at least
107 *> \author Univ. of Tennessee
108 *> \author Univ. of California Berkeley
109 *> \author Univ. of Colorado Denver
112 *> \date November 2011
114 *> \ingroup complex16_blas_level2
116 *> \par Further Details:
117 * =====================
121 *> Level 2 Blas routine.
123 *> -- Written on 22-October-1986.
124 *> Jack Dongarra, Argonne National Lab.
125 *> Jeremy Du Croz, Nag Central Office.
126 *> Sven Hammarling, Nag Central Office.
127 *> Richard Hanson, Sandia National Labs.
130 * =====================================================================
131 SUBROUTINE ZGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
133 * -- Reference BLAS level2 routine (version 3.4.0) --
134 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
135 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
138 * .. Scalar Arguments ..
140 INTEGER INCX,INCY,LDA,M,N
142 * .. Array Arguments ..
143 COMPLEX*16 A(LDA,*),X(*),Y(*)
146 * =====================================================================
150 PARAMETER (ZERO= (0.0D+0,0.0D+0))
152 * .. Local Scalars ..
154 INTEGER I,INFO,IX,J,JY,KX
156 * .. External Subroutines ..
159 * .. Intrinsic Functions ..
163 * Test the input parameters.
168 ELSE IF (N.LT.0) THEN
170 ELSE IF (INCX.EQ.0) THEN
172 ELSE IF (INCY.EQ.0) THEN
174 ELSE IF (LDA.LT.MAX(1,M)) THEN
178 CALL XERBLA('ZGERC ',INFO)
182 * Quick return if possible.
184 IF ((M.EQ.0) .OR. (N.EQ.0) .OR. (ALPHA.EQ.ZERO)) RETURN
186 * Start the operations. In this version the elements of A are
187 * accessed sequentially with one pass through A.
196 IF (Y(JY).NE.ZERO) THEN
197 TEMP = ALPHA*DCONJG(Y(JY))
199 A(I,J) = A(I,J) + X(I)*TEMP
211 IF (Y(JY).NE.ZERO) THEN
212 TEMP = ALPHA*DCONJG(Y(JY))
215 A(I,J) = A(I,J) + X(IX)*TEMP