File:  [local] / rpl / lapack / lapack / zlat2c.f
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Sat Aug 7 13:21:10 2010 UTC (13 years, 9 months ago) by bertrand
Branches: MAIN
CVS tags: HEAD
Ajout des nouveaux fichiers pour Lapack 3.2.2.

    1:       SUBROUTINE ZLAT2C( UPLO, N, A, LDA, SA, LDSA, INFO )
    2: *
    3: *  -- LAPACK PROTOTYPE auxiliary routine (version 3.1.2) --
    4: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
    5: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
    6: *     May 2007
    7: *
    8: *     .. Scalar Arguments ..
    9:       CHARACTER          UPLO
   10:       INTEGER            INFO, LDA, LDSA, N
   11: *     ..
   12: *     .. Array Arguments ..
   13:       COMPLEX            SA( LDSA, * )
   14:       COMPLEX*16         A( LDA, * )
   15: *     ..
   16: *
   17: *  Purpose
   18: *  =======
   19: *
   20: *  ZLAT2C converts a COMPLEX*16 triangular matrix, SA, to a COMPLEX
   21: *  triangular matrix, A.
   22: *
   23: *  RMAX is the overflow for the SINGLE PRECISION arithmetic
   24: *  ZLAT2C checks that all the entries of A are between -RMAX and
   25: *  RMAX. If not the convertion is aborted and a flag is raised.
   26: *
   27: *  This is an auxiliary routine so there is no argument checking.
   28: *
   29: *  Arguments
   30: *  =========
   31: *
   32: *  UPLO    (input) CHARACTER*1
   33: *          = 'U':  A is upper triangular;
   34: *          = 'L':  A is lower triangular.
   35: *
   36: *  N       (input) INTEGER
   37: *          The number of rows and columns of the matrix A.  N >= 0.
   38: *
   39: *  A       (input) COMPLEX*16 array, dimension (LDA,N)
   40: *          On entry, the N-by-N triangular coefficient matrix A.
   41: *
   42: *  LDA     (input) INTEGER
   43: *          The leading dimension of the array A.  LDA >= max(1,N).
   44: *
   45: *  SA      (output) COMPLEX array, dimension (LDSA,N)
   46: *          Only the UPLO part of SA is referenced.  On exit, if INFO=0,
   47: *          the N-by-N coefficient matrix SA; if INFO>0, the content of
   48: *          the UPLO part of SA is unspecified.
   49: *
   50: *  LDSA    (input) INTEGER
   51: *          The leading dimension of the array SA.  LDSA >= max(1,M).
   52: *
   53: *  INFO    (output) INTEGER
   54: *          = 0:  successful exit.
   55: *          = 1:  an entry of the matrix A is greater than the SINGLE
   56: *                PRECISION overflow threshold, in this case, the content
   57: *                of the UPLO part of SA in exit is unspecified.
   58: *
   59: *  =========
   60: *
   61: *     .. Local Scalars ..
   62:       INTEGER            I, J
   63:       DOUBLE PRECISION   RMAX
   64:       LOGICAL            UPPER
   65: *     ..
   66: *     .. Intrinsic Functions ..
   67:       INTRINSIC          DBLE, DIMAG
   68: *     ..
   69: *     .. External Functions ..
   70:       REAL               SLAMCH
   71:       LOGICAL            LSAME
   72:       EXTERNAL           SLAMCH, LSAME
   73: *     ..
   74: *     .. Executable Statements ..
   75: *
   76:       RMAX = SLAMCH( 'O' )
   77:       UPPER = LSAME( UPLO, 'U' )
   78:       IF( UPPER ) THEN
   79:          DO 20 J = 1, N
   80:             DO 10 I = 1, J
   81:                IF( ( DBLE( A( I, J ) ).LT.-RMAX ) .OR.
   82:      +             ( DBLE( A( I, J ) ).GT.RMAX ) .OR.
   83:      +             ( DIMAG( A( I, J ) ).LT.-RMAX ) .OR.
   84:      +             ( DIMAG( A( I, J ) ).GT.RMAX ) ) THEN
   85:                   INFO = 1
   86:                   GO TO 50
   87:                END IF
   88:                SA( I, J ) = A( I, J )
   89:    10       CONTINUE
   90:    20    CONTINUE
   91:       ELSE
   92:          DO 40 J = 1, N
   93:             DO 30 I = J, N
   94:                IF( ( DBLE( A( I, J ) ).LT.-RMAX ) .OR.
   95:      +             ( DBLE( A( I, J ) ).GT.RMAX ) .OR.
   96:      +             ( DIMAG( A( I, J ) ).LT.-RMAX ) .OR.
   97:      +             ( DIMAG( A( I, J ) ).GT.RMAX ) ) THEN
   98:                   INFO = 1
   99:                   GO TO 50
  100:                END IF
  101:                SA( I, J ) = A( I, J )
  102:    30       CONTINUE
  103:    40    CONTINUE
  104:       END IF
  105:    50 CONTINUE
  106: *
  107:       RETURN
  108: *
  109: *     End of ZLAT2C
  110: *
  111:       END

CVSweb interface <joel.bertrand@systella.fr>