--- rpl/lapack/lapack/zhegs2.f 2012/08/22 09:48:32 1.11
+++ rpl/lapack/lapack/zhegs2.f 2023/08/07 08:39:23 1.20
@@ -1,25 +1,25 @@
-*> \brief \b ZHEGS2
+*> \brief \b ZHEGS2 reduces a Hermitian definite generalized eigenproblem to standard form, using the factorization results obtained from cpotrf (unblocked algorithm).
*
* =========== DOCUMENTATION ===========
*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
-*> Download ZHEGS2 + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
+*> Download ZHEGS2 + dependencies
+*>
+*> [TGZ]
+*>
+*> [ZIP]
+*>
*> [TXT]
-*> \endhtmlonly
+*> \endhtmlonly
*
* Definition:
* ===========
*
* SUBROUTINE ZHEGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-*
+*
* .. Scalar Arguments ..
* CHARACTER UPLO
* INTEGER INFO, ITYPE, LDA, LDB, N
@@ -27,7 +27,7 @@
* .. Array Arguments ..
* COMPLEX*16 A( LDA, * ), B( LDB, * )
* ..
-*
+*
*
*> \par Purpose:
* =============
@@ -92,11 +92,12 @@
*> The leading dimension of the array A. LDA >= max(1,N).
*> \endverbatim
*>
-*> \param[in] B
+*> \param[in,out] B
*> \verbatim
*> B is COMPLEX*16 array, dimension (LDB,N)
*> The triangular factor from the Cholesky factorization of B,
*> as returned by ZPOTRF.
+*> B is modified by the routine but restored on exit.
*> \endverbatim
*>
*> \param[in] LDB
@@ -115,22 +116,19 @@
* Authors:
* ========
*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \date November 2011
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
*> \ingroup complex16HEcomputational
*
* =====================================================================
SUBROUTINE ZHEGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
*
-* -- LAPACK computational routine (version 3.4.0) --
+* -- LAPACK computational routine --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -196,8 +194,8 @@
*
* Update the upper triangle of A(k:n,k:n)
*
- AKK = A( K, K )
- BKK = B( K, K )
+ AKK = DBLE( A( K, K ) )
+ BKK = DBLE( B( K, K ) )
AKK = AKK / BKK**2
A( K, K ) = AKK
IF( K.LT.N ) THEN
@@ -226,8 +224,8 @@
*
* Update the lower triangle of A(k:n,k:n)
*
- AKK = A( K, K )
- BKK = B( K, K )
+ AKK = DBLE( A( K, K ) )
+ BKK = DBLE( B( K, K ) )
AKK = AKK / BKK**2
A( K, K ) = AKK
IF( K.LT.N ) THEN
@@ -251,8 +249,8 @@
*
* Update the upper triangle of A(1:k,1:k)
*
- AKK = A( K, K )
- BKK = B( K, K )
+ AKK = DBLE( A( K, K ) )
+ BKK = DBLE( B( K, K ) )
CALL ZTRMV( UPLO, 'No transpose', 'Non-unit', K-1, B,
$ LDB, A( 1, K ), 1 )
CT = HALF*AKK
@@ -271,8 +269,8 @@
*
* Update the lower triangle of A(1:k,1:k)
*
- AKK = A( K, K )
- BKK = B( K, K )
+ AKK = DBLE( A( K, K ) )
+ BKK = DBLE( B( K, K ) )
CALL ZLACGV( K-1, A( K, 1 ), LDA )
CALL ZTRMV( UPLO, 'Conjugate transpose', 'Non-unit', K-1,
$ B, LDB, A( K, 1 ), LDA )