zlaqps.f.html

来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 291 行 · 第 1/2 页

HTML
291
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>zlaqps.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="ZLAQPS.1"></a><a href="zlaqps.f.html#ZLAQPS.1">ZLAQPS</a>( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
     $                   VN2, AUXV, F, LDF )
<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>      INTEGER            KB, LDA, LDF, M, N, NB, OFFSET
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      INTEGER            JPVT( * )
      DOUBLE PRECISION   VN1( * ), VN2( * )
      COMPLEX*16         A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
<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="ZLAQPS.20"></a><a href="zlaqps.f.html#ZLAQPS.1">ZLAQPS</a> computes a step of QR factorization with column pivoting
</span><span class="comment">*</span><span class="comment">  of a complex M-by-N matrix A by using Blas-3.  It tries to factorize
</span><span class="comment">*</span><span class="comment">  NB columns from A starting from the row OFFSET+1, and updates all
</span><span class="comment">*</span><span class="comment">  of the matrix with Blas-3 xGEMM.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  In some cases, due to catastrophic cancellations, it cannot
</span><span class="comment">*</span><span class="comment">  factorize NB columns.  Hence, the actual number of factorized
</span><span class="comment">*</span><span class="comment">  columns is returned in KB.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
</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 rows of the matrix A. M &gt;= 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 &gt;= 0
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  OFFSET  (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of rows of A that have been factorized in
</span><span class="comment">*</span><span class="comment">          previous steps.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  NB      (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of columns to factorize.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  KB      (output) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of columns actually factorized.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  A       (input/output) COMPLEX*16 array, dimension (LDA,N)
</span><span class="comment">*</span><span class="comment">          On entry, the M-by-N matrix A.
</span><span class="comment">*</span><span class="comment">          On exit, block A(OFFSET+1:M,1:KB) is the triangular
</span><span class="comment">*</span><span class="comment">          factor obtained and block A(1:OFFSET,1:N) has been
</span><span class="comment">*</span><span class="comment">          accordingly pivoted, but no factorized.
</span><span class="comment">*</span><span class="comment">          The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
</span><span class="comment">*</span><span class="comment">          been updated.
</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 &gt;= max(1,M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  JPVT    (input/output) INTEGER array, dimension (N)
</span><span class="comment">*</span><span class="comment">          JPVT(I) = K &lt;==&gt; Column K of the full matrix A has been
</span><span class="comment">*</span><span class="comment">          permuted into position I in AP.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  TAU     (output) COMPLEX*16 array, dimension (KB)
</span><span class="comment">*</span><span class="comment">          The scalar factors of the elementary reflectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  VN1     (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment">          The vector with the partial column norms.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  VN2     (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment">          The vector with the exact column norms.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  AUXV    (input/output) COMPLEX*16 array, dimension (NB)
</span><span class="comment">*</span><span class="comment">          Auxiliar vector.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  F       (input/output) COMPLEX*16 array, dimension (LDF,NB)
</span><span class="comment">*</span><span class="comment">          Matrix F' = L*Y'*A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDF     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array F. LDF &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Further Details
</span><span class="comment">*</span><span class="comment">  ===============
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Based on contributions by
</span><span class="comment">*</span><span class="comment">    G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
</span><span class="comment">*</span><span class="comment">    X. Sun, Computer Science Dept., Duke University, USA
</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
      COMPLEX*16         CZERO, CONE
      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0,
     $                   CZERO = ( 0.0D+0, 0.0D+0 ),
     $                   CONE = ( 1.0D+0, 0.0D+0 ) )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      INTEGER            ITEMP, J, K, LASTRK, LSTICC, PVT, RK
      DOUBLE PRECISION   TEMP, TEMP2, TOL3Z
      COMPLEX*16         AKK
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Subroutines ..
</span>      EXTERNAL           ZGEMM, ZGEMV, <a name="ZLARFG.105"></a><a href="zlarfg.f.html#ZLARFG.1">ZLARFG</a>, ZSWAP
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC          ABS, DBLE, DCONJG, MAX, MIN, NINT, SQRT
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      INTEGER            IDAMAX
      DOUBLE PRECISION   <a name="DLAMCH.112"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>, DZNRM2
      EXTERNAL           IDAMAX, <a name="DLAMCH.113"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>, DZNRM2
<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>      LASTRK = MIN( M, N+OFFSET )
      LSTICC = 0
      K = 0
      TOL3Z = SQRT(<a name="DLAMCH.120"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>(<span class="string">'Epsilon'</span>))
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Beginning of while loop.
</span><span class="comment">*</span><span class="comment">
</span>   10 CONTINUE
      IF( ( K.LT.NB ) .AND. ( LSTICC.EQ.0 ) ) THEN
         K = K + 1
         RK = OFFSET + K

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?