zlag2c.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 118 行
HTML
118 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>zlag2c.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="ZLAG2C.1"></a><a href="zlag2c.f.html#ZLAG2C.1">ZLAG2C</a>( M, N, A, LDA, SA, LDSA, INFO)
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK PROTOTYPE auxilary routine (version 3.1.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"> January 2007
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. WARNING: PROTOTYPE ..
</span><span class="comment">*</span><span class="comment"> This is an LAPACK PROTOTYPE routine which means that the
</span><span class="comment">*</span><span class="comment"> interface of this routine is likely to be changed in the future
</span><span class="comment">*</span><span class="comment"> based on community feedback.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Scalar Arguments ..
</span> INTEGER INFO,LDA,LDSA,M,N
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> COMPLEX SA(LDSA,*)
COMPLEX*16 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="ZLAG2C.25"></a><a href="zlag2c.f.html#ZLAG2C.1">ZLAG2C</a> converts a DOUBLE PRECISION COMPLEX matrix, SA, to a SINGLE
</span><span class="comment">*</span><span class="comment"> PRECISION COMPLEX matrix, A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RMAX is the overflow for the SINGLE PRECISION arithmetic
</span><span class="comment">*</span><span class="comment"> <a name="ZLAG2C.29"></a><a href="zlag2c.f.html#ZLAG2C.1">ZLAG2C</a> checks that all the entries of A are between -RMAX and
</span><span class="comment">*</span><span class="comment"> RMAX. If not the convertion is aborted and a flag is raised.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> This is a helper routine so there is no argument checking.
</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"> M (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of lines 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) DOUBLE PRECISION array, dimension (LDA,N)
</span><span class="comment">*</span><span class="comment"> On entry, the M-by-N coefficient matrix A.
</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"> SA (output) REAL array, dimension (LDSA,N)
</span><span class="comment">*</span><span class="comment"> On exit, if INFO=0, the M-by-N coefficient matrix SA.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDSA (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array SA. LDSA >= 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 = k, the (i,j) entry of the matrix A has
</span><span class="comment">*</span><span class="comment"> overflowed when moving from DOUBLE PRECISION to SINGLE
</span><span class="comment">*</span><span class="comment"> k is given by k = (i-1)*LDA+j
</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"> .. Local Scalars ..
</span> INTEGER I,J
DOUBLE PRECISION RMAX
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Intrinsic Functions ..
</span> INTRINSIC DBLE, DIMAG
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Functions ..
</span> REAL <a name="SLAMCH.71"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>
EXTERNAL <a name="SLAMCH.72"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</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> RMAX = <a name="SLAMCH.76"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>(<span class="string">'O'</span>)
DO 20 J = 1,N
DO 30 I = 1,M
IF ((DBLE(A(I,J)).LT.-RMAX) .OR. (DBLE(A(I,J)).GT.RMAX)
$ .OR. (DIMAG(A(I,J)).LT.-RMAX) .OR. (DIMAG(A(I,J)).GT.RMAX))
$ THEN
INFO = (I-1)*LDA + J
GO TO 10
END IF
SA(I,J) = A(I,J)
30 CONTINUE
20 CONTINUE
10 CONTINUE
RETURN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> End of <a name="ZLAG2C.91"></a><a href="zlag2c.f.html#ZLAG2C.1">ZLAG2C</a>
</span><span class="comment">*</span><span class="comment">
</span> END
</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?