Diff for /rpl/lapack/blas/ztrsm.f between versions 1.3 and 1.16

version 1.3, 2010/08/06 15:32:22 version 1.16, 2023/08/07 08:38:46
Line 1 Line 1
       SUBROUTINE ZTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)  *> \brief \b ZTRSM
 *     .. Scalar Arguments ..  
       DOUBLE COMPLEX ALPHA  
       INTEGER LDA,LDB,M,N  
       CHARACTER DIAG,SIDE,TRANSA,UPLO  
 *     ..  
 *     .. Array Arguments ..  
       DOUBLE COMPLEX A(LDA,*),B(LDB,*)  
 *     ..  
 *  
 *  Purpose  
 *  =======  
 *  
 *  ZTRSM  solves one of the matrix equations  
 *  *
 *     op( A )*X = alpha*B,   or   X*op( A ) = alpha*B,  *  =========== DOCUMENTATION ===========
 *  *
 *  where alpha is a scalar, X and B are m by n matrices, A is a unit, or  * Online html documentation available at
 *  non-unit,  upper or lower triangular matrix  and  op( A )  is one  of  *            http://www.netlib.org/lapack/explore-html/
 *  *
 *     op( A ) = A   or   op( A ) = A'   or   op( A ) = conjg( A' ).  *  Definition:
   *  ===========
   *
   *       SUBROUTINE ZTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
   *
   *       .. Scalar Arguments ..
   *       COMPLEX*16 ALPHA
   *       INTEGER LDA,LDB,M,N
   *       CHARACTER DIAG,SIDE,TRANSA,UPLO
   *       ..
   *       .. Array Arguments ..
   *       COMPLEX*16 A(LDA,*),B(LDB,*)
   *       ..
   *
   *
   *> \par Purpose:
   *  =============
   *>
   *> \verbatim
   *>
   *> ZTRSM  solves one of the matrix equations
   *>
   *>    op( A )*X = alpha*B,   or   X*op( A ) = alpha*B,
   *>
   *> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
   *> non-unit,  upper or lower triangular matrix  and  op( A )  is one  of
   *>
   *>    op( A ) = A   or   op( A ) = A**T   or   op( A ) = A**H.
   *>
   *> The matrix X is overwritten on B.
   *> \endverbatim
 *  *
 *  The matrix X is overwritten on B.  *  Arguments:
 *  
 *  Arguments  
 *  ==========  *  ==========
 *  *
 *  SIDE   - CHARACTER*1.  *> \param[in] SIDE
 *           On entry, SIDE specifies whether op( A ) appears on the left  *> \verbatim
 *           or right of X as follows:  *>          SIDE is CHARACTER*1
 *  *>           On entry, SIDE specifies whether op( A ) appears on the left
 *              SIDE = 'L' or 'l'   op( A )*X = alpha*B.  *>           or right of X as follows:
 *  *>
 *              SIDE = 'R' or 'r'   X*op( A ) = alpha*B.  *>              SIDE = 'L' or 'l'   op( A )*X = alpha*B.
 *  *>
 *           Unchanged on exit.  *>              SIDE = 'R' or 'r'   X*op( A ) = alpha*B.
 *  *> \endverbatim
 *  UPLO   - CHARACTER*1.  *>
 *           On entry, UPLO specifies whether the matrix A is an upper or  *> \param[in] UPLO
 *           lower triangular matrix as follows:  *> \verbatim
 *  *>          UPLO is CHARACTER*1
 *              UPLO = 'U' or 'u'   A is an upper triangular matrix.  *>           On entry, UPLO specifies whether the matrix A is an upper or
 *  *>           lower triangular matrix as follows:
 *              UPLO = 'L' or 'l'   A is a lower triangular matrix.  *>
 *  *>              UPLO = 'U' or 'u'   A is an upper triangular matrix.
 *           Unchanged on exit.  *>
 *  *>              UPLO = 'L' or 'l'   A is a lower triangular matrix.
 *  TRANSA - CHARACTER*1.  *> \endverbatim
 *           On entry, TRANSA specifies the form of op( A ) to be used in  *>
 *           the matrix multiplication as follows:  *> \param[in] TRANSA
 *  *> \verbatim
 *              TRANSA = 'N' or 'n'   op( A ) = A.  *>          TRANSA is CHARACTER*1
 *  *>           On entry, TRANSA specifies the form of op( A ) to be used in
 *              TRANSA = 'T' or 't'   op( A ) = A'.  *>           the matrix multiplication as follows:
 *  *>
 *              TRANSA = 'C' or 'c'   op( A ) = conjg( A' ).  *>              TRANSA = 'N' or 'n'   op( A ) = A.
 *  *>
 *           Unchanged on exit.  *>              TRANSA = 'T' or 't'   op( A ) = A**T.
 *  *>
 *  DIAG   - CHARACTER*1.  *>              TRANSA = 'C' or 'c'   op( A ) = A**H.
 *           On entry, DIAG specifies whether or not A is unit triangular  *> \endverbatim
 *           as follows:  *>
 *  *> \param[in] DIAG
 *              DIAG = 'U' or 'u'   A is assumed to be unit triangular.  *> \verbatim
 *  *>          DIAG is CHARACTER*1
 *              DIAG = 'N' or 'n'   A is not assumed to be unit  *>           On entry, DIAG specifies whether or not A is unit triangular
 *                                  triangular.  *>           as follows:
 *  *>
 *           Unchanged on exit.  *>              DIAG = 'U' or 'u'   A is assumed to be unit triangular.
 *  *>
 *  M      - INTEGER.  *>              DIAG = 'N' or 'n'   A is not assumed to be unit
 *           On entry, M specifies the number of rows of B. M must be at  *>                                  triangular.
 *           least zero.  *> \endverbatim
 *           Unchanged on exit.  *>
 *  *> \param[in] M
 *  N      - INTEGER.  *> \verbatim
 *           On entry, N specifies the number of columns of B.  N must be  *>          M is INTEGER
 *           at least zero.  *>           On entry, M specifies the number of rows of B. M must be at
 *           Unchanged on exit.  *>           least zero.
 *  *> \endverbatim
 *  ALPHA  - COMPLEX*16      .  *>
 *           On entry,  ALPHA specifies the scalar  alpha. When  alpha is  *> \param[in] N
 *           zero then  A is not referenced and  B need not be set before  *> \verbatim
 *           entry.  *>          N is INTEGER
 *           Unchanged on exit.  *>           On entry, N specifies the number of columns of B.  N must be
 *  *>           at least zero.
 *  A      - COMPLEX*16       array of DIMENSION ( LDA, k ), where k is m  *> \endverbatim
 *           when  SIDE = 'L' or 'l'  and is  n  when  SIDE = 'R' or 'r'.  *>
 *           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k  *> \param[in] ALPHA
 *           upper triangular part of the array  A must contain the upper  *> \verbatim
 *           triangular matrix  and the strictly lower triangular part of  *>          ALPHA is COMPLEX*16
 *           A is not referenced.  *>           On entry,  ALPHA specifies the scalar  alpha. When  alpha is
 *           Before entry  with  UPLO = 'L' or 'l',  the  leading  k by k  *>           zero then  A is not referenced and  B need not be set before
 *           lower triangular part of the array  A must contain the lower  *>           entry.
 *           triangular matrix  and the strictly upper triangular part of  *> \endverbatim
 *           A is not referenced.  *>
 *           Note that when  DIAG = 'U' or 'u',  the diagonal elements of  *> \param[in] A
 *           A  are not referenced either,  but are assumed to be  unity.  *> \verbatim
 *           Unchanged on exit.  *>          A is COMPLEX*16 array, dimension ( LDA, k ),
 *  *>           where k is m when SIDE = 'L' or 'l'
 *  LDA    - INTEGER.  *>             and k is n when SIDE = 'R' or 'r'.
 *           On entry, LDA specifies the first dimension of A as declared  *>           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k
 *           in the calling (sub) program.  When  SIDE = 'L' or 'l'  then  *>           upper triangular part of the array  A must contain the upper
 *           LDA  must be at least  max( 1, m ),  when  SIDE = 'R' or 'r'  *>           triangular matrix  and the strictly lower triangular part of
 *           then LDA must be at least max( 1, n ).  *>           A is not referenced.
 *           Unchanged on exit.  *>           Before entry  with  UPLO = 'L' or 'l',  the  leading  k by k
 *  *>           lower triangular part of the array  A must contain the lower
 *  B      - COMPLEX*16       array of DIMENSION ( LDB, n ).  *>           triangular matrix  and the strictly upper triangular part of
 *           Before entry,  the leading  m by n part of the array  B must  *>           A is not referenced.
 *           contain  the  right-hand  side  matrix  B,  and  on exit  is  *>           Note that when  DIAG = 'U' or 'u',  the diagonal elements of
 *           overwritten by the solution matrix  X.  *>           A  are not referenced either,  but are assumed to be  unity.
 *  *> \endverbatim
 *  LDB    - INTEGER.  *>
 *           On entry, LDB specifies the first dimension of B as declared  *> \param[in] LDA
 *           in  the  calling  (sub)  program.   LDB  must  be  at  least  *> \verbatim
 *           max( 1, m ).  *>          LDA is INTEGER
 *           Unchanged on exit.  *>           On entry, LDA specifies the first dimension of A as declared
 *  *>           in the calling (sub) program.  When  SIDE = 'L' or 'l'  then
 *  Further Details  *>           LDA  must be at least  max( 1, m ),  when  SIDE = 'R' or 'r'
 *  ===============  *>           then LDA must be at least max( 1, n ).
   *> \endverbatim
   *>
   *> \param[in,out] B
   *> \verbatim
   *>          B is COMPLEX*16 array, dimension ( LDB, N )
   *>           Before entry,  the leading  m by n part of the array  B must
   *>           contain  the  right-hand  side  matrix  B,  and  on exit  is
   *>           overwritten by the solution matrix  X.
   *> \endverbatim
   *>
   *> \param[in] LDB
   *> \verbatim
   *>          LDB is INTEGER
   *>           On entry, LDB specifies the first dimension of B as declared
   *>           in  the  calling  (sub)  program.   LDB  must  be  at  least
   *>           max( 1, m ).
   *> \endverbatim
   *
   *  Authors:
   *  ========
   *
   *> \author Univ. of Tennessee
   *> \author Univ. of California Berkeley
   *> \author Univ. of Colorado Denver
   *> \author NAG Ltd.
   *
   *> \ingroup complex16_blas_level3
   *
   *> \par Further Details:
   *  =====================
   *>
   *> \verbatim
   *>
   *>  Level 3 Blas routine.
   *>
   *>  -- Written on 8-February-1989.
   *>     Jack Dongarra, Argonne National Laboratory.
   *>     Iain Duff, AERE Harwell.
   *>     Jeremy Du Croz, Numerical Algorithms Group Ltd.
   *>     Sven Hammarling, Numerical Algorithms Group Ltd.
   *> \endverbatim
   *>
   *  =====================================================================
         SUBROUTINE ZTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
 *  *
 *  Level 3 Blas routine.  *  -- Reference BLAS level3 routine --
   *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
   *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *  *
 *  -- Written on 8-February-1989.  *     .. Scalar Arguments ..
 *     Jack Dongarra, Argonne National Laboratory.        COMPLEX*16 ALPHA
 *     Iain Duff, AERE Harwell.        INTEGER LDA,LDB,M,N
 *     Jeremy Du Croz, Numerical Algorithms Group Ltd.        CHARACTER DIAG,SIDE,TRANSA,UPLO
 *     Sven Hammarling, Numerical Algorithms Group Ltd.  *     ..
   *     .. Array Arguments ..
         COMPLEX*16 A(LDA,*),B(LDB,*)
   *     ..
 *  *
 *  =====================================================================  *  =====================================================================
 *  *
Line 140 Line 204
       INTRINSIC DCONJG,MAX        INTRINSIC DCONJG,MAX
 *     ..  *     ..
 *     .. Local Scalars ..  *     .. Local Scalars ..
       DOUBLE COMPLEX TEMP        COMPLEX*16 TEMP
       INTEGER I,INFO,J,K,NROWA        INTEGER I,INFO,J,K,NROWA
       LOGICAL LSIDE,NOCONJ,NOUNIT,UPPER        LOGICAL LSIDE,NOCONJ,NOUNIT,UPPER
 *     ..  *     ..
 *     .. Parameters ..  *     .. Parameters ..
       DOUBLE COMPLEX ONE        COMPLEX*16 ONE
       PARAMETER (ONE= (1.0D+0,0.0D+0))        PARAMETER (ONE= (1.0D+0,0.0D+0))
       DOUBLE COMPLEX ZERO        COMPLEX*16 ZERO
       PARAMETER (ZERO= (0.0D+0,0.0D+0))        PARAMETER (ZERO= (0.0D+0,0.0D+0))
 *     ..  *     ..
 *  *
Line 245 Line 309
               END IF                END IF
           ELSE            ELSE
 *  *
 *           Form  B := alpha*inv( A' )*B  *           Form  B := alpha*inv( A**T )*B
 *           or    B := alpha*inv( conjg( A' ) )*B.  *           or    B := alpha*inv( A**H )*B.
 *  *
               IF (UPPER) THEN                IF (UPPER) THEN
                   DO 140 J = 1,N                    DO 140 J = 1,N
Line 336 Line 400
               END IF                END IF
           ELSE            ELSE
 *  *
 *           Form  B := alpha*B*inv( A' )  *           Form  B := alpha*B*inv( A**T )
 *           or    B := alpha*B*inv( conjg( A' ) ).  *           or    B := alpha*B*inv( A**H ).
 *  *
               IF (UPPER) THEN                IF (UPPER) THEN
                   DO 330 K = N,1,-1                    DO 330 K = N,1,-1
Line 405 Line 469
 *  *
       RETURN        RETURN
 *  *
 *     End of ZTRSM .  *     End of ZTRSM
 *  *
       END        END

Removed from v.1.3  
changed lines
  Added in v.1.16


CVSweb interface <joel.bertrand@systella.fr>