dtrmm.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 371 行 · 第 1/2 页
HTML
371 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dtrmm.f</title>
<meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!--
body { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.default { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.default a { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: underline; }
span.string { color: rgb(188, 143, 143); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.string a { color: rgb(188, 143, 143); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: underline; }
span.comment { color: rgb(178, 34, 34); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.comment a { color: rgb(178, 34, 34); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: underline; }
--></style>
</head>
<body>
<pre>
SUBROUTINE <a name="DTRMM.1"></a><a href="dtrmm.f.html#DTRMM.1">DTRMM</a>(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
<span class="comment">*</span><span class="comment"> .. Scalar Arguments ..
</span> DOUBLE PRECISION ALPHA
INTEGER LDA,LDB,M,N
CHARACTER DIAG,SIDE,TRANSA,UPLO
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> DOUBLE PRECISION A(LDA,*),B(LDB,*)
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Purpose
</span><span class="comment">*</span><span class="comment"> =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> <a name="DTRMM.14"></a><a href="dtrmm.f.html#DTRMM.1">DTRMM</a> performs one of the matrix-matrix operations
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> B := alpha*op( A )*B, or B := alpha*B*op( A ),
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> where alpha is a scalar, B is an m by n matrix, A is a unit, or
</span><span class="comment">*</span><span class="comment"> non-unit, upper or lower triangular matrix and op( A ) is one of
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> op( A ) = A or op( A ) = A'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Arguments
</span><span class="comment">*</span><span class="comment"> ==========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SIDE - CHARACTER*1.
</span><span class="comment">*</span><span class="comment"> On entry, SIDE specifies whether op( A ) multiplies B from
</span><span class="comment">*</span><span class="comment"> the left or right as follows:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SIDE = 'L' or 'l' B := alpha*op( A )*B.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SIDE = 'R' or 'r' B := alpha*B*op( A ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> UPLO - CHARACTER*1.
</span><span class="comment">*</span><span class="comment"> On entry, UPLO specifies whether the matrix A is an upper or
</span><span class="comment">*</span><span class="comment"> lower triangular matrix as follows:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> UPLO = 'U' or 'u' A is an upper triangular matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> UPLO = 'L' or 'l' A is a lower triangular matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> TRANSA - CHARACTER*1.
</span><span class="comment">*</span><span class="comment"> On entry, TRANSA specifies the form of op( A ) to be used in
</span><span class="comment">*</span><span class="comment"> the matrix multiplication as follows:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> TRANSA = 'N' or 'n' op( A ) = A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> TRANSA = 'T' or 't' op( A ) = A'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> TRANSA = 'C' or 'c' op( A ) = A'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DIAG - CHARACTER*1.
</span><span class="comment">*</span><span class="comment"> On entry, DIAG specifies whether or not A is unit triangular
</span><span class="comment">*</span><span class="comment"> as follows:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DIAG = 'U' or 'u' A is assumed to be unit triangular.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DIAG = 'N' or 'n' A is not assumed to be unit
</span><span class="comment">*</span><span class="comment"> triangular.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> M - INTEGER.
</span><span class="comment">*</span><span class="comment"> On entry, M specifies the number of rows of B. M must be at
</span><span class="comment">*</span><span class="comment"> least zero.
</span><span class="comment">*</span><span class="comment"> Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> N - INTEGER.
</span><span class="comment">*</span><span class="comment"> On entry, N specifies the number of columns of B. N must be
</span><span class="comment">*</span><span class="comment"> at least zero.
</span><span class="comment">*</span><span class="comment"> Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ALPHA - DOUBLE PRECISION.
</span><span class="comment">*</span><span class="comment"> On entry, ALPHA specifies the scalar alpha. When alpha is
</span><span class="comment">*</span><span class="comment"> zero then A is not referenced and B need not be set before
</span><span class="comment">*</span><span class="comment"> entry.
</span><span class="comment">*</span><span class="comment"> Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m
</span><span class="comment">*</span><span class="comment"> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
</span><span class="comment">*</span><span class="comment"> Before entry with UPLO = 'U' or 'u', the leading k by k
</span><span class="comment">*</span><span class="comment"> upper triangular part of the array A must contain the upper
</span><span class="comment">*</span><span class="comment"> triangular matrix and the strictly lower triangular part of
</span><span class="comment">*</span><span class="comment"> A is not referenced.
</span><span class="comment">*</span><span class="comment"> Before entry with UPLO = 'L' or 'l', the leading k by k
</span><span class="comment">*</span><span class="comment"> lower triangular part of the array A must contain the lower
</span><span class="comment">*</span><span class="comment"> triangular matrix and the strictly upper triangular part of
</span><span class="comment">*</span><span class="comment"> A is not referenced.
</span><span class="comment">*</span><span class="comment"> Note that when DIAG = 'U' or 'u', the diagonal elements of
</span><span class="comment">*</span><span class="comment"> A are not referenced either, but are assumed to be unity.
</span><span class="comment">*</span><span class="comment"> Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDA - INTEGER.
</span><span class="comment">*</span><span class="comment"> On entry, LDA specifies the first dimension of A as declared
</span><span class="comment">*</span><span class="comment"> in the calling (sub) program. When SIDE = 'L' or 'l' then
</span><span class="comment">*</span><span class="comment"> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
</span><span class="comment">*</span><span class="comment"> then LDA must be at least max( 1, n ).
</span><span class="comment">*</span><span class="comment"> Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> B - DOUBLE PRECISION array of DIMENSION ( LDB, n ).
</span><span class="comment">*</span><span class="comment"> Before entry, the leading m by n part of the array B must
</span><span class="comment">*</span><span class="comment"> contain the matrix B, and on exit is overwritten by the
</span><span class="comment">*</span><span class="comment"> transformed matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDB - INTEGER.
</span><span class="comment">*</span><span class="comment"> On entry, LDB specifies the first dimension of B as declared
</span><span class="comment">*</span><span class="comment"> in the calling (sub) program. LDB must be at least
</span><span class="comment">*</span><span class="comment"> max( 1, m ).
</span><span class="comment">*</span><span class="comment"> Unchanged on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Level 3 Blas routine.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- Written on 8-February-1989.
</span><span class="comment">*</span><span class="comment"> Jack Dongarra, Argonne National Laboratory.
</span><span class="comment">*</span><span class="comment"> Iain Duff, AERE Harwell.
</span><span class="comment">*</span><span class="comment"> Jeremy Du Croz, Numerical Algorithms Group Ltd.
</span><span class="comment">*</span><span class="comment"> Sven Hammarling, Numerical Algorithms Group Ltd.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> .. External Functions ..
</span> LOGICAL <a name="LSAME.128"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
EXTERNAL <a name="LSAME.129"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
</span> EXTERNAL <a name="XERBLA.132"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Intrinsic Functions ..
</span> INTRINSIC MAX
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Local Scalars ..
</span> DOUBLE PRECISION TEMP
INTEGER I,INFO,J,K,NROWA
LOGICAL LSIDE,NOUNIT,UPPER
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Parameters ..
</span> DOUBLE PRECISION ONE,ZERO
PARAMETER (ONE=1.0D+0,ZERO=0.0D+0)
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Test the input parameters.
</span><span class="comment">*</span><span class="comment">
</span> LSIDE = <a name="LSAME.149"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(SIDE,<span class="string">'L'</span>)
IF (LSIDE) THEN
NROWA = M
ELSE
NROWA = N
END IF
NOUNIT = <a name="LSAME.155"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(DIAG,<span class="string">'N'</span>)
UPPER = <a name="LSAME.156"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(UPLO,<span class="string">'U'</span>)
<span class="comment">*</span><span class="comment">
</span> INFO = 0
IF ((.NOT.LSIDE) .AND. (.NOT.<a name="LSAME.159"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(SIDE,<span class="string">'R'</span>))) THEN
INFO = 1
ELSE IF ((.NOT.UPPER) .AND. (.NOT.<a name="LSAME.161"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(UPLO,<span class="string">'L'</span>))) THEN
INFO = 2
ELSE IF ((.NOT.<a name="LSAME.163"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANSA,<span class="string">'N'</span>)) .AND.
+ (.NOT.<a name="LSAME.164"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANSA,<span class="string">'T'</span>)) .AND.
+ (.NOT.<a name="LSAME.165"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(TRANSA,<span class="string">'C'</span>))) THEN
INFO = 3
ELSE IF ((.NOT.<a name="LSAME.167"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(DIAG,<span class="string">'U'</span>)) .AND. (.NOT.<a name="LSAME.167"></a><a href="lsame.f.html#LSAME.1">LSAME</a>(DIAG,<span class="string">'N'</span>))) THEN
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?