LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine zunmr3 ( character  SIDE,
character  TRANS,
integer  M,
integer  N,
integer  K,
integer  L,
complex*16, dimension( lda, * )  A,
integer  LDA,
complex*16, dimension( * )  TAU,
complex*16, dimension( ldc, * )  C,
integer  LDC,
complex*16, dimension( * )  WORK,
integer  INFO 
)

ZUNMR3 multiplies a general matrix by the unitary matrix from a RZ factorization determined by ctzrzf (unblocked algorithm).

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

Purpose:
 ZUNMR3 overwrites the general complex m by n matrix C with

       Q * C  if SIDE = 'L' and TRANS = 'N', or

       Q**H* C  if SIDE = 'L' and TRANS = 'C', or

       C * Q  if SIDE = 'R' and TRANS = 'N', or

       C * Q**H if SIDE = 'R' and TRANS = 'C',

 where Q is a complex unitary matrix defined as the product of k
 elementary reflectors

       Q = H(1) H(2) . . . H(k)

 as returned by ZTZRZF. Q is of order m if SIDE = 'L' and of order n
 if SIDE = 'R'.
Parameters
[in]SIDE
          SIDE is CHARACTER*1
          = 'L': apply Q or Q**H from the Left
          = 'R': apply Q or Q**H from the Right
[in]TRANS
          TRANS is CHARACTER*1
          = 'N': apply Q  (No transpose)
          = 'C': apply Q**H (Conjugate transpose)
[in]M
          M is INTEGER
          The number of rows of the matrix C. M >= 0.
[in]N
          N is INTEGER
          The number of columns of the matrix C. N >= 0.
[in]K
          K is INTEGER
          The number of elementary reflectors whose product defines
          the matrix Q.
          If SIDE = 'L', M >= K >= 0;
          if SIDE = 'R', N >= K >= 0.
[in]L
          L is INTEGER
          The number of columns of the matrix A containing
          the meaningful part of the Householder reflectors.
          If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
[in]A
          A is COMPLEX*16 array, dimension
                               (LDA,M) if SIDE = 'L',
                               (LDA,N) if SIDE = 'R'
          The i-th row must contain the vector which defines the
          elementary reflector H(i), for i = 1,2,...,k, as returned by
          ZTZRZF in the last k rows of its array argument A.
          A is modified by the routine but restored on exit.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A. LDA >= max(1,K).
[in]TAU
          TAU is COMPLEX*16 array, dimension (K)
          TAU(i) must contain the scalar factor of the elementary
          reflector H(i), as returned by ZTZRZF.
[in,out]C
          C is COMPLEX*16 array, dimension (LDC,N)
          On entry, the m-by-n matrix C.
          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
[in]LDC
          LDC is INTEGER
          The leading dimension of the array C. LDC >= max(1,M).
[out]WORK
          WORK is COMPLEX*16 array, dimension
                                   (N) if SIDE = 'L',
                                   (M) if SIDE = 'R'
[out]INFO
          INFO is INTEGER
          = 0: successful exit
          < 0: if INFO = -i, the i-th argument had an illegal value
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
September 2012
Contributors:
A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
Further Details:
 

Definition at line 180 of file zunmr3.f.

180 *
181 * -- LAPACK computational routine (version 3.4.2) --
182 * -- LAPACK is a software package provided by Univ. of Tennessee, --
183 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
184 * September 2012
185 *
186 * .. Scalar Arguments ..
187  CHARACTER side, trans
188  INTEGER info, k, l, lda, ldc, m, n
189 * ..
190 * .. Array Arguments ..
191  COMPLEX*16 a( lda, * ), c( ldc, * ), tau( * ), work( * )
192 * ..
193 *
194 * =====================================================================
195 *
196 * .. Local Scalars ..
197  LOGICAL left, notran
198  INTEGER i, i1, i2, i3, ic, ja, jc, mi, ni, nq
199  COMPLEX*16 taui
200 * ..
201 * .. External Functions ..
202  LOGICAL lsame
203  EXTERNAL lsame
204 * ..
205 * .. External Subroutines ..
206  EXTERNAL xerbla, zlarz
207 * ..
208 * .. Intrinsic Functions ..
209  INTRINSIC dconjg, max
210 * ..
211 * .. Executable Statements ..
212 *
213 * Test the input arguments
214 *
215  info = 0
216  left = lsame( side, 'L' )
217  notran = lsame( trans, 'N' )
218 *
219 * NQ is the order of Q
220 *
221  IF( left ) THEN
222  nq = m
223  ELSE
224  nq = n
225  END IF
226  IF( .NOT.left .AND. .NOT.lsame( side, 'R' ) ) THEN
227  info = -1
228  ELSE IF( .NOT.notran .AND. .NOT.lsame( trans, 'C' ) ) THEN
229  info = -2
230  ELSE IF( m.LT.0 ) THEN
231  info = -3
232  ELSE IF( n.LT.0 ) THEN
233  info = -4
234  ELSE IF( k.LT.0 .OR. k.GT.nq ) THEN
235  info = -5
236  ELSE IF( l.LT.0 .OR. ( left .AND. ( l.GT.m ) ) .OR.
237  $ ( .NOT.left .AND. ( l.GT.n ) ) ) THEN
238  info = -6
239  ELSE IF( lda.LT.max( 1, k ) ) THEN
240  info = -8
241  ELSE IF( ldc.LT.max( 1, m ) ) THEN
242  info = -11
243  END IF
244  IF( info.NE.0 ) THEN
245  CALL xerbla( 'ZUNMR3', -info )
246  RETURN
247  END IF
248 *
249 * Quick return if possible
250 *
251  IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
252  $ RETURN
253 *
254  IF( ( left .AND. .NOT.notran .OR. .NOT.left .AND. notran ) ) THEN
255  i1 = 1
256  i2 = k
257  i3 = 1
258  ELSE
259  i1 = k
260  i2 = 1
261  i3 = -1
262  END IF
263 *
264  IF( left ) THEN
265  ni = n
266  ja = m - l + 1
267  jc = 1
268  ELSE
269  mi = m
270  ja = n - l + 1
271  ic = 1
272  END IF
273 *
274  DO 10 i = i1, i2, i3
275  IF( left ) THEN
276 *
277 * H(i) or H(i)**H is applied to C(i:m,1:n)
278 *
279  mi = m - i + 1
280  ic = i
281  ELSE
282 *
283 * H(i) or H(i)**H is applied to C(1:m,i:n)
284 *
285  ni = n - i + 1
286  jc = i
287  END IF
288 *
289 * Apply H(i) or H(i)**H
290 *
291  IF( notran ) THEN
292  taui = tau( i )
293  ELSE
294  taui = dconjg( tau( i ) )
295  END IF
296  CALL zlarz( side, mi, ni, l, a( i, ja ), lda, taui,
297  $ c( ic, jc ), ldc, work )
298 *
299  10 CONTINUE
300 *
301  RETURN
302 *
303 * End of ZUNMR3
304 *
subroutine zlarz(SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK)
ZLARZ applies an elementary reflector (as returned by stzrzf) to a general matrix.
Definition: zlarz.f:149
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
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: