LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine clarz ( character SIDE, integer M, integer N, integer L, complex, dimension( * ) V, integer INCV, complex TAU, complex, dimension( ldc, * ) C, integer LDC, complex, dimension( * ) WORK )

CLARZ applies an elementary reflector (as returned by stzrzf) to a general matrix.

Download CLARZ + dependencies [TGZ] [ZIP] [TXT]

Purpose:
``` CLARZ applies a complex elementary reflector H to a complex
M-by-N matrix C, from either the left or the right. H is represented
in the form

H = I - tau * v * v**H

where tau is a complex scalar and v is a complex vector.

If tau = 0, then H is taken to be the unit matrix.

To apply H**H (the conjugate transpose of H), supply conjg(tau) instead
tau.

H is a product of k elementary reflectors as returned by CTZRZF.```
Parameters
 [in] SIDE ``` SIDE is CHARACTER*1 = 'L': form H * C = 'R': form C * H``` [in] M ``` M is INTEGER The number of rows of the matrix C.``` [in] N ``` N is INTEGER The number of columns of the matrix C.``` [in] L ``` L is INTEGER The number of entries of the vector V containing the meaningful part of the Householder vectors. If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.``` [in] V ``` V is COMPLEX array, dimension (1+(L-1)*abs(INCV)) The vector v in the representation of H as returned by CTZRZF. V is not used if TAU = 0.``` [in] INCV ``` INCV is INTEGER The increment between elements of v. INCV <> 0.``` [in] TAU ``` TAU is COMPLEX The value tau in the representation of H.``` [in,out] C ``` C is COMPLEX array, dimension (LDC,N) On entry, the M-by-N matrix C. On exit, C is overwritten by the matrix H * C if SIDE = 'L', or C * H if SIDE = 'R'.``` [in] LDC ``` LDC is INTEGER The leading dimension of the array C. LDC >= max(1,M).``` [out] WORK ``` WORK is COMPLEX array, dimension (N) if SIDE = 'L' or (M) if SIDE = 'R'```
Date
September 2012
Contributors:
A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
Further Details:
` `

Definition at line 149 of file clarz.f.

149 *
150 * -- LAPACK computational routine (version 3.4.2) --
151 * -- LAPACK is a software package provided by Univ. of Tennessee, --
152 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
153 * September 2012
154 *
155 * .. Scalar Arguments ..
156  CHARACTER side
157  INTEGER incv, l, ldc, m, n
158  COMPLEX tau
159 * ..
160 * .. Array Arguments ..
161  COMPLEX c( ldc, * ), v( * ), work( * )
162 * ..
163 *
164 * =====================================================================
165 *
166 * .. Parameters ..
167  COMPLEX one, zero
168  parameter ( one = ( 1.0e+0, 0.0e+0 ),
169  \$ zero = ( 0.0e+0, 0.0e+0 ) )
170 * ..
171 * .. External Subroutines ..
172  EXTERNAL caxpy, ccopy, cgemv, cgerc, cgeru, clacgv
173 * ..
174 * .. External Functions ..
175  LOGICAL lsame
176  EXTERNAL lsame
177 * ..
178 * .. Executable Statements ..
179 *
180  IF( lsame( side, 'L' ) ) THEN
181 *
182 * Form H * C
183 *
184  IF( tau.NE.zero ) THEN
185 *
186 * w( 1:n ) = conjg( C( 1, 1:n ) )
187 *
188  CALL ccopy( n, c, ldc, work, 1 )
189  CALL clacgv( n, work, 1 )
190 *
191 * w( 1:n ) = conjg( w( 1:n ) + C( m-l+1:m, 1:n )**H * v( 1:l ) )
192 *
193  CALL cgemv( 'Conjugate transpose', l, n, one, c( m-l+1, 1 ),
194  \$ ldc, v, incv, one, work, 1 )
195  CALL clacgv( n, work, 1 )
196 *
197 * C( 1, 1:n ) = C( 1, 1:n ) - tau * w( 1:n )
198 *
199  CALL caxpy( n, -tau, work, 1, c, ldc )
200 *
201 * C( m-l+1:m, 1:n ) = C( m-l+1:m, 1:n ) - ...
202 * tau * v( 1:l ) * w( 1:n )**H
203 *
204  CALL cgeru( l, n, -tau, v, incv, work, 1, c( m-l+1, 1 ),
205  \$ ldc )
206  END IF
207 *
208  ELSE
209 *
210 * Form C * H
211 *
212  IF( tau.NE.zero ) THEN
213 *
214 * w( 1:m ) = C( 1:m, 1 )
215 *
216  CALL ccopy( m, c, 1, work, 1 )
217 *
218 * w( 1:m ) = w( 1:m ) + C( 1:m, n-l+1:n, 1:n ) * v( 1:l )
219 *
220  CALL cgemv( 'No transpose', m, l, one, c( 1, n-l+1 ), ldc,
221  \$ v, incv, one, work, 1 )
222 *
223 * C( 1:m, 1 ) = C( 1:m, 1 ) - tau * w( 1:m )
224 *
225  CALL caxpy( m, -tau, work, 1, c, 1 )
226 *
227 * C( 1:m, n-l+1:n ) = C( 1:m, n-l+1:n ) - ...
228 * tau * w( 1:m ) * v( 1:l )**H
229 *
230  CALL cgerc( m, l, -tau, work, 1, v, incv, c( 1, n-l+1 ),
231  \$ ldc )
232 *
233  END IF
234 *
235  END IF
236 *
237  RETURN
238 *
239 * End of CLARZ
240 *
subroutine cgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
CGEMV
Definition: cgemv.f:160
subroutine cgerc(M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
CGERC
Definition: cgerc.f:132
subroutine ccopy(N, CX, INCX, CY, INCY)
CCOPY
Definition: ccopy.f:52
subroutine clacgv(N, X, INCX)
CLACGV conjugates a complex vector.
Definition: clacgv.f:76
subroutine cgeru(M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
CGERU
Definition: cgeru.f:132
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
Definition: caxpy.f:53
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function: