Fix documentation error and ordering bug in ?LAED/?LASD (Reference-LAPACK PR 1140)pull/5353/head
| @@ -75,7 +75,7 @@ | |||||
| *> On entry, D contains the eigenvalues of the two submatrices to | *> On entry, D contains the eigenvalues of the two submatrices to | ||||
| *> be combined. | *> be combined. | ||||
| *> On exit, D contains the trailing (N-K) updated eigenvalues | *> On exit, D contains the trailing (N-K) updated eigenvalues | ||||
| *> (those which were deflated) sorted into increasing order. | |||||
| *> (those which were deflated) sorted into decreasing order. | |||||
| *> \endverbatim | *> \endverbatim | ||||
| *> | *> | ||||
| *> \param[in,out] Q | *> \param[in,out] Q | ||||
| @@ -85,7 +85,7 @@ | |||||
| *> D is DOUBLE PRECISION array, dimension (N) | *> D is DOUBLE PRECISION array, dimension (N) | ||||
| *> On entry, the eigenvalues of the two submatrices to be | *> On entry, the eigenvalues of the two submatrices to be | ||||
| *> combined. On exit, the trailing (N-K) updated eigenvalues | *> combined. On exit, the trailing (N-K) updated eigenvalues | ||||
| *> (those which were deflated) sorted into increasing order. | |||||
| *> (those which were deflated) sorted into decreasing order. | |||||
| *> \endverbatim | *> \endverbatim | ||||
| *> | *> | ||||
| *> \param[in,out] Q | *> \param[in,out] Q | ||||
| @@ -88,7 +88,7 @@ | |||||
| *> On entry D contains the singular values of the two submatrices | *> On entry D contains the singular values of the two submatrices | ||||
| *> to be combined. On exit D contains the trailing (N-K) updated | *> to be combined. On exit D contains the trailing (N-K) updated | ||||
| *> singular values (those which were deflated) sorted into | *> singular values (those which were deflated) sorted into | ||||
| *> increasing order. | |||||
| *> decreasing order. | |||||
| *> \endverbatim | *> \endverbatim | ||||
| *> | *> | ||||
| *> \param[out] Z | *> \param[out] Z | ||||
| @@ -219,7 +219,7 @@ | |||||
| *> IDXQ is INTEGER array, dimension(N) | *> IDXQ is INTEGER array, dimension(N) | ||||
| *> This contains the permutation which separately sorts the two | *> This contains the permutation which separately sorts the two | ||||
| *> sub-problems in D into ascending order. Note that entries in | *> sub-problems in D into ascending order. Note that entries in | ||||
| *> the first hlaf of this permutation must first be moved one | |||||
| *> the first half of this permutation must first be moved one | |||||
| *> position backward; and entries in the second half | *> position backward; and entries in the second half | ||||
| *> must first have NL+1 added to their values. | *> must first have NL+1 added to their values. | ||||
| *> \endverbatim | *> \endverbatim | ||||
| @@ -451,7 +451,7 @@ | |||||
| * | * | ||||
| * Check if singular values are close enough to allow deflation. | * Check if singular values are close enough to allow deflation. | ||||
| * | * | ||||
| IF( ABS( D( J )-D( JPREV ) ).LE.TOL ) THEN | |||||
| IF( ( D( J )-D( JPREV ) ).LE.TOL ) THEN | |||||
| * | * | ||||
| * Deflation is possible. | * Deflation is possible. | ||||
| * | * | ||||
| @@ -486,7 +486,14 @@ | |||||
| END IF | END IF | ||||
| COLTYP( JPREV ) = 4 | COLTYP( JPREV ) = 4 | ||||
| K2 = K2 - 1 | K2 = K2 - 1 | ||||
| IDXP( K2 ) = JPREV | |||||
| * | |||||
| * Insert the deflated index in the correct position in IDXP. | |||||
| * If J - JPREV is greater than 1, the indices in between | |||||
| * must be shifted to preserve the correct output order. | |||||
| * | |||||
| DO 105 JP = JPREV, J - 1 | |||||
| IDXP( K2 + J - 1 - JP ) = JP | |||||
| 105 CONTINUE | |||||
| JPREV = J | JPREV = J | ||||
| ELSE | ELSE | ||||
| K = K + 1 | K = K + 1 | ||||
| @@ -495,9 +495,9 @@ | |||||
| * If J - JPREV is greater than 1, the indices in between | * If J - JPREV is greater than 1, the indices in between | ||||
| * must be shifted to preserve the correct output order. | * must be shifted to preserve the correct output order. | ||||
| * | * | ||||
| DO 130 JP = JPREV, J - 1 | |||||
| DO 85 JP = JPREV, J - 1 | |||||
| IDXP( K2 + J - 1 - JP ) = JP | IDXP( K2 + J - 1 - JP ) = JP | ||||
| 130 CONTINUE | |||||
| 85 CONTINUE | |||||
| JPREV = J | JPREV = J | ||||
| ELSE | ELSE | ||||
| K = K + 1 | K = K + 1 | ||||
| @@ -75,7 +75,7 @@ | |||||
| *> On entry, D contains the eigenvalues of the two submatrices to | *> On entry, D contains the eigenvalues of the two submatrices to | ||||
| *> be combined. | *> be combined. | ||||
| *> On exit, D contains the trailing (N-K) updated eigenvalues | *> On exit, D contains the trailing (N-K) updated eigenvalues | ||||
| *> (those which were deflated) sorted into increasing order. | |||||
| *> (those which were deflated) sorted into decreasing order. | |||||
| *> \endverbatim | *> \endverbatim | ||||
| *> | *> | ||||
| *> \param[in,out] Q | *> \param[in,out] Q | ||||
| @@ -85,7 +85,7 @@ | |||||
| *> D is REAL array, dimension (N) | *> D is REAL array, dimension (N) | ||||
| *> On entry, the eigenvalues of the two submatrices to be | *> On entry, the eigenvalues of the two submatrices to be | ||||
| *> combined. On exit, the trailing (N-K) updated eigenvalues | *> combined. On exit, the trailing (N-K) updated eigenvalues | ||||
| *> (those which were deflated) sorted into increasing order. | |||||
| *> (those which were deflated) sorted into decreasing order. | |||||
| *> \endverbatim | *> \endverbatim | ||||
| *> | *> | ||||
| *> \param[in,out] Q | *> \param[in,out] Q | ||||
| @@ -88,7 +88,7 @@ | |||||
| *> On entry D contains the singular values of the two submatrices | *> On entry D contains the singular values of the two submatrices | ||||
| *> to be combined. On exit D contains the trailing (N-K) updated | *> to be combined. On exit D contains the trailing (N-K) updated | ||||
| *> singular values (those which were deflated) sorted into | *> singular values (those which were deflated) sorted into | ||||
| *> increasing order. | |||||
| *> decreasing order. | |||||
| *> \endverbatim | *> \endverbatim | ||||
| *> | *> | ||||
| *> \param[out] Z | *> \param[out] Z | ||||
| @@ -219,7 +219,7 @@ | |||||
| *> IDXQ is INTEGER array, dimension (N) | *> IDXQ is INTEGER array, dimension (N) | ||||
| *> This contains the permutation which separately sorts the two | *> This contains the permutation which separately sorts the two | ||||
| *> sub-problems in D into ascending order. Note that entries in | *> sub-problems in D into ascending order. Note that entries in | ||||
| *> the first hlaf of this permutation must first be moved one | |||||
| *> the first half of this permutation must first be moved one | |||||
| *> position backward; and entries in the second half | *> position backward; and entries in the second half | ||||
| *> must first have NL+1 added to their values. | *> must first have NL+1 added to their values. | ||||
| *> \endverbatim | *> \endverbatim | ||||
| @@ -451,7 +451,7 @@ | |||||
| * | * | ||||
| * Check if singular values are close enough to allow deflation. | * Check if singular values are close enough to allow deflation. | ||||
| * | * | ||||
| IF( ABS( D( J )-D( JPREV ) ).LE.TOL ) THEN | |||||
| IF( ( D( J )-D( JPREV ) ).LE.TOL ) THEN | |||||
| * | * | ||||
| * Deflation is possible. | * Deflation is possible. | ||||
| * | * | ||||
| @@ -486,7 +486,14 @@ | |||||
| END IF | END IF | ||||
| COLTYP( JPREV ) = 4 | COLTYP( JPREV ) = 4 | ||||
| K2 = K2 - 1 | K2 = K2 - 1 | ||||
| IDXP( K2 ) = JPREV | |||||
| * | |||||
| * Insert the deflated index in the correct position in IDXP. | |||||
| * If J - JPREV is greater than 1, the indices in between | |||||
| * must be shifted to preserve the correct output order. | |||||
| * | |||||
| DO 105 JP = JPREV, J - 1 | |||||
| IDXP( K2 + J - 1 - JP ) = JP | |||||
| 105 CONTINUE | |||||
| JPREV = J | JPREV = J | ||||
| ELSE | ELSE | ||||
| K = K + 1 | K = K + 1 | ||||
| @@ -101,7 +101,7 @@ | |||||
| *> On entry D contains the singular values of the two submatrices | *> On entry D contains the singular values of the two submatrices | ||||
| *> to be combined. On exit D contains the trailing (N-K) updated | *> to be combined. On exit D contains the trailing (N-K) updated | ||||
| *> singular values (those which were deflated) sorted into | *> singular values (those which were deflated) sorted into | ||||
| *> increasing order. | |||||
| *> decreasing order. | |||||
| *> \endverbatim | *> \endverbatim | ||||
| *> | *> | ||||
| *> \param[out] Z | *> \param[out] Z | ||||
| @@ -454,7 +454,7 @@ | |||||
| * | * | ||||
| * Check if singular values are close enough to allow deflation. | * Check if singular values are close enough to allow deflation. | ||||
| * | * | ||||
| IF( ABS( D( J )-D( JPREV ) ).LE.TOL ) THEN | |||||
| IF( ( D( J )-D( JPREV ) ).LE.TOL ) THEN | |||||
| * | * | ||||
| * Deflation is possible. | * Deflation is possible. | ||||
| * | * | ||||
| @@ -490,7 +490,14 @@ | |||||
| CALL SROT( 1, VF( JPREV ), 1, VF( J ), 1, C, S ) | CALL SROT( 1, VF( JPREV ), 1, VF( J ), 1, C, S ) | ||||
| CALL SROT( 1, VL( JPREV ), 1, VL( J ), 1, C, S ) | CALL SROT( 1, VL( JPREV ), 1, VL( J ), 1, C, S ) | ||||
| K2 = K2 - 1 | K2 = K2 - 1 | ||||
| IDXP( K2 ) = JPREV | |||||
| * | |||||
| * Insert the deflated index in the correct position in IDXP. | |||||
| * If J - JPREV is greater than 1, the indices in between | |||||
| * must be shifted to preserve the correct output order. | |||||
| * | |||||
| DO 85 JP = JPREV, J - 1 | |||||
| IDXP( K2 + J - 1 - JP ) = JP | |||||
| 85 CONTINUE | |||||
| JPREV = J | JPREV = J | ||||
| ELSE | ELSE | ||||
| K = K + 1 | K = K + 1 | ||||