Annotation of rpl/lapack/lapack/zlat2c.f, revision 1.16

1.9       bertrand    1: *> \brief \b ZLAT2C converts a double complex triangular matrix to a complex triangular matrix.
1.6       bertrand    2: *
                      3: *  =========== DOCUMENTATION ===========
                      4: *
1.13      bertrand    5: * Online html documentation available at
                      6: *            http://www.netlib.org/lapack/explore-html/
1.6       bertrand    7: *
                      8: *> \htmlonly
1.13      bertrand    9: *> Download ZLAT2C + dependencies
                     10: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlat2c.f">
                     11: *> [TGZ]</a>
                     12: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlat2c.f">
                     13: *> [ZIP]</a>
                     14: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlat2c.f">
1.6       bertrand   15: *> [TXT]</a>
1.13      bertrand   16: *> \endhtmlonly
1.6       bertrand   17: *
                     18: *  Definition:
                     19: *  ===========
                     20: *
                     21: *       SUBROUTINE ZLAT2C( UPLO, N, A, LDA, SA, LDSA, INFO )
1.13      bertrand   22: *
1.6       bertrand   23: *       .. Scalar Arguments ..
                     24: *       CHARACTER          UPLO
                     25: *       INTEGER            INFO, LDA, LDSA, N
                     26: *       ..
                     27: *       .. Array Arguments ..
                     28: *       COMPLEX            SA( LDSA, * )
                     29: *       COMPLEX*16         A( LDA, * )
                     30: *       ..
1.13      bertrand   31: *
1.6       bertrand   32: *
                     33: *> \par Purpose:
                     34: *  =============
                     35: *>
                     36: *> \verbatim
                     37: *>
                     38: *> ZLAT2C converts a COMPLEX*16 triangular matrix, SA, to a COMPLEX
                     39: *> triangular matrix, A.
                     40: *>
                     41: *> RMAX is the overflow for the SINGLE PRECISION arithmetic
                     42: *> ZLAT2C checks that all the entries of A are between -RMAX and
1.13      bertrand   43: *> RMAX. If not the conversion is aborted and a flag is raised.
1.6       bertrand   44: *>
                     45: *> This is an auxiliary routine so there is no argument checking.
                     46: *> \endverbatim
                     47: *
                     48: *  Arguments:
                     49: *  ==========
                     50: *
                     51: *> \param[in] UPLO
                     52: *> \verbatim
                     53: *>          UPLO is CHARACTER*1
                     54: *>          = 'U':  A is upper triangular;
                     55: *>          = 'L':  A is lower triangular.
                     56: *> \endverbatim
                     57: *>
                     58: *> \param[in] N
                     59: *> \verbatim
                     60: *>          N is INTEGER
                     61: *>          The number of rows and columns of the matrix A.  N >= 0.
                     62: *> \endverbatim
                     63: *>
                     64: *> \param[in] A
                     65: *> \verbatim
                     66: *>          A is COMPLEX*16 array, dimension (LDA,N)
                     67: *>          On entry, the N-by-N triangular coefficient matrix A.
                     68: *> \endverbatim
                     69: *>
                     70: *> \param[in] LDA
                     71: *> \verbatim
                     72: *>          LDA is INTEGER
                     73: *>          The leading dimension of the array A.  LDA >= max(1,N).
                     74: *> \endverbatim
                     75: *>
                     76: *> \param[out] SA
                     77: *> \verbatim
                     78: *>          SA is COMPLEX array, dimension (LDSA,N)
                     79: *>          Only the UPLO part of SA is referenced.  On exit, if INFO=0,
                     80: *>          the N-by-N coefficient matrix SA; if INFO>0, the content of
                     81: *>          the UPLO part of SA is unspecified.
                     82: *> \endverbatim
                     83: *>
                     84: *> \param[in] LDSA
                     85: *> \verbatim
                     86: *>          LDSA is INTEGER
                     87: *>          The leading dimension of the array SA.  LDSA >= max(1,M).
                     88: *> \endverbatim
                     89: *>
                     90: *> \param[out] INFO
                     91: *> \verbatim
                     92: *>          INFO is INTEGER
                     93: *>          = 0:  successful exit.
                     94: *>          = 1:  an entry of the matrix A is greater than the SINGLE
                     95: *>                PRECISION overflow threshold, in this case, the content
                     96: *>                of the UPLO part of SA in exit is unspecified.
                     97: *> \endverbatim
                     98: *
                     99: *  Authors:
                    100: *  ========
                    101: *
1.13      bertrand  102: *> \author Univ. of Tennessee
                    103: *> \author Univ. of California Berkeley
                    104: *> \author Univ. of Colorado Denver
                    105: *> \author NAG Ltd.
1.6       bertrand  106: *
                    107: *> \ingroup complex16OTHERauxiliary
                    108: *
                    109: *  =====================================================================
1.1       bertrand  110:       SUBROUTINE ZLAT2C( UPLO, N, A, LDA, SA, LDSA, INFO )
                    111: *
1.16    ! bertrand  112: *  -- LAPACK auxiliary routine --
1.1       bertrand  113: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
                    114: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
                    115: *
                    116: *     .. Scalar Arguments ..
                    117:       CHARACTER          UPLO
                    118:       INTEGER            INFO, LDA, LDSA, N
                    119: *     ..
                    120: *     .. Array Arguments ..
                    121:       COMPLEX            SA( LDSA, * )
                    122:       COMPLEX*16         A( LDA, * )
                    123: *     ..
                    124: *
1.5       bertrand  125: *  =====================================================================
1.1       bertrand  126: *
                    127: *     .. Local Scalars ..
                    128:       INTEGER            I, J
                    129:       DOUBLE PRECISION   RMAX
                    130:       LOGICAL            UPPER
                    131: *     ..
                    132: *     .. Intrinsic Functions ..
1.16    ! bertrand  133:       INTRINSIC          DBLE, DIMAG, CMPLX
1.1       bertrand  134: *     ..
                    135: *     .. External Functions ..
                    136:       REAL               SLAMCH
                    137:       LOGICAL            LSAME
                    138:       EXTERNAL           SLAMCH, LSAME
                    139: *     ..
                    140: *     .. Executable Statements ..
                    141: *
                    142:       RMAX = SLAMCH( 'O' )
                    143:       UPPER = LSAME( UPLO, 'U' )
                    144:       IF( UPPER ) THEN
                    145:          DO 20 J = 1, N
                    146:             DO 10 I = 1, J
                    147:                IF( ( DBLE( A( I, J ) ).LT.-RMAX ) .OR.
1.5       bertrand  148:      $             ( DBLE( A( I, J ) ).GT.RMAX ) .OR.
                    149:      $             ( DIMAG( A( I, J ) ).LT.-RMAX ) .OR.
                    150:      $             ( DIMAG( A( I, J ) ).GT.RMAX ) ) THEN
1.1       bertrand  151:                   INFO = 1
                    152:                   GO TO 50
                    153:                END IF
1.16    ! bertrand  154:                SA( I, J ) = CMPLX( A( I, J ) )
1.1       bertrand  155:    10       CONTINUE
                    156:    20    CONTINUE
                    157:       ELSE
                    158:          DO 40 J = 1, N
                    159:             DO 30 I = J, N
                    160:                IF( ( DBLE( A( I, J ) ).LT.-RMAX ) .OR.
1.5       bertrand  161:      $             ( DBLE( A( I, J ) ).GT.RMAX ) .OR.
                    162:      $             ( DIMAG( A( I, J ) ).LT.-RMAX ) .OR.
                    163:      $             ( DIMAG( A( I, J ) ).GT.RMAX ) ) THEN
1.1       bertrand  164:                   INFO = 1
                    165:                   GO TO 50
                    166:                END IF
1.16    ! bertrand  167:                SA( I, J ) = CMPLX( A( I, J ) )
1.1       bertrand  168:    30       CONTINUE
                    169:    40    CONTINUE
                    170:       END IF
                    171:    50 CONTINUE
                    172: *
                    173:       RETURN
                    174: *
                    175: *     End of ZLAT2C
                    176: *
                    177:       END

CVSweb interface <joel.bertrand@systella.fr>