3 /* Subroutine */ int dger_(integer *m, integer *n, doublereal *alpha,
4 doublereal *x, integer *incx, doublereal *y, integer *incy,
5 doublereal *a, integer *lda)
7 /* System generated locals */
8 integer a_dim1, a_offset, i__1, i__2;
11 integer i__, j, ix, jy, kx, info;
13 extern /* Subroutine */ int xerbla_(char *, integer *);
15 /* .. Scalar Arguments .. */
17 /* .. Array Arguments .. */
23 /* DGER performs the rank 1 operation */
25 /* A := alpha*x*y' + A, */
27 /* where alpha is a scalar, x is an m element vector, y is an n element */
28 /* vector and A is an m by n matrix. */
34 /* On entry, M specifies the number of rows of the matrix A. */
35 /* M must be at least zero. */
36 /* Unchanged on exit. */
39 /* On entry, N specifies the number of columns of the matrix A. */
40 /* N must be at least zero. */
41 /* Unchanged on exit. */
43 /* ALPHA - DOUBLE PRECISION. */
44 /* On entry, ALPHA specifies the scalar alpha. */
45 /* Unchanged on exit. */
47 /* X - DOUBLE PRECISION array of dimension at least */
48 /* ( 1 + ( m - 1 )*abs( INCX ) ). */
49 /* Before entry, the incremented array X must contain the m */
50 /* element vector x. */
51 /* Unchanged on exit. */
54 /* On entry, INCX specifies the increment for the elements of */
55 /* X. INCX must not be zero. */
56 /* Unchanged on exit. */
58 /* Y - DOUBLE PRECISION array of dimension at least */
59 /* ( 1 + ( n - 1 )*abs( INCY ) ). */
60 /* Before entry, the incremented array Y must contain the n */
61 /* element vector y. */
62 /* Unchanged on exit. */
65 /* On entry, INCY specifies the increment for the elements of */
66 /* Y. INCY must not be zero. */
67 /* Unchanged on exit. */
69 /* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). */
70 /* Before entry, the leading m by n part of the array A must */
71 /* contain the matrix of coefficients. On exit, A is */
72 /* overwritten by the updated matrix. */
75 /* On entry, LDA specifies the first dimension of A as declared */
76 /* in the calling (sub) program. LDA must be at least */
78 /* Unchanged on exit. */
81 /* Level 2 Blas routine. */
83 /* -- Written on 22-October-1986. */
84 /* Jack Dongarra, Argonne National Lab. */
85 /* Jeremy Du Croz, Nag Central Office. */
86 /* Sven Hammarling, Nag Central Office. */
87 /* Richard Hanson, Sandia National Labs. */
90 /* .. Parameters .. */
92 /* .. Local Scalars .. */
94 /* .. External Subroutines .. */
96 /* .. Intrinsic Functions .. */
99 /* Test the input parameters. */
101 /* Parameter adjustments */
105 a_offset = 1 + a_dim1;
114 } else if (*incx == 0) {
116 } else if (*incy == 0) {
118 } else if (*lda < max(1,*m)) {
122 xerbla_("DGER ", &info);
126 /* Quick return if possible. */
128 if (*m == 0 || *n == 0 || *alpha == 0.) {
132 /* Start the operations. In this version the elements of A are */
133 /* accessed sequentially with one pass through A. */
138 jy = 1 - (*n - 1) * *incy;
142 for (j = 1; j <= i__1; ++j) {
144 temp = *alpha * y[jy];
146 for (i__ = 1; i__ <= i__2; ++i__) {
147 a[i__ + j * a_dim1] += x[i__] * temp;
158 kx = 1 - (*m - 1) * *incx;
161 for (j = 1; j <= i__1; ++j) {
163 temp = *alpha * y[jy];
166 for (i__ = 1; i__ <= i__2; ++i__) {
167 a[i__ + j * a_dim1] += x[ix] * temp;