1 SUBROUTINE DLARF
( SIDE
, M
, N
, V
, INCV
, TAU
, C
, LDC
, WORK
)
3 * -- LAPACK auxiliary routine
(version
3.1) --
4 * Univ
. of Tennessee
, Univ
. of California Berkeley and NAG Ltd
..
7 * .. Scalar Arguments
..
9 INTEGER INCV
, LDC
, M
, N
12 * .. Array Arguments
..
13 DOUBLE PRECISION C
( LDC
, * ), V
( * ), WORK
( * )
19 * DLARF applies a
real elementary reflector H
to a
real m by n matrix
20 * C
, from either the left or the right
. H is represented in the form
22 * H
= I
- tau
* v
* v
'
24 * where tau is a real scalar and v is a real vector.
26 * If tau = 0, then H is taken to be the unit matrix.
31 * SIDE (input) CHARACTER*1
36 * The number of rows of the matrix C.
39 * The number of columns of the matrix C.
41 * V (input) DOUBLE PRECISION array, dimension
42 * (1 + (M-1)*abs(INCV)) if SIDE = 'L
'
43 * or (1 + (N-1)*abs(INCV)) if SIDE = 'R
'
44 * The vector v in the representation of H. V is not used if
47 * INCV (input) INTEGER
48 * The increment between elements of v. INCV <> 0.
50 * TAU (input) DOUBLE PRECISION
51 * The value tau in the representation of H.
53 * C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
54 * On entry, the m by n matrix C.
55 * On exit, C is overwritten by the matrix H * C if SIDE = 'L
',
56 * or C * H if SIDE = 'R
'.
59 * The leading dimension of the array C. LDC >= max(1,M).
61 * WORK (workspace) DOUBLE PRECISION array, dimension
63 * or (M) if SIDE = 'R
'
65 * =====================================================================
68 DOUBLE PRECISION ONE, ZERO
69 PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
71 * .. External Subroutines ..
74 * .. External Functions ..
78 * .. Executable Statements ..
80 IF( LSAME( SIDE, 'L
' ) ) THEN
84 IF( TAU.NE.ZERO ) THEN
88 CALL DGEMV
( 'Transpose', M
, N
, ONE
, C
, LDC
, V
, INCV
, ZERO
,
93 CALL DGER( M, N, -TAU, V, INCV, WORK, 1, C, LDC )
99 IF( TAU.NE.ZERO ) THEN
103 CALL DGEMV( 'No transpose
', M, N, ONE, C, LDC, V, INCV,
108 CALL DGER
( M
, N
, -TAU
, WORK
, 1, V
, INCV
, C
, LDC
)