116 SUBROUTINE ddrvrf3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
117 + D_WORK_DLANGE, D_WORK_DGEQRF, TAU )
124 INTEGER LDA, NN, NOUT
125 DOUBLE PRECISION THRESH
129 DOUBLE PRECISION A( LDA, * ), ARF( * ), B1( LDA, * ),
130 + b2( lda, * ), d_work_dgeqrf( * ),
131 + d_work_dlange( * ), tau( * )
137 DOUBLE PRECISION ZERO, ONE
138 parameter( zero = ( 0.0d+0, 0.0d+0 ) ,
139 + one = ( 1.0d+0, 0.0d+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
147 DOUBLE PRECISION EPS, ALPHA
150 CHARACTER UPLOS( 2 ), FORMS( 2 ), TRANSS( 2 ),
151 + diags( 2 ), sides( 2 )
152 INTEGER ISEED( 4 ), ISEEDY( 4 )
153 DOUBLE PRECISION RESULT( NTESTS )
157 DOUBLE PRECISION DLAMCH, DLANGE, DLARND
158 EXTERNAL dlamch, dlange, dlarnd, 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 = dlamch(
'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 = dlarnd( 2, iseed )
237 IF ( iside.EQ.1 )
THEN
263 a( i, j ) = dlarnd( 2, iseed )
267 IF ( iuplo.EQ.1 )
THEN
273 CALL dgeqrf( na, na, a, lda, tau,
274 + d_work_dgeqrf, lda,
281 IF ( lsame( diag,
'U' ) )
THEN
284 a( i, j ) = a( i, j ) /
285 + ( 2.0 * a( j, j ) )
296 CALL dgelqf( na, na, a, lda, tau,
297 + d_work_dgeqrf, lda,
304 IF ( lsame( diag,
'U' ) )
THEN
307 a( i, j ) = a( i, j ) /
308 + ( 2.0 * a( i, i ) )
318 CALL dtrttf( cform, uplo, na, a, lda, arf,
326 b1( i, j ) = dlarnd( 2, iseed )
327 b2( i, j ) = b1( i, j )
335 CALL dtrsm( side, uplo, trans, diag, m, n,
336 + alpha, a, lda, b1, lda )
342 CALL dtfsm( cform, side, uplo, trans,
343 + diag, m, n, alpha, arf, b2,
350 b1( i, j ) = b2( i, j ) - b1( i, j )
354 result( 1 ) = dlange(
'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 )
'DTFSM',
366 + cform, side, uplo, trans, diag, m,
382 IF ( nfail.EQ.0 )
THEN
383 WRITE( nout, fmt = 9996 )
'DTFSM', nrun
385 WRITE( nout, fmt = 9995 )
'DTFSM', nfail, nrun
388 9999
FORMAT( 1x,
' *** Error(s) or Failure(s) while testing DTFSM
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 ddrvrf3(nout, nn, nval, thresh, a, lda, arf, b1, b2, d_work_dlange, d_work_dgeqrf, tau)
DDRVRF3
subroutine dtfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)
DTFSM solves a matrix equation (one operand is a triangular matrix in RFP format).