115 SUBROUTINE sort01( ROWCOL, M, N, U, LDU, WORK, LWORK, RESID )
123 INTEGER LDU, LWORK, M, N
127 REAL U( LDU, * ), WORK( * )
134 parameter( zero = 0.0e+0, one = 1.0e+0 )
138 INTEGER I, J, K, LDWORK, MNMIN
143 REAL SDOT, SLAMCH, SLANSY
144 EXTERNAL lsame, sdot, slamch, slansy
150 INTRINSIC max, min, real
158 IF( m.LE.0 .OR. n.LE.0 )
161 eps = slamch(
'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 slaset(
'Upper', mnmin, mnmin, zero, one, work, ldwork )
181 CALL ssyrk(
'Upper', transu, mnmin, k, -one, u, ldu, one, work,
186 resid = slansy(
'1',
'Upper', mnmin, work, ldwork,
187 $ work( ldwork*mnmin+1 ) )
188 resid = ( resid / real( k ) ) / eps
189 ELSE IF( transu.EQ.
'T' )
THEN
200 tmp = tmp - sdot( m, u( 1, i ), 1, u( 1, j ), 1 )
201 resid = max( resid, abs( tmp ) )
204 resid = ( resid / real( m ) ) / eps
216 tmp = tmp - sdot( n, u( j, 1 ), ldu, u( i, 1 ), ldu )
217 resid = max( resid, abs( tmp ) )
220 resid = ( resid / real( n ) ) / eps
subroutine ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
SSYRK
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine sort01(rowcol, m, n, u, ldu, work, lwork, resid)
SORT01