117 SUBROUTINE zdrvrf3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
118 + D_WORK_ZLANGE, Z_WORK_ZGEQRF, TAU )
125 INTEGER LDA, NN, NOUT
126 DOUBLE PRECISION THRESH
130 DOUBLE PRECISION D_WORK_ZLANGE( * )
131 COMPLEX*16 A( LDA, * ), ARF( * ), B1( LDA, * ),
133 COMPLEX*16 Z_WORK_ZGEQRF( * ), TAU( * )
140 parameter( zero = ( 0.0d+0, 0.0d+0 ) ,
141 + one = ( 1.0d+0, 0.0d+0 ) )
143 parameter( ntests = 1 )
146 CHARACTER UPLO, CFORM, DIAG, TRANS, SIDE
147 INTEGER I, IFORM, IIM, IIN, INFO, IUPLO, J, M, N, NA,
148 + nfail, nrun, iside, idiag, ialpha, itrans
153 CHARACTER UPLOS( 2 ), FORMS( 2 ), TRANSS( 2 ),
154 + diags( 2 ), sides( 2 )
155 INTEGER ISEED( 4 ), ISEEDY( 4 )
156 DOUBLE PRECISION RESULT( NTESTS )
160 DOUBLE PRECISION DLAMCH, ZLANGE
162 EXTERNAL dlamch, zlarnd, zlange, lsame
174 COMMON / srnamc / srnamt
177 DATA iseedy / 1988, 1989, 1990, 1991 /
178 DATA uplos /
'U',
'L' /
179 DATA forms /
'N',
'C' /
180 DATA sides /
'L',
'R' /
181 DATA transs /
'N',
'C' /
182 DATA diags /
'N',
'U' /
192 iseed( i ) = iseedy( i )
194 eps = dlamch(
'Precision' )
206 cform = forms( iform )
210 uplo = uplos( iuplo )
214 side = sides( iside )
218 trans = transs( itrans )
222 diag = diags( idiag )
226 IF ( ialpha.EQ.1 )
THEN
228 ELSE IF ( ialpha.EQ.2 )
THEN
231 alpha = zlarnd( 4, iseed )
241 IF ( iside.EQ.1 )
THEN
267 a( i, j ) = zlarnd( 4, iseed )
271 IF ( iuplo.EQ.1 )
THEN
277 CALL zgeqrf( na, na, a, lda, tau,
278 + z_work_zgeqrf, lda,
285 IF ( lsame( diag,
'U' ) )
THEN
288 a( i, j ) = a( i, j ) /
289 + ( 2.0 * a( j, j ) )
300 CALL zgelqf( na, na, a, lda, tau,
301 + z_work_zgeqrf, lda,
308 IF ( lsame( diag,
'U' ) )
THEN
311 a( i, j ) = a( i, j ) /
312 + ( 2.0 * a( i, i ) )
325 a( j, j ) = a( j, j ) *
332 CALL ztrttf( cform, uplo, na, a, lda, arf,
340 b1( i, j ) = zlarnd( 4, iseed )
341 b2( i, j ) = b1( i, j )
349 CALL ztrsm( side, uplo, trans, diag, m, n,
350 + alpha, a, lda, b1, lda )
356 CALL ztfsm( cform, side, uplo, trans,
357 + diag, m, n, alpha, arf, b2,
364 b1( i, j ) = b2( i, j ) - b1( i, j )
368 result( 1 ) = zlange(
'I', m, n, b1, lda,
371 result( 1 ) = result( 1 ) / sqrt( eps )
372 + / max( max( m, n ), 1 )
374 IF( result( 1 ).GE.thresh )
THEN
375 IF( nfail.EQ.0 )
THEN
377 WRITE( nout, fmt = 9999 )
379 WRITE( nout, fmt = 9997 )
'ZTFSM',
380 + cform, side, uplo, trans, diag, m,
396 IF ( nfail.EQ.0 )
THEN
397 WRITE( nout, fmt = 9996 )
'ZTFSM', nrun
399 WRITE( nout, fmt = 9995 )
'ZTFSM', nfail, nrun
402 9999
FORMAT( 1x,
' *** Error(s) or Failure(s) while testing ZTFSM
404 9997
FORMAT( 1x,
' Failure in ',a5,
', CFORM=''',a1,
''',',
405 +
' SIDE=''',a1,
''',',
' UPLO=''',a1,
''',',
' TRANS=''',a1,
''',',
406 +
' DIAG=''',a1,
''',',
' M=',i3,
', N =', i3,
', test=',g12.5)
407 9996
FORMAT( 1x,
'All tests for ',a5,
' auxiliary routine passed the ',
408 +
'threshold ( ',i5,
' tests run)')
409 9995
FORMAT( 1x, a6,
' auxiliary routine:',i5,
' out of ',i5,
410 +
' tests failed to pass the threshold')
subroutine zgelqf(m, n, a, lda, tau, work, lwork, info)
ZGELQF
subroutine zgeqlf(m, n, a, lda, tau, work, lwork, info)
ZGEQLF
subroutine zgeqrf(m, n, a, lda, tau, work, lwork, info)
ZGEQRF
subroutine ztfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)
ZTFSM solves a matrix equation (one operand is a triangular matrix in RFP format).
subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRSM
subroutine ztrttf(transr, uplo, n, a, lda, arf, info)
ZTRTTF copies a triangular matrix from the standard full format (TR) to the rectangular full packed f...
subroutine zdrvrf3(nout, nn, nval, thresh, a, lda, arf, b1, b2, d_work_zlange, z_work_zgeqrf, tau)
ZDRVRF3