1: *> \brief \b DLARMM
2: *
3: * Definition:
4: * ===========
5: *
6: * DOUBLE PRECISION FUNCTION DLARMM( ANORM, BNORM, CNORM )
7: *
8: * .. Scalar Arguments ..
9: * DOUBLE PRECISION ANORM, BNORM, CNORM
10: * ..
11: *
12: *> \par Purpose:
13: * =======
14: *>
15: *> \verbatim
16: *>
17: *> DLARMM returns a factor s in (0, 1] such that the linear updates
18: *>
19: *> (s * C) - A * (s * B) and (s * C) - (s * A) * B
20: *>
21: *> cannot overflow, where A, B, and C are matrices of conforming
22: *> dimensions.
23: *>
24: *> This is an auxiliary routine so there is no argument checking.
25: *> \endverbatim
26: *
27: * Arguments:
28: * =========
29: *
30: *> \param[in] ANORM
31: *> \verbatim
32: *> ANORM is DOUBLE PRECISION
33: *> The infinity norm of A. ANORM >= 0.
34: *> The number of rows of the matrix A. M >= 0.
35: *> \endverbatim
36: *>
37: *> \param[in] BNORM
38: *> \verbatim
39: *> BNORM is DOUBLE PRECISION
40: *> The infinity norm of B. BNORM >= 0.
41: *> \endverbatim
42: *>
43: *> \param[in] CNORM
44: *> \verbatim
45: *> CNORM is DOUBLE PRECISION
46: *> The infinity norm of C. CNORM >= 0.
47: *> \endverbatim
48: *>
49: *>
50: * =====================================================================
51: *> References:
52: *> C. C. Kjelgaard Mikkelsen and L. Karlsson, Blocked Algorithms for
53: *> Robust Solution of Triangular Linear Systems. In: International
54: *> Conference on Parallel Processing and Applied Mathematics, pages
55: *> 68--78. Springer, 2017.
56: *>
57: *> \ingroup OTHERauxiliary
58: * =====================================================================
59:
60: DOUBLE PRECISION FUNCTION DLARMM( ANORM, BNORM, CNORM )
61: IMPLICIT NONE
62: * .. Scalar Arguments ..
63: DOUBLE PRECISION ANORM, BNORM, CNORM
64: * .. Parameters ..
65: DOUBLE PRECISION ONE, HALF, FOUR
66: PARAMETER ( ONE = 1.0D0, HALF = 0.5D+0, FOUR = 4.0D0 )
67: * ..
68: * .. Local Scalars ..
69: DOUBLE PRECISION BIGNUM, SMLNUM
70: * ..
71: * .. External Functions ..
72: DOUBLE PRECISION DLAMCH
73: EXTERNAL DLAMCH
74: * ..
75: * .. Executable Statements ..
76: *
77: *
78: * Determine machine dependent parameters to control overflow.
79: *
80: SMLNUM = DLAMCH( 'Safe minimum' ) / DLAMCH( 'Precision' )
81: BIGNUM = ( ONE / SMLNUM ) / FOUR
82: *
83: * Compute a scale factor.
84: *
85: DLARMM = ONE
86: IF( BNORM .LE. ONE ) THEN
87: IF( ANORM * BNORM .GT. BIGNUM - CNORM ) THEN
88: DLARMM = HALF
89: END IF
90: ELSE
91: IF( ANORM .GT. (BIGNUM - CNORM) / BNORM ) THEN
92: DLARMM = HALF / BNORM
93: END IF
94: END IF
95: RETURN
96: *
97: * ==== End of DLARMM ====
98: *
99: END
CVSweb interface <joel.bertrand@systella.fr>