diff options
author | Julie <julie@cs.utk.edu> | 2016-12-03 15:45:31 -0800 |
---|---|---|
committer | Julie <julie@cs.utk.edu> | 2016-12-03 15:45:31 -0800 |
commit | 7c6e47eed3fde672865a63d32c4a1c8020cd93ee (patch) | |
tree | 69f13a605024facc270e479f3680618b93ce9be8 /SRC | |
parent | 2ceda6db0f046b1b676030f9b6d92541e6222e3c (diff) | |
download | lapack-7c6e47eed3fde672865a63d32c4a1c8020cd93ee.tar.gz lapack-7c6e47eed3fde672865a63d32c4a1c8020cd93ee.tar.bz2 lapack-7c6e47eed3fde672865a63d32c4a1c8020cd93ee.zip |
Polishing code...
Remove #define for precision
Remove Goto
Diffstat (limited to 'SRC')
-rw-r--r-- | SRC/chetrd_hb2st.F | 39 | ||||
-rw-r--r-- | SRC/dsytrd_sb2st.F | 72 | ||||
-rw-r--r-- | SRC/ssytrd_sb2st.F | 72 | ||||
-rw-r--r-- | SRC/zhetrd_hb2st.F | 41 |
4 files changed, 35 insertions, 189 deletions
diff --git a/SRC/chetrd_hb2st.F b/SRC/chetrd_hb2st.F index 6f253278..c4d44803 100644 --- a/SRC/chetrd_hb2st.F +++ b/SRC/chetrd_hb2st.F @@ -1,6 +1,4 @@ -*> \brief \b CHBTRD -* -* @generated from zhetrd_hb2st.F, fortran z -> c, Sun Nov 6 19:34:06 2016 +*> \brief \b CHBTRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric tridiagonal form T * * =========== DOCUMENTATION =========== * @@ -8,12 +6,12 @@ * http://www.netlib.org/lapack/explore-html/ * *> \htmlonly -*> Download CHBTRD + dependencies -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/chbtrd.f"> +*> Download CHBTRD_HB2ST + dependencies +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/chbtrd_hb2st.f"> *> [TGZ]</a> -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/chbtrd.f"> +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/chbtrd_hb2st.f"> *> [ZIP]</a> -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/chbtrd.f"> +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/chbtrd_hb2st.f"> *> [TXT]</a> *> \endhtmlonly * @@ -23,8 +21,6 @@ * SUBROUTINE CHETRD_HB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB, * D, E, HOUS, LHOUS, WORK, LWORK, INFO ) * -* #define PRECISION_COMPLEX -* * #if defined(_OPENMP) * use omp_lib * #endif @@ -46,7 +42,7 @@ *> *> \verbatim *> -*> CHBTRD reduces a complex Hermitian band matrix A to real symmetric +*> CHETRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric *> tridiagonal form T by a unitary similarity transformation: *> Q**H * A * Q = T. *> \endverbatim @@ -234,7 +230,6 @@ SUBROUTINE CHETRD_HB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB, $ D, E, HOUS, LHOUS, WORK, LWORK, INFO ) * -#define PRECISION_COMPLEX * #if defined(_OPENMP) use omp_lib @@ -274,10 +269,8 @@ $ ABDPOS, ABOFDPOS, DPOS, OFDPOS, AWPOS, $ INDA, INDW, APOS, SIZEA, LDA, INDV, INDTAU, $ SICEV, SIZETAU, LDV, LHMIN, LWMIN -#if defined (PRECISION_COMPLEX) REAL ABSTMP COMPLEX TMP -#endif * .. * .. External Subroutines .. EXTERNAL CHB2ST_KERNELS, CLACPY, CLASET @@ -389,7 +382,7 @@ DO 40 I = 1, N-1 E( I ) = RZERO 40 CONTINUE - GOTO 200 + RETURN END IF * * Case KD=1: @@ -402,12 +395,10 @@ * updating the Q matrix will be required and based if Q is generated * or not this might complicate the story. * -C IF( KD.EQ.1 .AND. N.GT.(KD+1) .AND. AFTERS1 ) THEN IF( KD.EQ.1 ) THEN DO 50 I = 1, N D( I ) = REAL( AB( ABDPOS, I ) ) 50 CONTINUE -#if defined (PRECISION_COMPLEX) * * make off-diagonal elements real and copy them to E * @@ -446,18 +437,7 @@ C CALL CSCAL( N, TMP, Q( 1, I+1 ), 1 ) C END IF 70 CONTINUE ENDIF -#else - IF( UPPER ) THEN - DO 60 I = 1, N-1 - E( I ) = REAL( AB( ABOFDPOS, I+1 ) ) - 60 CONTINUE - ELSE - DO 70 I = 1, N-1 - E( I ) = REAL( AB( ABOFDPOS, I ) ) - 70 CONTINUE - ENDIF -#endif - GOTO 200 + RETURN END IF * * Main code start here. @@ -590,8 +570,6 @@ C END IF 170 CONTINUE ENDIF * - 200 CONTINUE -* HOUS( 1 ) = LHMIN WORK( 1 ) = LWMIN RETURN @@ -599,5 +577,4 @@ C END IF * End of CHETRD_HB2ST * END -#undef PRECISION_COMPLEX diff --git a/SRC/dsytrd_sb2st.F b/SRC/dsytrd_sb2st.F index d50debe1..6925b525 100644 --- a/SRC/dsytrd_sb2st.F +++ b/SRC/dsytrd_sb2st.F @@ -1,6 +1,4 @@ -*> \brief \b DSBTRD -* -* @generated from zhetrd_hb2st.F, fortran z -> d, Sun Nov 6 19:34:06 2016 +*> \brief \b DSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric tridiagonal form T * * =========== DOCUMENTATION =========== * @@ -8,12 +6,12 @@ * http://www.netlib.org/lapack/explore-html/ * *> \htmlonly -*> Download DSBTRD + dependencies -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbtrd.f"> +*> Download DSYTRD_SB2ST + dependencies +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrd_sb2st.f"> *> [TGZ]</a> -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbtrd.f"> +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrd_sb2st.f"> *> [ZIP]</a> -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbtrd.f"> +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrd_sb2st.f"> *> [TXT]</a> *> \endhtmlonly * @@ -23,8 +21,6 @@ * SUBROUTINE DSYTRD_SB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB, * D, E, HOUS, LHOUS, WORK, LWORK, INFO ) * -* #define PRECISION_REAL -* * #if defined(_OPENMP) * use omp_lib * #endif @@ -46,7 +42,7 @@ *> *> \verbatim *> -*> DSBTRD reduces a real symmetric band matrix A to real symmetric +*> DSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric *> tridiagonal form T by a orthogonal similarity transformation: *> Q**T * A * Q = T. *> \endverbatim @@ -234,15 +230,13 @@ SUBROUTINE DSYTRD_SB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB, $ D, E, HOUS, LHOUS, WORK, LWORK, INFO ) * -#define PRECISION_REAL -* #if defined(_OPENMP) use omp_lib #endif * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.4.0) -- +* -- LAPACK computational routine (version 3.7.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * November 2016 @@ -274,10 +268,6 @@ $ ABDPOS, ABOFDPOS, DPOS, OFDPOS, AWPOS, $ INDA, INDW, APOS, SIZEA, LDA, INDV, INDTAU, $ SIDEV, SIZETAU, LDV, LHMIN, LWMIN -#if defined (PRECISION_COMPLEX) - DOUBLE PRECISION ABSTMP - DOUBLE PRECISION TMP -#endif * .. * .. External Subroutines .. EXTERNAL DSB2ST_KERNELS, DLACPY, DLASET @@ -389,7 +379,7 @@ DO 40 I = 1, N-1 E( I ) = RZERO 40 CONTINUE - GOTO 200 + RETURN END IF * * Case KD=1: @@ -402,52 +392,12 @@ * updating the Q matrix will be required and based if Q is generated * or not this might complicate the story. * -C IF( KD.EQ.1 .AND. N.GT.(KD+1) .AND. AFTERS1 ) THEN IF( KD.EQ.1 ) THEN DO 50 I = 1, N D( I ) = ( AB( ABDPOS, I ) ) 50 CONTINUE -#if defined (PRECISION_COMPLEX) -* -* make off-diagonal elements real and copy them to E * IF( UPPER ) THEN - DO 60 I = 1, N - 1 - TMP = AB( ABOFDPOS, I+1 ) - ABSTMP = ABS( TMP ) - AB( ABOFDPOS, I+1 ) = ABSTMP - E( I ) = ABSTMP - IF( ABSTMP.NE.RZERO ) THEN - TMP = TMP / ABSTMP - ELSE - TMP = ONE - END IF - IF( I.LT.N-1 ) - $ AB( ABOFDPOS, I+2 ) = AB( ABOFDPOS, I+2 )*TMP -C IF( WANTZ ) THEN -C CALL DSCAL( N, ( TMP ), Q( 1, I+1 ), 1 ) -C END IF - 60 CONTINUE - ELSE - DO 70 I = 1, N - 1 - TMP = AB( ABOFDPOS, I ) - ABSTMP = ABS( TMP ) - AB( ABOFDPOS, I ) = ABSTMP - E( I ) = ABSTMP - IF( ABSTMP.NE.RZERO ) THEN - TMP = TMP / ABSTMP - ELSE - TMP = ONE - END IF - IF( I.LT.N-1 ) - $ AB( ABOFDPOS, I+1 ) = AB( ABOFDPOS, I+1 )*TMP -C IF( WANTQ ) THEN -C CALL DSCAL( N, TMP, Q( 1, I+1 ), 1 ) -C END IF - 70 CONTINUE - ENDIF -#else - IF( UPPER ) THEN DO 60 I = 1, N-1 E( I ) = ( AB( ABOFDPOS, I+1 ) ) 60 CONTINUE @@ -456,8 +406,7 @@ C END IF E( I ) = ( AB( ABOFDPOS, I ) ) 70 CONTINUE ENDIF -#endif - GOTO 200 + RETURN END IF * * Main code start here. @@ -590,8 +539,6 @@ C END IF 170 CONTINUE ENDIF * - 200 CONTINUE -* HOUS( 1 ) = LHMIN WORK( 1 ) = LWMIN RETURN @@ -599,5 +546,4 @@ C END IF * End of DSYTRD_SB2ST * END -#undef PRECISION_REAL diff --git a/SRC/ssytrd_sb2st.F b/SRC/ssytrd_sb2st.F index edbcf125..b3e5d69c 100644 --- a/SRC/ssytrd_sb2st.F +++ b/SRC/ssytrd_sb2st.F @@ -1,6 +1,4 @@ -*> \brief \b SSBTRD -* -* @generated from zhetrd_hb2st.F, fortran z -> s, Sun Nov 6 19:34:06 2016 +*> \brief \b SSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric tridiagonal form T * * =========== DOCUMENTATION =========== * @@ -8,12 +6,12 @@ * http://www.netlib.org/lapack/explore-html/ * *> \htmlonly -*> Download SSBTRD + dependencies -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ssbtrd.f"> +*> Download SSYTRD_SB2ST + dependencies +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ssytrd_sb2t.f"> *> [TGZ]</a> -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ssbtrd.f"> +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ssytrd_sb2t.f"> *> [ZIP]</a> -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ssbtrd.f"> +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ssytrd_sb2t.f"> *> [TXT]</a> *> \endhtmlonly * @@ -23,8 +21,6 @@ * SUBROUTINE SSYTRD_SB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB, * D, E, HOUS, LHOUS, WORK, LWORK, INFO ) * -* #define PRECISION_REAL -* * #if defined(_OPENMP) * use omp_lib * #endif @@ -46,7 +42,7 @@ *> *> \verbatim *> -*> SSBTRD reduces a real symmetric band matrix A to real symmetric +*> SSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric *> tridiagonal form T by a orthogonal similarity transformation: *> Q**T * A * Q = T. *> \endverbatim @@ -234,15 +230,13 @@ SUBROUTINE SSYTRD_SB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB, $ D, E, HOUS, LHOUS, WORK, LWORK, INFO ) * -#define PRECISION_REAL -* #if defined(_OPENMP) use omp_lib #endif * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.4.0) -- +* -- LAPACK computational routine (version 3.7.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * November 2016 @@ -274,10 +268,6 @@ $ ABDPOS, ABOFDPOS, DPOS, OFDPOS, AWPOS, $ INDA, INDW, APOS, SIZEA, LDA, INDV, INDTAU, $ SISEV, SIZETAU, LDV, LHMIN, LWMIN -#if defined (PRECISION_COMPLEX) - REAL ABSTMP - REAL TMP -#endif * .. * .. External Subroutines .. EXTERNAL SSB2ST_KERNELS, SLACPY, SLASET @@ -389,7 +379,7 @@ DO 40 I = 1, N-1 E( I ) = RZERO 40 CONTINUE - GOTO 200 + RETURN END IF * * Case KD=1: @@ -402,52 +392,12 @@ * updating the Q matrix will be required and based if Q is generated * or not this might complicate the story. * -C IF( KD.EQ.1 .AND. N.GT.(KD+1) .AND. AFTERS1 ) THEN IF( KD.EQ.1 ) THEN DO 50 I = 1, N D( I ) = ( AB( ABDPOS, I ) ) 50 CONTINUE -#if defined (PRECISION_COMPLEX) -* -* make off-diagonal elements real and copy them to E * IF( UPPER ) THEN - DO 60 I = 1, N - 1 - TMP = AB( ABOFDPOS, I+1 ) - ABSTMP = ABS( TMP ) - AB( ABOFDPOS, I+1 ) = ABSTMP - E( I ) = ABSTMP - IF( ABSTMP.NE.RZERO ) THEN - TMP = TMP / ABSTMP - ELSE - TMP = ONE - END IF - IF( I.LT.N-1 ) - $ AB( ABOFDPOS, I+2 ) = AB( ABOFDPOS, I+2 )*TMP -C IF( WANTZ ) THEN -C CALL SSCAL( N, ( TMP ), Q( 1, I+1 ), 1 ) -C END IF - 60 CONTINUE - ELSE - DO 70 I = 1, N - 1 - TMP = AB( ABOFDPOS, I ) - ABSTMP = ABS( TMP ) - AB( ABOFDPOS, I ) = ABSTMP - E( I ) = ABSTMP - IF( ABSTMP.NE.RZERO ) THEN - TMP = TMP / ABSTMP - ELSE - TMP = ONE - END IF - IF( I.LT.N-1 ) - $ AB( ABOFDPOS, I+1 ) = AB( ABOFDPOS, I+1 )*TMP -C IF( WANTQ ) THEN -C CALL SSCAL( N, TMP, Q( 1, I+1 ), 1 ) -C END IF - 70 CONTINUE - ENDIF -#else - IF( UPPER ) THEN DO 60 I = 1, N-1 E( I ) = ( AB( ABOFDPOS, I+1 ) ) 60 CONTINUE @@ -456,8 +406,7 @@ C END IF E( I ) = ( AB( ABOFDPOS, I ) ) 70 CONTINUE ENDIF -#endif - GOTO 200 + RETURN END IF * * Main code start here. @@ -590,8 +539,6 @@ C END IF 170 CONTINUE ENDIF * - 200 CONTINUE -* HOUS( 1 ) = LHMIN WORK( 1 ) = LWMIN RETURN @@ -599,5 +546,4 @@ C END IF * End of SSYTRD_SB2ST * END -#undef PRECISION_REAL diff --git a/SRC/zhetrd_hb2st.F b/SRC/zhetrd_hb2st.F index 5d62e30d..71419481 100644 --- a/SRC/zhetrd_hb2st.F +++ b/SRC/zhetrd_hb2st.F @@ -1,6 +1,4 @@ -*> \brief \b ZHBTRD -* -* @precisions fortran z -> s d c +*> \brief \b ZHETRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric tridiagonal form T * * =========== DOCUMENTATION =========== * @@ -8,12 +6,12 @@ * http://www.netlib.org/lapack/explore-html/ * *> \htmlonly -*> Download ZHBTRD + dependencies -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhbtrd.f"> +*> Download ZHETRD_HB2ST + dependencies +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhbtrd_hb2st.f"> *> [TGZ]</a> -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhbtrd.f"> +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhbtrd_hb2st.f"> *> [ZIP]</a> -*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhbtrd.f"> +*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhbtrd_hb2st.f"> *> [TXT]</a> *> \endhtmlonly * @@ -23,8 +21,6 @@ * SUBROUTINE ZHETRD_HB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB, * D, E, HOUS, LHOUS, WORK, LWORK, INFO ) * -* #define PRECISION_COMPLEX -* * #if defined(_OPENMP) * use omp_lib * #endif @@ -46,7 +42,7 @@ *> *> \verbatim *> -*> ZHBTRD reduces a complex Hermitian band matrix A to real symmetric +*> ZHETRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric *> tridiagonal form T by a unitary similarity transformation: *> Q**H * A * Q = T. *> \endverbatim @@ -234,7 +230,6 @@ SUBROUTINE ZHETRD_HB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB, $ D, E, HOUS, LHOUS, WORK, LWORK, INFO ) * -#define PRECISION_COMPLEX * #if defined(_OPENMP) use omp_lib @@ -242,7 +237,7 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.4.0) -- +* -- LAPACK computational routine (version 3.7.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * November 2016 @@ -274,10 +269,8 @@ $ ABDPOS, ABOFDPOS, DPOS, OFDPOS, AWPOS, $ INDA, INDW, APOS, SIZEA, LDA, INDV, INDTAU, $ SIZEV, SIZETAU, LDV, LHMIN, LWMIN -#if defined (PRECISION_COMPLEX) DOUBLE PRECISION ABSTMP COMPLEX*16 TMP -#endif * .. * .. External Subroutines .. EXTERNAL ZHB2ST_KERNELS, ZLACPY, ZLASET @@ -389,7 +382,7 @@ DO 40 I = 1, N-1 E( I ) = RZERO 40 CONTINUE - GOTO 200 + RETURN END IF * * Case KD=1: @@ -402,12 +395,10 @@ * updating the Q matrix will be required and based if Q is generated * or not this might complicate the story. * -C IF( KD.EQ.1 .AND. N.GT.(KD+1) .AND. AFTERS1 ) THEN IF( KD.EQ.1 ) THEN DO 50 I = 1, N D( I ) = DBLE( AB( ABDPOS, I ) ) 50 CONTINUE -#if defined (PRECISION_COMPLEX) * * make off-diagonal elements real and copy them to E * @@ -446,18 +437,7 @@ C CALL ZSCAL( N, TMP, Q( 1, I+1 ), 1 ) C END IF 70 CONTINUE ENDIF -#else - IF( UPPER ) THEN - DO 60 I = 1, N-1 - E( I ) = DBLE( AB( ABOFDPOS, I+1 ) ) - 60 CONTINUE - ELSE - DO 70 I = 1, N-1 - E( I ) = DBLE( AB( ABOFDPOS, I ) ) - 70 CONTINUE - ENDIF -#endif - GOTO 200 + RETURN END IF * * Main code start here. @@ -590,8 +570,6 @@ C END IF 170 CONTINUE ENDIF * - 200 CONTINUE -* HOUS( 1 ) = LHMIN WORK( 1 ) = LWMIN RETURN @@ -599,5 +577,4 @@ C END IF * End of ZHETRD_HB2ST * END -#undef PRECISION_COMPLEX |