1 SUBROUTINE DGER ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA )
2 ! .. Scalar Arguments ..
4 INTEGER INCX, INCY, LDA, M, N
5 ! .. Array Arguments ..
6 DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
12 ! DGER performs the rank 1 operation
14 ! A := alpha*x*y' + A,
16 ! where alpha is a scalar, x is an m element vector, y is an n element
17 ! vector and A is an m by n matrix.
23 ! On entry, M specifies the number of rows of the matrix A.
24 ! M must be at least zero.
28 ! On entry, N specifies the number of columns of the matrix A.
29 ! N must be at least zero.
32 ! ALPHA - DOUBLE PRECISION.
33 ! On entry, ALPHA specifies the scalar alpha.
36 ! X - DOUBLE PRECISION array of dimension at least
37 ! ( 1 + ( m - 1 )*abs( INCX ) ).
38 ! Before entry, the incremented array X must contain the m
43 ! On entry, INCX specifies the increment for the elements of
44 ! X. INCX must not be zero.
47 ! Y - DOUBLE PRECISION array of dimension at least
48 ! ( 1 + ( n - 1 )*abs( INCY ) ).
49 ! Before entry, the incremented array Y must contain the n
54 ! On entry, INCY specifies the increment for the elements of
55 ! Y. INCY must not be zero.
58 ! A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
59 ! Before entry, the leading m by n part of the array A must
60 ! contain the matrix of coefficients. On exit, A is
61 ! overwritten by the updated matrix.
64 ! On entry, LDA specifies the first dimension of A as declared
65 ! in the calling (sub) program. LDA must be at least
70 ! Level 2 Blas routine.
72 ! -- Written on 22-October-1986.
73 ! Jack Dongarra, Argonne National Lab.
74 ! Jeremy Du Croz, Nag Central Office.
75 ! Sven Hammarling, Nag Central Office.
76 ! Richard Hanson, Sandia National Labs.
81 PARAMETER ( ZERO = 0.0D+0 )
84 INTEGER I, INFO, IX, J, JY, KX
85 ! .. External Subroutines ..
87 ! .. Intrinsic Functions ..
90 ! .. Executable Statements ..
92 ! Test the input parameters.
99 ELSE IF( INCX.EQ.0 )THEN
101 ELSE IF( INCY.EQ.0 )THEN
103 ELSE IF( LDA.LT.MAX( 1, M ) )THEN
107 CALL XERBLA( 'DGER ', INFO )
111 ! Quick return if possible.
113 IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) &
116 ! Start the operations. In this version the elements of A are
117 ! accessed sequentially with one pass through A.
122 JY = 1 - ( N - 1 )*INCY
126 IF( Y( JY ).NE.ZERO )THEN
129 A( I, J ) = A( I, J ) + X( I )*TEMP
138 KX = 1 - ( M - 1 )*INCX
141 IF( Y( JY ).NE.ZERO )THEN
145 A( I, J ) = A( I, J ) + X( IX )*TEMP