115 SUBROUTINE dort01( ROWCOL, M, N, U, LDU, WORK, LWORK, RESID )
123 INTEGER LDU, LWORK, M, N
124 DOUBLE PRECISION RESID
127 DOUBLE PRECISION U( LDU, * ), WORK( * )
133 DOUBLE PRECISION ZERO, ONE
134 parameter( zero = 0.0d+0, one = 1.0d+0 )
138 INTEGER I, J, K, LDWORK, MNMIN
139 DOUBLE PRECISION EPS, TMP
143 DOUBLE PRECISION DDOT, DLAMCH, DLANSY
144 EXTERNAL lsame, ddot, dlamch, dlansy
150 INTRINSIC abs, dble, max, min
158 IF( m.LE.0 .OR. n.LE.0 )
161 eps = dlamch(
'Precision' )
162 IF( m.LT.n .OR. ( m.EQ.n .AND. lsame( rowcol,
'R' ) ) )
THEN
171 IF( ( mnmin+1 )*mnmin.LE.lwork )
THEN
176 IF( ldwork.GT.0 )
THEN
180 CALL dlaset(
'Upper', mnmin, mnmin, zero, one, work, ldwork )
181 CALL dsyrk(
'Upper', transu, mnmin, k, -one, u, ldu, one, work,
186 resid = dlansy(
'1',
'Upper', mnmin, work, ldwork,
187 $ work( ldwork*mnmin+1 ) )
188 resid = ( resid / dble( k ) ) / eps
189 ELSE IF( transu.EQ.
'T' )
THEN
200 tmp = tmp - ddot( m, u( 1, i ), 1, u( 1, j ), 1 )
201 resid = max( resid, abs( tmp ) )
204 resid = ( resid / dble( m ) ) / eps
216 tmp = tmp - ddot( n, u( j, 1 ), ldu, u( i, 1 ), ldu )
217 resid = max( resid, abs( tmp ) )
220 resid = ( resid / dble( n ) ) / eps
subroutine dort01(rowcol, m, n, u, ldu, work, lwork, resid)
DORT01
subroutine dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
DSYRK
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.