116 SUBROUTINE sdrvrf3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
117 + S_WORK_SLANGE, S_WORK_SGEQRF, TAU )
124 INTEGER LDA, NN, NOUT
129 REAL A( LDA, * ), ARF( * ), B1( LDA, * ),
130 + b2( lda, * ), s_work_sgeqrf( * ),
131 + s_work_slange( * ), tau( * )
138 parameter( zero = ( 0.0e+0, 0.0e+0 ) ,
139 + one = ( 1.0e+0, 0.0e+0 ) )
141 parameter( ntests = 1 )
144 CHARACTER UPLO, CFORM, DIAG, TRANS, SIDE
145 INTEGER I, IFORM, IIM, IIN, INFO, IUPLO, J, M, N, NA,
146 + nfail, nrun, iside, idiag, ialpha, itrans
150 CHARACTER UPLOS( 2 ), FORMS( 2 ), TRANSS( 2 ),
151 + diags( 2 ), sides( 2 )
152 INTEGER ISEED( 4 ), ISEEDY( 4 )
153 REAL RESULT( NTESTS )
157 REAL SLAMCH, SLANGE, SLARND
158 EXTERNAL slamch, slange, slarnd, lsame
170 COMMON / srnamc / srnamt
173 DATA iseedy / 1988, 1989, 1990, 1991 /
174 DATA uplos /
'U',
'L' /
175 DATA forms /
'N',
'T' /
176 DATA sides /
'L',
'R' /
177 DATA transs /
'N',
'T' /
178 DATA diags /
'N',
'U' /
188 iseed( i ) = iseedy( i )
190 eps = slamch(
'Precision' )
202 cform = forms( iform )
206 uplo = uplos( iuplo )
210 side = sides( iside )
214 trans = transs( itrans )
218 diag = diags( idiag )
222 IF ( ialpha.EQ.1 )
THEN
224 ELSE IF ( ialpha.EQ.2 )
THEN
227 alpha = slarnd( 2, iseed )
237 IF ( iside.EQ.1 )
THEN
263 a( i, j ) = slarnd( 2, iseed )
267 IF ( iuplo.EQ.1 )
THEN
273 CALL sgeqrf( na, na, a, lda, tau,
274 + s_work_sgeqrf, lda,
281 IF ( lsame( diag,
'U' ) )
THEN
284 a( i, j ) = a( i, j ) /
285 + ( 2.0 * a( j, j ) )
296 CALL sgelqf( na, na, a, lda, tau,
297 + s_work_sgeqrf, lda,
304 IF ( lsame( diag,
'U' ) )
THEN
307 a( i, j ) = a( i, j ) /
308 + ( 2.0 * a( i, i ) )
318 CALL strttf( cform, uplo, na, a, lda, arf,
326 b1( i, j ) = slarnd( 2, iseed )
327 b2( i, j ) = b1( i, j )
335 CALL strsm( side, uplo, trans, diag, m, n,
336 + alpha, a, lda, b1, lda )
342 CALL stfsm( cform, side, uplo, trans,
343 + diag, m, n, alpha, arf, b2,
350 b1( i, j ) = b2( i, j ) - b1( i, j )
354 result( 1 ) = slange(
'I', m, n, b1, lda,
357 result( 1 ) = result( 1 ) / sqrt( eps )
358 + / max( max( m, n ), 1 )
360 IF( result( 1 ).GE.thresh )
THEN
361 IF( nfail.EQ.0 )
THEN
363 WRITE( nout, fmt = 9999 )
365 WRITE( nout, fmt = 9997 )
'STFSM',
366 + cform, side, uplo, trans, diag, m,
382 IF ( nfail.EQ.0 )
THEN
383 WRITE( nout, fmt = 9996 )
'STFSM', nrun
385 WRITE( nout, fmt = 9995 )
'STFSM', nfail, nrun
388 9999
FORMAT( 1x,
' *** Error(s) or Failure(s) while testing STFSM
390 9997
FORMAT( 1x,
' Failure in ',a5,
', CFORM=''',a1,
''',',
391 +
' SIDE=''',a1,
''',',
' UPLO=''',a1,
''',',
' TRANS=''',a1,
''',',
392 +
' DIAG=''',a1,
''',',
' M=',i3,
', N =', i3,
', test=',g12.5)
393 9996
FORMAT( 1x,
'All tests for ',a5,
' auxiliary routine passed the ',
394 +
'threshold ( ',i5,
' tests run)')
395 9995
FORMAT( 1x, a6,
' auxiliary routine: ',i5,
' out of ',i5,
396 +
' tests failed to pass the threshold')
subroutine sgelqf(m, n, a, lda, tau, work, lwork, info)
SGELQF
subroutine sgeqlf(m, n, a, lda, tau, work, lwork, info)
SGEQLF
subroutine sgeqrf(m, n, a, lda, tau, work, lwork, info)
SGEQRF
subroutine stfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)
STFSM solves a matrix equation (one operand is a triangular matrix in RFP format).
subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRSM
subroutine strttf(transr, uplo, n, a, lda, arf, info)
STRTTF copies a triangular matrix from the standard full format (TR) to the rectangular full packed f...
subroutine sdrvrf3(nout, nn, nval, thresh, a, lda, arf, b1, b2, s_work_slange, s_work_sgeqrf, tau)
SDRVRF3