LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
dlat2s.f
Go to the documentation of this file.
00001 *> \brief \b DLAT2S
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download DLAT2S + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlat2s.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlat2s.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlat2s.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       SUBROUTINE DLAT2S( UPLO, N, A, LDA, SA, LDSA, INFO )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       CHARACTER          UPLO
00025 *       INTEGER            INFO, LDA, LDSA, N
00026 *       ..
00027 *       .. Array Arguments ..
00028 *       REAL               SA( LDSA, * )
00029 *       DOUBLE PRECISION   A( LDA, * )
00030 *       ..
00031 *  
00032 *
00033 *> \par Purpose:
00034 *  =============
00035 *>
00036 *> \verbatim
00037 *>
00038 *> DLAT2S converts a DOUBLE PRECISION triangular matrix, SA, to a SINGLE
00039 *> PRECISION triangular matrix, A.
00040 *>
00041 *> RMAX is the overflow for the SINGLE PRECISION arithmetic
00042 *> DLAS2S checks that all the entries of A are between -RMAX and
00043 *> RMAX. If not the convertion is aborted and a flag is raised.
00044 *>
00045 *> This is an auxiliary routine so there is no argument checking.
00046 *> \endverbatim
00047 *
00048 *  Arguments:
00049 *  ==========
00050 *
00051 *> \param[in] UPLO
00052 *> \verbatim
00053 *>          UPLO is CHARACTER*1
00054 *>          = 'U':  A is upper triangular;
00055 *>          = 'L':  A is lower triangular.
00056 *> \endverbatim
00057 *>
00058 *> \param[in] N
00059 *> \verbatim
00060 *>          N is INTEGER
00061 *>          The number of rows and columns of the matrix A.  N >= 0.
00062 *> \endverbatim
00063 *>
00064 *> \param[in] A
00065 *> \verbatim
00066 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
00067 *>          On entry, the N-by-N triangular coefficient matrix A.
00068 *> \endverbatim
00069 *>
00070 *> \param[in] LDA
00071 *> \verbatim
00072 *>          LDA is INTEGER
00073 *>          The leading dimension of the array A.  LDA >= max(1,N).
00074 *> \endverbatim
00075 *>
00076 *> \param[out] SA
00077 *> \verbatim
00078 *>          SA is REAL array, dimension (LDSA,N)
00079 *>          Only the UPLO part of SA is referenced.  On exit, if INFO=0,
00080 *>          the N-by-N coefficient matrix SA; if INFO>0, the content of
00081 *>          the UPLO part of SA is unspecified.
00082 *> \endverbatim
00083 *>
00084 *> \param[in] LDSA
00085 *> \verbatim
00086 *>          LDSA is INTEGER
00087 *>          The leading dimension of the array SA.  LDSA >= max(1,M).
00088 *> \endverbatim
00089 *>
00090 *> \param[out] INFO
00091 *> \verbatim
00092 *>          INFO is INTEGER
00093 *>          = 0:  successful exit.
00094 *>          = 1:  an entry of the matrix A is greater than the SINGLE
00095 *>                PRECISION overflow threshold, in this case, the content
00096 *>                of the UPLO part of SA in exit is unspecified.
00097 *> \endverbatim
00098 *
00099 *  Authors:
00100 *  ========
00101 *
00102 *> \author Univ. of Tennessee 
00103 *> \author Univ. of California Berkeley 
00104 *> \author Univ. of Colorado Denver 
00105 *> \author NAG Ltd. 
00106 *
00107 *> \date November 2011
00108 *
00109 *> \ingroup doubleOTHERauxiliary
00110 *
00111 *  =====================================================================
00112       SUBROUTINE DLAT2S( UPLO, N, A, LDA, SA, LDSA, INFO )
00113 *
00114 *  -- LAPACK auxiliary routine (version 3.4.0) --
00115 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00116 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00117 *     November 2011
00118 *
00119 *     .. Scalar Arguments ..
00120       CHARACTER          UPLO
00121       INTEGER            INFO, LDA, LDSA, N
00122 *     ..
00123 *     .. Array Arguments ..
00124       REAL               SA( LDSA, * )
00125       DOUBLE PRECISION   A( LDA, * )
00126 *     ..
00127 *
00128 *  =====================================================================
00129 *
00130 *     .. Local Scalars ..
00131       INTEGER            I, J
00132       DOUBLE PRECISION   RMAX
00133       LOGICAL            UPPER
00134 *     ..
00135 *     .. External Functions ..
00136       REAL               SLAMCH
00137       LOGICAL            LSAME
00138       EXTERNAL           SLAMCH, LSAME
00139 *     ..
00140 *     .. Executable Statements ..
00141 *
00142       RMAX = SLAMCH( 'O' )
00143       UPPER = LSAME( UPLO, 'U' )
00144       IF( UPPER ) THEN
00145          DO 20 J = 1, N
00146             DO 10 I = 1, J
00147                IF( ( A( I, J ).LT.-RMAX ) .OR. ( A( I, J ).GT.RMAX ) )
00148      $             THEN
00149                   INFO = 1
00150                   GO TO 50
00151                END IF
00152                SA( I, J ) = A( I, J )
00153    10       CONTINUE
00154    20    CONTINUE
00155       ELSE
00156          DO 40 J = 1, N
00157             DO 30 I = J, N
00158                IF( ( A( I, J ).LT.-RMAX ) .OR. ( A( I, J ).GT.RMAX ) )
00159      $             THEN
00160                   INFO = 1
00161                   GO TO 50
00162                END IF
00163                SA( I, J ) = A( I, J )
00164    30       CONTINUE
00165    40    CONTINUE
00166       END IF
00167    50 CONTINUE
00168 *
00169       RETURN
00170 *
00171 *     End of DLAT2S
00172 *
00173       END
 All Files Functions