forked from Reference-LAPACK/lapack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add level-3 BLAS triangular Sylvester equation solver
Force compatibility with [ds]trsyl. Use two floating-point scaling factors (rather than integer scaling factors). This does not eliminate the problem that scalings can be flushed, making any result useless. That problem could be eliminated by replacing the floating-point scale factor with an integer scale factor.
- Loading branch information
Showing
7 changed files
with
2,699 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
*> \brief \b DLARMM | ||
* | ||
* Definition: | ||
* =========== | ||
* | ||
* DOUBLE PRECISION FUNCTION DLARMM( ANORM, BNORM, CNORM ) | ||
* | ||
* .. Scalar Arguments .. | ||
* DOUBLE PRECISION ANORM, BNORM, CNORM | ||
* .. | ||
* | ||
*> \par Purpose: | ||
* ======= | ||
*> | ||
*> \verbatim | ||
*> | ||
*> DLARMM returns a factor s in (0, 1] such that the linear updates | ||
*> | ||
*> (s * C) - A * (s * B) and (s * C) - (s * A) * B | ||
*> | ||
*> cannot overflow, where A, B, and C are matrices of conforming | ||
*> dimensions. | ||
*> | ||
*> This is an auxiliary routine so there is no argument checking. | ||
*> \endverbatim | ||
* | ||
* Arguments: | ||
* ========= | ||
* | ||
*> \param[in] ANORM | ||
*> \verbatim | ||
*> ANORM is DOUBLE PRECISION | ||
*> The infinity norm of A. ANORM >= 0. | ||
*> The number of rows of the matrix A. M >= 0. | ||
*> \endverbatim | ||
*> | ||
*> \param[in] BNORM | ||
*> \verbatim | ||
*> BNORM is DOUBLE PRECISION | ||
*> The infinity norm of B. BNORM >= 0. | ||
*> \endverbatim | ||
*> | ||
*> \param[in] CNORM | ||
*> \verbatim | ||
*> CNORM is DOUBLE PRECISION | ||
*> The infinity norm of C. CNORM >= 0. | ||
*> \endverbatim | ||
*> | ||
*> | ||
* ===================================================================== | ||
*> References: | ||
*> C. C. Kjelgaard Mikkelsen and L. Karlsson, Blocked Algorithms for | ||
*> Robust Solution of Triangular Linear Systems. In: International | ||
*> Conference on Parallel Processing and Applied Mathematics, pages | ||
*> 68--78. Springer, 2017. | ||
*> | ||
*> \ingroup OTHERauxiliary | ||
* ===================================================================== | ||
|
||
DOUBLE PRECISION FUNCTION DLARMM( ANORM, BNORM, CNORM ) | ||
IMPLICIT NONE | ||
* .. Scalar Arguments .. | ||
DOUBLE PRECISION ANORM, BNORM, CNORM | ||
* .. Parameters .. | ||
DOUBLE PRECISION ONE, HALF, FOUR | ||
PARAMETER ( ONE = 1.0D0, HALF = 0.5D+0, FOUR = 4.0D0 ) | ||
* .. | ||
* .. Local Scalars .. | ||
DOUBLE PRECISION BIGNUM, SMLNUM | ||
* .. | ||
* .. External Functions .. | ||
DOUBLE PRECISION DLAMCH | ||
EXTERNAL DLAMCH | ||
* .. | ||
* .. Executable Statements .. | ||
* | ||
* | ||
* Determine machine dependent parameters to control overflow. | ||
* | ||
SMLNUM = DLAMCH( 'Safe minimum' ) / DLAMCH( 'Precision' ) | ||
BIGNUM = ( ONE / SMLNUM ) / FOUR | ||
* | ||
* Compute a scale factor. | ||
* | ||
DLARMM = ONE | ||
IF( BNORM .LE. ONE ) THEN | ||
IF( ANORM * BNORM .GT. BIGNUM - CNORM ) THEN | ||
DLARMM = HALF | ||
END IF | ||
ELSE | ||
IF( ANORM .GT. (BIGNUM - CNORM) / BNORM ) THEN | ||
DLARMM = HALF / BNORM | ||
END IF | ||
END IF | ||
RETURN | ||
* | ||
* ==== End of DLARMM ==== | ||
* | ||
END |
Oops, something went wrong.