dlascl.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 292 行 · 第 1/2 页
HTML
292 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dlascl.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="DLASCL.1"></a><a href="dlascl.f.html#DLASCL.1">DLASCL</a>( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK auxiliary routine (version 3.1) --
</span><span class="comment">*</span><span class="comment"> Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment"> November 2006
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> .. Scalar Arguments ..
</span> CHARACTER TYPE
INTEGER INFO, KL, KU, LDA, M, N
DOUBLE PRECISION CFROM, CTO
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> DOUBLE PRECISION A( LDA, * )
<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="DLASCL.19"></a><a href="dlascl.f.html#DLASCL.1">DLASCL</a> multiplies the M by N real matrix A by the real scalar
</span><span class="comment">*</span><span class="comment"> CTO/CFROM. This is done without over/underflow as long as the final
</span><span class="comment">*</span><span class="comment"> result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
</span><span class="comment">*</span><span class="comment"> A may be full, upper triangular, lower triangular, upper Hessenberg,
</span><span class="comment">*</span><span class="comment"> or banded.
</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"> TYPE (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> TYPE indices the storage type of the input matrix.
</span><span class="comment">*</span><span class="comment"> = 'G': A is a full matrix.
</span><span class="comment">*</span><span class="comment"> = 'L': A is a lower triangular matrix.
</span><span class="comment">*</span><span class="comment"> = 'U': A is an upper triangular matrix.
</span><span class="comment">*</span><span class="comment"> = 'H': A is an upper Hessenberg matrix.
</span><span class="comment">*</span><span class="comment"> = 'B': A is a symmetric band matrix with lower bandwidth KL
</span><span class="comment">*</span><span class="comment"> and upper bandwidth KU and with the only the lower
</span><span class="comment">*</span><span class="comment"> half stored.
</span><span class="comment">*</span><span class="comment"> = 'Q': A is a symmetric band matrix with lower bandwidth KL
</span><span class="comment">*</span><span class="comment"> and upper bandwidth KU and with the only the upper
</span><span class="comment">*</span><span class="comment"> half stored.
</span><span class="comment">*</span><span class="comment"> = 'Z': A is a band matrix with lower bandwidth KL and upper
</span><span class="comment">*</span><span class="comment"> bandwidth KU.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> KL (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The lower bandwidth of A. Referenced only if TYPE = 'B',
</span><span class="comment">*</span><span class="comment"> 'Q' or 'Z'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> KU (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The upper bandwidth of A. Referenced only if TYPE = 'B',
</span><span class="comment">*</span><span class="comment"> 'Q' or 'Z'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> CFROM (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> CTO (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
</span><span class="comment">*</span><span class="comment"> without over/underflow if the final result CTO*A(I,J)/CFROM
</span><span class="comment">*</span><span class="comment"> can be represented without over/underflow. CFROM must be
</span><span class="comment">*</span><span class="comment"> nonzero.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> M (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of rows of the matrix A. M >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> N (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of columns of the matrix A. N >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
</span><span class="comment">*</span><span class="comment"> The matrix to be multiplied by CTO/CFROM. See TYPE for the
</span><span class="comment">*</span><span class="comment"> storage type.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDA (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array A. LDA >= max(1,M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> INFO (output) INTEGER
</span><span class="comment">*</span><span class="comment"> 0 - successful exit
</span><span class="comment">*</span><span class="comment"> <0 - if INFO = -i, the i-th argument had an illegal value.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> .. Parameters ..
</span> DOUBLE PRECISION ZERO, ONE
PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Local Scalars ..
</span> LOGICAL DONE
INTEGER I, ITYPE, J, K1, K2, K3, K4
DOUBLE PRECISION BIGNUM, CFROM1, CFROMC, CTO1, CTOC, MUL, SMLNUM
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Functions ..
</span> LOGICAL <a name="LSAME.87"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
DOUBLE PRECISION <a name="DLAMCH.88"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>
EXTERNAL <a name="LSAME.89"></a><a href="lsame.f.html#LSAME.1">LSAME</a>, <a name="DLAMCH.89"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Intrinsic Functions ..
</span> INTRINSIC ABS, MAX, MIN
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
</span> EXTERNAL <a name="XERBLA.95"></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"> .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Test the input arguments
</span><span class="comment">*</span><span class="comment">
</span> INFO = 0
<span class="comment">*</span><span class="comment">
</span> IF( <a name="LSAME.103"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( TYPE, <span class="string">'G'</span> ) ) THEN
ITYPE = 0
ELSE IF( <a name="LSAME.105"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( TYPE, <span class="string">'L'</span> ) ) THEN
ITYPE = 1
ELSE IF( <a name="LSAME.107"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( TYPE, <span class="string">'U'</span> ) ) THEN
ITYPE = 2
ELSE IF( <a name="LSAME.109"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( TYPE, <span class="string">'H'</span> ) ) THEN
ITYPE = 3
ELSE IF( <a name="LSAME.111"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( TYPE, <span class="string">'B'</span> ) ) THEN
ITYPE = 4
ELSE IF( <a name="LSAME.113"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( TYPE, <span class="string">'Q'</span> ) ) THEN
ITYPE = 5
ELSE IF( <a name="LSAME.115"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( TYPE, <span class="string">'Z'</span> ) ) THEN
ITYPE = 6
ELSE
ITYPE = -1
END IF
<span class="comment">*</span><span class="comment">
</span> IF( ITYPE.EQ.-1 ) THEN
INFO = -1
ELSE IF( CFROM.EQ.ZERO ) THEN
INFO = -4
ELSE IF( M.LT.0 ) THEN
INFO = -6
ELSE IF( N.LT.0 .OR. ( ITYPE.EQ.4 .AND. N.NE.M ) .OR.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?