## MB01UW

### Computation of matrix expressions alpha H A or alpha A H, over A, H Hessenberg matrix

[Specification] [Arguments] [Method] [References] [Comments] [Example]

Purpose

      To compute one of the matrix products

         A : = alpha*op( H ) * A, or A : = alpha*A * op( H ),

      where alpha is a scalar, A is an m-by-n matrix, H is an upper
      Hessenberg matrix, and op( H ) is one of

         op( H ) = H   or   op( H ) = H',  the transpose of H.

Specification

          SUBROUTINE MB01UW( SIDE, TRANS, M, N, ALPHA, H, LDH, A, LDA,
         $                   DWORK, LDWORK, INFO )
    C     .. Scalar Arguments ..
          CHARACTER         SIDE, TRANS
          INTEGER           INFO, LDA, LDH, LDWORK, M, N
          DOUBLE PRECISION  ALPHA
    C     .. Array Arguments ..
          DOUBLE PRECISION  A(LDA,*), DWORK(*), H(LDH,*)

Arguments

Mode Parameters

      SIDE    CHARACTER*1
              Specifies whether the Hessenberg matrix H appears on the
              left or right in the matrix product as follows:
              = 'L':  A := alpha*op( H ) * A;
              = 'R':  A := alpha*A * op( H ).

      TRANS   CHARACTER*1
              Specifies the form of op( H ) to be used in the matrix
              multiplication as follows:
              = 'N':  op( H ) = H;
              = 'T':  op( H ) = H';
              = 'C':  op( H ) = H'.

Input/Output Parameters

      M       (input) INTEGER
              The number of rows of the matrix A.  M >= 0.

      N       (input) INTEGER
              The number of columns of the matrix A.  N >= 0.

      ALPHA   (input) DOUBLE PRECISION
              The scalar alpha. When alpha is zero then H is not
              referenced and A need not be set before entry.

      H       (input) DOUBLE PRECISION array, dimension (LDH,k)
              where k is M when SIDE = 'L' and is N when SIDE = 'R'.
              On entry with SIDE = 'L', the leading M-by-M upper
              Hessenberg part of this array must contain the upper
              Hessenberg matrix H.
              On entry with SIDE = 'R', the leading N-by-N upper
              Hessenberg part of this array must contain the upper
              Hessenberg matrix H.
              The elements below the subdiagonal are not referenced,
              except possibly for those in the first column, which
              could be overwritten, but are restored on exit.

      LDH     INTEGER
              The leading dimension of the array H.  LDH >= max(1,k),
              where k is M when SIDE = 'L' and is N when SIDE = 'R'.

      A       (input/output) DOUBLE PRECISION array, dimension (LDA,N)
              On entry, the leading M-by-N part of this array must
              contain the matrix A.
              On exit, the leading M-by-N part of this array contains
              the computed product.

      LDA     INTEGER
              The leading dimension of the array A.  LDA >= max(1,M).

Workspace

      DWORK   DOUBLE PRECISION array, dimension (LDWORK)
              On exit, if INFO = 0, alpha <> 0, and LDWORK >= M*N > 0,
              DWORK contains a copy of the matrix A, having the leading
              dimension M.
              This array is not referenced when alpha = 0.

      LDWORK  The length of the array DWORK.
              LDWORK >= 0,   if  alpha =  0 or MIN(M,N) = 0;
              LDWORK >= M-1, if  SIDE  = 'L';
              LDWORK >= N-1, if  SIDE  = 'R'.
              For maximal efficiency LDWORK should be at least M*N.

Error Indicator

      INFO    INTEGER
              = 0:  successful exit;
              < 0:  if INFO = -i, the i-th argument had an illegal
                    value.

Method

      The required matrix product is computed in two steps. In the first
      step, the upper triangle of H is used; in the second step, the
      contribution of the subdiagonal is added. If the workspace can
      accomodate a copy of A, a fast BLAS 3 DTRMM operation is used in
      the first step.

Further Comments

      None

Example

Program Text

      None

Program Data

      None

Program Results

      None

Return to Supporting Routines index