117 SUBROUTINE sort01( ROWCOL, M, N, U, LDU, WORK, LWORK, RESID )
126 INTEGER LDU, LWORK, M, N
130 REAL U( ldu, * ), WORK( * )
137 parameter ( zero = 0.0e+0, one = 1.0e+0 )
141 INTEGER I, J, K, LDWORK, MNMIN
146 REAL SDOT, SLAMCH, SLANSY
147 EXTERNAL lsame, sdot, slamch, slansy
153 INTRINSIC max, min, real
161 IF( m.LE.0 .OR. n.LE.0 )
164 eps = slamch(
'Precision' )
165 IF( m.LT.n .OR. ( m.EQ.n .AND. lsame( rowcol,
'R' ) ) )
THEN
174 IF( ( mnmin+1 )*mnmin.LE.lwork )
THEN
179 IF( ldwork.GT.0 )
THEN
183 CALL slaset(
'Upper', mnmin, mnmin, zero, one, work, ldwork )
184 CALL ssyrk(
'Upper', transu, mnmin, k, -one, u, ldu, one, work,
189 resid = slansy(
'1',
'Upper', mnmin, work, ldwork,
190 $ work( ldwork*mnmin+1 ) )
191 resid = ( resid /
REAL( K ) ) / eps
192 ELSE IF( transu.EQ.
'T' )
THEN
203 tmp = tmp - sdot( m, u( 1, i ), 1, u( 1, j ), 1 )
204 resid = max( resid, abs( tmp ) )
207 resid = ( resid /
REAL( M ) ) / eps
219 tmp = tmp - sdot( n, u( j, 1 ), ldu, u( i, 1 ), ldu )
220 resid = max( resid, abs( tmp ) )
223 resid = ( resid /
REAL( N ) ) / eps
subroutine ssyrk(UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)
SSYRK
subroutine sort01(ROWCOL, M, N, U, LDU, WORK, LWORK, RESID)
SORT01
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...