117 SUBROUTINE cdrvrf3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
118 + S_WORK_CLANGE, C_WORK_CGEQRF, TAU )
125 INTEGER LDA, NN, NOUT
130 REAL S_WORK_CLANGE( * )
131 COMPLEX A( LDA, * ), ARF( * ), B1( LDA, * ),
133 COMPLEX C_WORK_CGEQRF( * ), TAU( * )
140 parameter( zero = ( 0.0e+0, 0.0e+0 ) ,
141 + one = ( 1.0e+0, 0.0e+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 REAL RESULT( NTESTS )
162 EXTERNAL slamch, clarnd, clange, 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 = slamch(
'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 = clarnd( 4, iseed )
241 IF ( iside.EQ.1 )
THEN
267 a( i, j ) = clarnd( 4, iseed )
271 IF ( iuplo.EQ.1 )
THEN
277 CALL cgeqrf( na, na, a, lda, tau,
278 + c_work_cgeqrf, lda,
285 IF ( lsame( diag,
'U' ) )
THEN
288 a( i, j ) = a( i, j ) /
289 + ( 2.0 * a( j, j ) )
300 CALL cgelqf( na, na, a, lda, tau,
301 + c_work_cgeqrf, 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 ctrttf( cform, uplo, na, a, lda, arf,
340 b1( i, j ) = clarnd( 4, iseed )
341 b2( i, j ) = b1( i, j )
349 CALL ctrsm( side, uplo, trans, diag, m, n,
350 + alpha, a, lda, b1, lda )
356 CALL ctfsm( cform, side, uplo, trans,
357 + diag, m, n, alpha, arf, b2,
364 b1( i, j ) = b2( i, j ) - b1( i, j )
368 result( 1 ) = clange(
'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 )
'CTFSM',
380 + cform, side, uplo, trans, diag, m,
396 IF ( nfail.EQ.0 )
THEN
397 WRITE( nout, fmt = 9996 )
'CTFSM', nrun
399 WRITE( nout, fmt = 9995 )
'CTFSM', nfail, nrun
402 9999
FORMAT( 1x,
' *** Error(s) or Failure(s) while testing CTFSM
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 cdrvrf3(nout, nn, nval, thresh, a, lda, arf, b1, b2, s_work_clange, c_work_cgeqrf, tau)
CDRVRF3
subroutine cgelqf(m, n, a, lda, tau, work, lwork, info)
CGELQF
subroutine cgeqlf(m, n, a, lda, tau, work, lwork, info)
CGEQLF
subroutine cgeqrf(m, n, a, lda, tau, work, lwork, info)
CGEQRF
subroutine ctfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)
CTFSM solves a matrix equation (one operand is a triangular matrix in RFP format).
subroutine ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRSM
subroutine ctrttf(transr, uplo, n, a, lda, arf, info)
CTRTTF copies a triangular matrix from the standard full format (TR) to the rectangular full packed f...