3 /* Table of constant values */
5 static doublereal c_b4 = 1.;
6 static doublereal c_b5 = 0.;
7 static integer c__1 = 1;
9 /* Subroutine */ int dlarf_(char *side, integer *m, integer *n, doublereal *v,
10 integer *incv, doublereal *tau, doublereal *c__, integer *ldc,
13 /* System generated locals */
14 integer c_dim1, c_offset;
18 extern /* Subroutine */ int dger_(integer *, integer *, doublereal *,
19 doublereal *, integer *, doublereal *, integer *, doublereal *,
21 extern logical lsame_(char *, char *);
22 extern /* Subroutine */ int dgemv_(char *, integer *, integer *,
23 doublereal *, doublereal *, integer *, doublereal *, integer *,
24 doublereal *, doublereal *, integer *);
27 /* -- LAPACK auxiliary routine (version 3.1) -- */
28 /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
31 /* .. Scalar Arguments .. */
33 /* .. Array Arguments .. */
39 /* DLARF applies a real elementary reflector H to a real m by n matrix */
40 /* C, from either the left or the right. H is represented in the form */
42 /* H = I - tau * v * v' */
44 /* where tau is a real scalar and v is a real vector. */
46 /* If tau = 0, then H is taken to be the unit matrix. */
51 /* SIDE (input) CHARACTER*1 */
52 /* = 'L': form H * C */
53 /* = 'R': form C * H */
55 /* M (input) INTEGER */
56 /* The number of rows of the matrix C. */
58 /* N (input) INTEGER */
59 /* The number of columns of the matrix C. */
61 /* V (input) DOUBLE PRECISION array, dimension */
62 /* (1 + (M-1)*abs(INCV)) if SIDE = 'L' */
63 /* or (1 + (N-1)*abs(INCV)) if SIDE = 'R' */
64 /* The vector v in the representation of H. V is not used if */
67 /* INCV (input) INTEGER */
68 /* The increment between elements of v. INCV <> 0. */
70 /* TAU (input) DOUBLE PRECISION */
71 /* The value tau in the representation of H. */
73 /* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) */
74 /* On entry, the m by n matrix C. */
75 /* On exit, C is overwritten by the matrix H * C if SIDE = 'L', */
76 /* or C * H if SIDE = 'R'. */
78 /* LDC (input) INTEGER */
79 /* The leading dimension of the array C. LDC >= max(1,M). */
81 /* WORK (workspace) DOUBLE PRECISION array, dimension */
82 /* (N) if SIDE = 'L' */
83 /* or (M) if SIDE = 'R' */
85 /* ===================================================================== */
87 /* .. Parameters .. */
89 /* .. External Subroutines .. */
91 /* .. External Functions .. */
93 /* .. Executable Statements .. */
95 /* Parameter adjustments */
98 c_offset = 1 + c_dim1;
103 if (lsame_(side, "L")) {
111 dgemv_("Transpose", m, n, &c_b4, &c__[c_offset], ldc, &v[1], incv,
112 &c_b5, &work[1], &c__1);
114 /* C := C - v * w' */
117 dger_(m, n, &d__1, &v[1], incv, &work[1], &c__1, &c__[c_offset],
128 dgemv_("No transpose", m, n, &c_b4, &c__[c_offset], ldc, &v[1],
129 incv, &c_b5, &work[1], &c__1);
131 /* C := C - w * v' */
134 dger_(m, n, &d__1, &work[1], &c__1, &v[1], incv, &c__[c_offset],