68 parameter( nin = 5, nout = 6 )
70 parameter( nsubs = 17 )
72 parameter( zero = ( 0.0d0, 0.0d0 ),
73 $ one = ( 1.0d0, 0.0d0 ) )
74 DOUBLE PRECISION rzero, rhalf, rone
75 parameter( rzero = 0.0d0, rhalf = 0.5d0, rone = 1.0d0 )
77 parameter( nmax = 65, incmax = 2 )
78 INTEGER ninmax, nidmax, nkbmax, nalmax, nbemax
79 parameter( ninmax = 7, nidmax = 9, nkbmax = 7,
80 $ nalmax = 7, nbemax = 7 )
82 DOUBLE PRECISION eps, err, thresh
83 INTEGER i, isnum, j, n, nalf, nbet, nidim, ninc, nkb,
85 LOGICAL fatal, ltestt, rewi, same, sfatal, trace,
86 $ tsterr, corder, rorder
91 COMPLEX*16 a( nmax, nmax ), aa( nmax*nmax ),
92 $ alf( nalmax ), as( nmax*nmax ), bet( nbemax ),
93 $ x( nmax ), xs( nmax*incmax ),
94 $ xx( nmax*incmax ), y( nmax ),
95 $ ys( nmax*incmax ), yt( nmax ),
96 $ yy( nmax*incmax ), z( 2*nmax )
97 DOUBLE PRECISION g( nmax )
98 INTEGER idim( nidmax ), inc( ninmax ), kb( nkbmax )
99 LOGICAL ltest( nsubs )
100 CHARACTER*12 snames( nsubs )
102 DOUBLE PRECISION ddiff
109 INTRINSIC abs, max, min
115 COMMON /infoc/infot, noutc, ok
116 COMMON /srnamc/srnamt
118 DATA snames/
'cblas_zgemv ',
'cblas_zgbmv ',
119 $
'cblas_zhemv ',
'cblas_zhbmv ',
'cblas_zhpmv ',
120 $
'cblas_ztrmv ',
'cblas_ztbmv ',
'cblas_ztpmv ',
121 $
'cblas_ztrsv ',
'cblas_ztbsv ',
'cblas_ztpsv ',
122 $
'cblas_zgerc ',
'cblas_zgeru ',
'cblas_zher ',
123 $
'cblas_zhpr ',
'cblas_zher2 ',
'cblas_zhpr2 '/
130 READ( nin, fmt = * )snaps
131 READ( nin, fmt = * )ntra
134 OPEN( ntra, file = snaps )
137 READ( nin, fmt = * )rewi
138 rewi = rewi.AND.trace
140 READ( nin, fmt = * )sfatal
142 READ( nin, fmt = * )tsterr
144 READ( nin, fmt = * )layout
146 READ( nin, fmt = * )thresh
151 READ( nin, fmt = * )nidim
152 IF( nidim.LT.1.OR.nidim.GT.nidmax )
THEN
153 WRITE( nout, fmt = 9997 )
'N', nidmax
156 READ( nin, fmt = * )( idim( i ), i = 1, nidim )
158 IF( idim( i ).LT.0.OR.idim( i ).GT.nmax )
THEN
159 WRITE( nout, fmt = 9996 )nmax
164 READ( nin, fmt = * )nkb
165 IF( nkb.LT.1.OR.nkb.GT.nkbmax )
THEN
166 WRITE( nout, fmt = 9997 )
'K', nkbmax
169 READ( nin, fmt = * )( kb( i ), i = 1, nkb )
171 IF( kb( i ).LT.0 )
THEN
172 WRITE( nout, fmt = 9995 )
177 READ( nin, fmt = * )ninc
178 IF( ninc.LT.1.OR.ninc.GT.ninmax )
THEN
179 WRITE( nout, fmt = 9997 )
'INCX AND INCY', ninmax
182 READ( nin, fmt = * )( inc( i ), i = 1, ninc )
184 IF( inc( i ).EQ.0.OR.abs( inc( i ) ).GT.incmax )
THEN
185 WRITE( nout, fmt = 9994 )incmax
190 READ( nin, fmt = * )nalf
191 IF( nalf.LT.1.OR.nalf.GT.nalmax )
THEN
192 WRITE( nout, fmt = 9997 )
'ALPHA', nalmax
195 READ( nin, fmt = * )( alf( i ), i = 1, nalf )
197 READ( nin, fmt = * )nbet
198 IF( nbet.LT.1.OR.nbet.GT.nbemax )
THEN
199 WRITE( nout, fmt = 9997 )
'BETA', nbemax
202 READ( nin, fmt = * )( bet( i ), i = 1, nbet )
206 WRITE( nout, fmt = 9993 )
207 WRITE( nout, fmt = 9992 )( idim( i ), i = 1, nidim )
208 WRITE( nout, fmt = 9991 )( kb( i ), i = 1, nkb )
209 WRITE( nout, fmt = 9990 )( inc( i ), i = 1, ninc )
210 WRITE( nout, fmt = 9989 )( alf( i ), i = 1, nalf )
211 WRITE( nout, fmt = 9988 )( bet( i ), i = 1, nbet )
212 IF( .NOT.tsterr )
THEN
213 WRITE( nout, fmt = * )
214 WRITE( nout, fmt = 9980 )
216 WRITE( nout, fmt = * )
217 WRITE( nout, fmt = 9999 )thresh
218 WRITE( nout, fmt = * )
221 IF (layout.EQ.2)
THEN
224 WRITE( *, fmt = 10002 )
225 ELSE IF (layout.EQ.1)
THEN
227 WRITE( *, fmt = 10001 )
228 ELSE IF (layout.EQ.0)
THEN
230 WRITE( *, fmt = 10000 )
240 50
READ( nin, fmt = 9984,
END = 80 )SNAMET, ltestt
242 IF( snamet.EQ.snames( i ) )
245 WRITE( nout, fmt = 9986 )snamet
247 70 ltest( i ) = ltestt
257 IF(
ddiff( rone + eps, rone ).EQ.rzero )
263 WRITE( nout, fmt = 9998 )eps
270 a( i, j ) = max( i - j + 1, 0 )
276 yy( j ) = j*( ( j + 1 )*j )/2 - ( ( j + 1 )*j*( j - 1 ) )/3
281 CALL zmvch( trans, n, n, one, a, nmax, x, 1, zero, y, 1, yt, g,
282 $ yy, eps, err, fatal, nout, .true. )
283 same =
lze( yy, yt, n )
284 IF( .NOT.same.OR.err.NE.rzero )
THEN
285 WRITE( nout, fmt = 9985 )trans, same, err
289 CALL zmvch( trans, n, n, one, a, nmax, x, -1, zero, y, -1, yt, g,
290 $ yy, eps, err, fatal, nout, .true. )
291 same =
lze( yy, yt, n )
292 IF( .NOT.same.OR.err.NE.rzero )
THEN
293 WRITE( nout, fmt = 9985 )trans, same, err
299 DO 210 isnum = 1, nsubs
300 WRITE( nout, fmt = * )
301 IF( .NOT.ltest( isnum ) )
THEN
303 WRITE( nout, fmt = 9983 )snames( isnum )
305 srnamt = snames( isnum )
308 CALL cz2chke( snames( isnum ) )
309 WRITE( nout, fmt = * )
315 GO TO ( 140, 140, 150, 150, 150, 160, 160,
316 $ 160, 160, 160, 160, 170, 170, 180,
317 $ 180, 190, 190 )isnum
320 CALL zchk1( snames( isnum ), eps, thresh, nout, ntra, trace,
321 $ rewi, fatal, nidim, idim, nkb, kb, nalf, alf,
322 $ nbet, bet, ninc, inc, nmax, incmax, a, aa, as,
323 $ x, xx, xs, y, yy, ys, yt, g, 0 )
326 CALL zchk1( snames( isnum ), eps, thresh, nout, ntra, trace,
327 $ rewi, fatal, nidim, idim, nkb, kb, nalf, alf,
328 $ nbet, bet, ninc, inc, nmax, incmax, a, aa, as,
329 $ x, xx, xs, y, yy, ys, yt, g, 1 )
334 CALL zchk2( snames( isnum ), eps, thresh, nout, ntra, trace,
335 $ rewi, fatal, nidim, idim, nkb, kb, nalf, alf,
336 $ nbet, bet, ninc, inc, nmax, incmax, a, aa, as,
337 $ x, xx, xs, y, yy, ys, yt, g, 0 )
340 CALL zchk2( snames( isnum ), eps, thresh, nout, ntra, trace,
341 $ rewi, fatal, nidim, idim, nkb, kb, nalf, alf,
342 $ nbet, bet, ninc, inc, nmax, incmax, a, aa, as,
343 $ x, xx, xs, y, yy, ys, yt, g, 1 )
349 CALL zchk3( snames( isnum ), eps, thresh, nout, ntra, trace,
350 $ rewi, fatal, nidim, idim, nkb, kb, ninc, inc,
351 $ nmax, incmax, a, aa, as, y, yy, ys, yt, g, z,
355 CALL zchk3( snames( isnum ), eps, thresh, nout, ntra, trace,
356 $ rewi, fatal, nidim, idim, nkb, kb, ninc, inc,
357 $ nmax, incmax, a, aa, as, y, yy, ys, yt, g, z,
363 CALL zchk4( snames( isnum ), eps, thresh, nout, ntra, trace,
364 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
365 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
369 CALL zchk4( snames( isnum ), eps, thresh, nout, ntra, trace,
370 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
371 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
377 CALL zchk5( snames( isnum ), eps, thresh, nout, ntra, trace,
378 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
379 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
383 CALL zchk5( snames( isnum ), eps, thresh, nout, ntra, trace,
384 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
385 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
391 CALL zchk6( snames( isnum ), eps, thresh, nout, ntra, trace,
392 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
393 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
397 CALL zchk6( snames( isnum ), eps, thresh, nout, ntra, trace,
398 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
399 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
403 200
IF( fatal.AND.sfatal )
407 WRITE( nout, fmt = 9982 )
411 WRITE( nout, fmt = 9981 )
415 WRITE( nout, fmt = 9987 )
42310002
FORMAT(
' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
42410001
FORMAT(
' ROW-MAJOR DATA LAYOUT IS TESTED' )
42510000
FORMAT(
' COLUMN-MAJOR DATA LAYOUT IS TESTED' )
426 9999
FORMAT(
' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',
428 9998
FORMAT(
' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1p, e9.1 )
429 9997
FORMAT(
' NUMBER OF VALUES OF ', a,
' IS LESS THAN 1 OR GREATER ',
431 9996
FORMAT(
' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', i2 )
432 9995
FORMAT(
' VALUE OF K IS LESS THAN 0' )
433 9994
FORMAT(
' ABSOLUTE VALUE OF INCX OR INCY IS 0 OR GREATER THAN ',
435 9993
FORMAT(
' TESTS OF THE COMPLEX*16 LEVEL 2 BLAS', //
' THE F',
436 $
'OLLOWING PARAMETER VALUES WILL BE USED:' )
437 9992
FORMAT(
' FOR N ', 9i6 )
438 9991
FORMAT(
' FOR K ', 7i6 )
439 9990
FORMAT(
' FOR INCX AND INCY ', 7i6 )
440 9989
FORMAT(
' FOR ALPHA ',
441 $ 7(
'(', f4.1,
',', f4.1,
') ', : ) )
442 9988
FORMAT(
' FOR BETA ',
443 $ 7(
'(', f4.1,
',', f4.1,
') ', : ) )
444 9987
FORMAT(
' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',
445 $ /
' ******* TESTS ABANDONED *******' )
446 9986
FORMAT(
' SUBPROGRAM NAME ',a12,
' NOT RECOGNIZED', /
' ******* T',
447 $
'ESTS ABANDONED *******' )
448 9985
FORMAT(
' ERROR IN CMVCH - IN-LINE DOT PRODUCTS ARE BEING EVALU',
449 $
'ATED WRONGLY.', /
' CMVCH WAS CALLED WITH TRANS = ', a1,
450 $
' AND RETURNED SAME = ', l1,
' AND ERR = ', f12.3,
'.', /
451 $
' THIS MAY BE DUE TO FAULTS IN THE ARITHMETIC OR THE COMPILER.'
452 $ , /
' ******* TESTS ABANDONED *******' )
453 9984
FORMAT( a12, l2 )
454 9983
FORMAT( 1x,a12,
' WAS NOT TESTED' )
455 9982
FORMAT( /
' END OF TESTS' )
456 9981
FORMAT( /
' ******* FATAL ERROR - TESTS ABANDONED *******' )
457 9980
FORMAT(
' ERROR-EXITS WILL NOT BE TESTED' )
462 SUBROUTINE zchk1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
463 $ FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,
464 $ BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,
465 $ XS, Y, YY, YS, YT, G, IORDER )
476 COMPLEX*16 ZERO, HALF
477 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
478 $ half = ( 0.5d0, 0.0d0 ) )
479 DOUBLE PRECISION RZERO
480 parameter( rzero = 0.0d0 )
482 DOUBLE PRECISION EPS, THRESH
483 INTEGER INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,
485 LOGICAL FATAL, REWI, TRACE
488 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
489 $ as( nmax*nmax ), bet( nbet ), x( nmax ),
490 $ xs( nmax*incmax ), xx( nmax*incmax ),
491 $ y( nmax ), ys( nmax*incmax ), yt( nmax ),
493 DOUBLE PRECISION G( NMAX )
494 INTEGER IDIM( NIDIM ), INC( NINC ), KB( NKB )
496 COMPLEX*16 ALPHA, ALS, BETA, BLS, TRANSL
497 DOUBLE PRECISION ERR, ERRMAX
498 INTEGER I, IA, IB, IC, IKU, IM, IN, INCX, INCXS, INCY,
499 $ incys, ix, iy, kl, kls, ku, kus, laa, lda,
500 $ ldas, lx, ly, m, ml, ms, n, nargs, nc, nd, nk,
502 LOGICAL BANDED, FULL, NULL, RESET, SAME, TRAN
503 CHARACTER*1 TRANS, TRANSS
514 INTRINSIC abs, max, min
519 COMMON /infoc/infot, noutc, ok
523 full = sname( 9: 9 ).EQ.
'e'
524 banded = sname( 9: 9 ).EQ.
'b'
528 ELSE IF( banded )
THEN
542 $ m = max( n - nd, 0 )
544 $ m = min( n + nd, nmax )
554 kl = max( ku - 1, 0 )
571 null = n.LE.0.OR.m.LE.0
576 CALL zmake( sname( 8: 9 ),
' ',
' ', m, n, a, nmax, aa,
577 $ lda, kl, ku, reset, transl )
580 trans = ich( ic: ic )
581 IF (trans.EQ.
'N')
THEN
582 ctrans =
' CblasNoTrans'
583 ELSE IF (trans.EQ.
'T')
THEN
584 ctrans =
' CblasTrans'
586 ctrans =
'CblasConjTrans'
588 tran = trans.EQ.
'T'.OR.trans.EQ.
'C'
605 CALL zmake(
'ge',
' ',
' ', 1, nl, x, 1, xx,
606 $ abs( incx ), 0, nl - 1, reset, transl )
609 xx( 1 + abs( incx )*( nl/2 - 1 ) ) = zero
625 CALL zmake(
'ge',
' ',
' ', 1, ml, y, 1,
626 $ yy, abs( incy ), 0, ml - 1,
658 $
WRITE( ntra, fmt = 9994 )nc, sname,
659 $ ctrans, m, n, alpha, lda, incx, beta,
663 CALL czgemv( iorder, trans, m, n,
664 $ alpha, aa, lda, xx, incx,
666 ELSE IF( banded )
THEN
668 $
WRITE( ntra, fmt = 9995 )nc, sname,
669 $ ctrans, m, n, kl, ku, alpha, lda,
673 CALL czgbmv( iorder, trans, m, n, kl,
674 $ ku, alpha, aa, lda, xx,
675 $ incx, beta, yy, incy )
681 WRITE( nout, fmt = 9993 )
689 isame( 1 ) = trans.EQ.transs
693 isame( 4 ) = als.EQ.alpha
694 isame( 5 ) = lze( as, aa, laa )
695 isame( 6 ) = ldas.EQ.lda
696 isame( 7 ) = lze( xs, xx, lx )
697 isame( 8 ) = incxs.EQ.incx
698 isame( 9 ) = bls.EQ.beta
700 isame( 10 ) = lze( ys, yy, ly )
702 isame( 10 ) = lzeres(
'ge',
' ', 1,
706 isame( 11 ) = incys.EQ.incy
707 ELSE IF( banded )
THEN
708 isame( 4 ) = kls.EQ.kl
709 isame( 5 ) = kus.EQ.ku
710 isame( 6 ) = als.EQ.alpha
711 isame( 7 ) = lze( as, aa, laa )
712 isame( 8 ) = ldas.EQ.lda
713 isame( 9 ) = lze( xs, xx, lx )
714 isame( 10 ) = incxs.EQ.incx
715 isame( 11 ) = bls.EQ.beta
717 isame( 12 ) = lze( ys, yy, ly )
719 isame( 12 ) = lzeres(
'ge',
' ', 1,
723 isame( 13 ) = incys.EQ.incy
731 same = same.AND.isame( i )
732 IF( .NOT.isame( i ) )
733 $
WRITE( nout, fmt = 9998 )i
744 CALL zmvch( trans, m, n, alpha, a,
745 $ nmax, x, incx, beta, y,
746 $ incy, yt, g, yy, eps, err,
747 $ fatal, nout, .true. )
748 errmax = max( errmax, err )
778 IF( errmax.LT.thresh )
THEN
779 WRITE( nout, fmt = 9999 )sname, nc
781 WRITE( nout, fmt = 9997 )sname, nc, errmax
786 WRITE( nout, fmt = 9996 )sname
788 WRITE( nout, fmt = 9994 )nc, sname, ctrans, m, n, alpha, lda,
790 ELSE IF( banded )
THEN
791 WRITE( nout, fmt = 9995 )nc, sname, ctrans, m, n, kl, ku,
792 $ alpha, lda, incx, beta, incy
798 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
800 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
801 $
'ANGED INCORRECTLY *******' )
802 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
803 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
804 $
' - SUSPECT *******' )
805 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
806 9995
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', 4( i3,
',' ),
'(',
807 $ f4.1,
',', f4.1,
'), A,',/ 10x, i3,
', X,', i2,
',(',
808 $ f4.1,
',', f4.1,
'), Y,', i2,
') .' )
809 9994
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', 2( i3,
',' ),
'(',
810 $ f4.1,
',', f4.1,
'), A,',/ 10x, i3,
', X,', i2,
',(',
811 $ f4.1,
',', f4.1,
'), Y,', i2,
') .' )
812 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
818 SUBROUTINE zchk2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
819 $ FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,
820 $ BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,
821 $ XS, Y, YY, YS, YT, G, IORDER )
832 COMPLEX*16 ZERO, HALF
833 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
834 $ half = ( 0.5d0, 0.0d0 ) )
835 DOUBLE PRECISION RZERO
836 PARAMETER ( RZERO = 0.0d0 )
838 DOUBLE PRECISION EPS, THRESH
839 INTEGER INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,
841 LOGICAL FATAL, REWI, TRACE
844 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
845 $ as( nmax*nmax ), bet( nbet ), x( nmax ),
846 $ xs( nmax*incmax ), xx( nmax*incmax ),
847 $ y( nmax ), ys( nmax*incmax ), yt( nmax ),
849 DOUBLE PRECISION G( NMAX )
850 INTEGER IDIM( NIDIM ), INC( NINC ), KB( NKB )
852 COMPLEX*16 ALPHA, ALS, BETA, BLS, TRANSL
853 DOUBLE PRECISION ERR, ERRMAX
854 INTEGER I, IA, IB, IC, IK, IN, INCX, INCXS, INCY,
855 $ incys, ix, iy, k, ks, laa, lda, ldas, lx, ly,
856 $ n, nargs, nc, nk, ns
857 LOGICAL BANDED, FULL, NULL, PACKED, RESET, SAME
858 CHARACTER*1 UPLO, UPLOS
874 COMMON /infoc/infot, noutc, ok
878 full = sname( 9: 9 ).EQ.
'e'
879 banded = sname( 9: 9 ).EQ.
'b'
880 packed = sname( 9: 9 ).EQ.
'p'
884 ELSE IF( banded )
THEN
886 ELSE IF( packed )
THEN
920 laa = ( n*( n + 1 ) )/2
929 cuplo =
' CblasUpper'
931 cuplo =
' CblasLower'
937 CALL zmake( sname( 8: 9 ), uplo,
' ', n, n, a, nmax, aa,
938 $ lda, k, k, reset, transl )
947 CALL zmake(
'ge',
' ',
' ', 1, n, x, 1, xx,
948 $ abs( incx ), 0, n - 1, reset, transl )
951 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
967 CALL zmake(
'ge',
' ',
' ', 1, n, y, 1, yy,
968 $ abs( incy ), 0, n - 1, reset,
998 $
WRITE( ntra, fmt = 9993 )nc, sname,
999 $ cuplo, n, alpha, lda, incx, beta, incy
1002 CALL czhemv( iorder, uplo, n, alpha, aa,
1003 $ lda, xx, incx, beta, yy,
1005 ELSE IF( banded )
THEN
1007 $
WRITE( ntra, fmt = 9994 )nc, sname,
1008 $ cuplo, n, k, alpha, lda, incx, beta,
1012 CALL czhbmv( iorder, uplo, n, k, alpha,
1013 $ aa, lda, xx, incx, beta,
1015 ELSE IF( packed )
THEN
1017 $
WRITE( ntra, fmt = 9995 )nc, sname,
1018 $ cuplo, n, alpha, incx, beta, incy
1021 CALL czhpmv( iorder, uplo, n, alpha, aa,
1022 $ xx, incx, beta, yy, incy )
1028 WRITE( nout, fmt = 9992 )
1035 isame( 1 ) = uplo.EQ.uplos
1036 isame( 2 ) = ns.EQ.n
1038 isame( 3 ) = als.EQ.alpha
1039 isame( 4 ) = lze( as, aa, laa )
1040 isame( 5 ) = ldas.EQ.lda
1041 isame( 6 ) = lze( xs, xx, lx )
1042 isame( 7 ) = incxs.EQ.incx
1043 isame( 8 ) = bls.EQ.beta
1045 isame( 9 ) = lze( ys, yy, ly )
1047 isame( 9 ) = lzeres(
'ge',
' ', 1, n,
1048 $ ys, yy, abs( incy ) )
1050 isame( 10 ) = incys.EQ.incy
1051 ELSE IF( banded )
THEN
1052 isame( 3 ) = ks.EQ.k
1053 isame( 4 ) = als.EQ.alpha
1054 isame( 5 ) = lze( as, aa, laa )
1055 isame( 6 ) = ldas.EQ.lda
1056 isame( 7 ) = lze( xs, xx, lx )
1057 isame( 8 ) = incxs.EQ.incx
1058 isame( 9 ) = bls.EQ.beta
1060 isame( 10 ) = lze( ys, yy, ly )
1062 isame( 10 ) = lzeres(
'ge',
' ', 1, n,
1063 $ ys, yy, abs( incy ) )
1065 isame( 11 ) = incys.EQ.incy
1066 ELSE IF( packed )
THEN
1067 isame( 3 ) = als.EQ.alpha
1068 isame( 4 ) = lze( as, aa, laa )
1069 isame( 5 ) = lze( xs, xx, lx )
1070 isame( 6 ) = incxs.EQ.incx
1071 isame( 7 ) = bls.EQ.beta
1073 isame( 8 ) = lze( ys, yy, ly )
1075 isame( 8 ) = lzeres(
'ge',
' ', 1, n,
1076 $ ys, yy, abs( incy ) )
1078 isame( 9 ) = incys.EQ.incy
1086 same = same.AND.isame( i )
1087 IF( .NOT.isame( i ) )
1088 $
WRITE( nout, fmt = 9998 )i
1099 CALL zmvch(
'N', n, n, alpha, a, nmax, x,
1100 $ incx, beta, y, incy, yt, g,
1101 $ yy, eps, err, fatal, nout,
1103 errmax = max( errmax, err )
1129 IF( errmax.LT.thresh )
THEN
1130 WRITE( nout, fmt = 9999 )sname, nc
1132 WRITE( nout, fmt = 9997 )sname, nc, errmax
1137 WRITE( nout, fmt = 9996 )sname
1139 WRITE( nout, fmt = 9993 )nc, sname, cuplo, n, alpha, lda, incx,
1141 ELSE IF( banded )
THEN
1142 WRITE( nout, fmt = 9994 )nc, sname, cuplo, n, k, alpha, lda,
1144 ELSE IF( packed )
THEN
1145 WRITE( nout, fmt = 9995 )nc, sname, cuplo, n, alpha, incx,
1152 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
1154 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1155 $
'ANGED INCORRECTLY *******' )
1156 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1157 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1158 $
' - SUSPECT *******' )
1159 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
1160 9995
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', i3,
',(', f4.1,
',',
1161 $ f4.1,
'), AP, X,',/ 10x, i2,
',(', f4.1,
',', f4.1,
1162 $
'), Y,', i2,
') .' )
1163 9994
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', 2( i3,
',' ),
'(',
1164 $ f4.1,
',', f4.1,
'), A,', i3,
', X,',/ 10x, i2,
',(',
1165 $ f4.1,
',', f4.1,
'), Y,', i2,
') .' )
1166 9993
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', i3,
',(', f4.1,
',',
1167 $ f4.1,
'), A,', i3,
', X,',/ 10x, i2,
',(', f4.1,
',',
1168 $ f4.1,
'), ',
'Y,', i2,
') .' )
1169 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1175 SUBROUTINE zchk3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1176 $ FATAL, NIDIM, IDIM, NKB, KB, NINC, INC, NMAX,
1177 $ INCMAX, A, AA, AS, X, XX, XS, XT, G, Z, IORDER )
1188 COMPLEX*16 ZERO, HALF, ONE
1189 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
1190 $ half = ( 0.5d0, 0.0d0 ),
1191 $ one = ( 1.0d0, 0.0d0 ) )
1192 DOUBLE PRECISION RZERO
1193 PARAMETER ( RZERO = 0.0d0 )
1195 DOUBLE PRECISION EPS, THRESH
1196 INTEGER INCMAX, NIDIM, NINC, NKB, NMAX, NOUT, NTRA,
1198 LOGICAL FATAL, REWI, TRACE
1201 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ),
1202 $ AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),
1203 $ xt( nmax ), xx( nmax*incmax ), z( nmax )
1204 DOUBLE PRECISION G( NMAX )
1205 INTEGER IDIM( NIDIM ), INC( NINC ), KB( NKB )
1208 DOUBLE PRECISION ERR, ERRMAX
1209 INTEGER I, ICD, ICT, ICU, IK, IN, INCX, INCXS, IX, K,
1210 $ KS, LAA, LDA, LDAS, LX, N, NARGS, NC, NK, NS
1211 LOGICAL BANDED, FULL, NULL, PACKED, RESET, SAME
1212 CHARACTER*1 DIAG, DIAGS, TRANS, TRANSS, UPLO, UPLOS
1213 CHARACTER*14 CUPLO,CTRANS,CDIAG
1214 CHARACTER*2 ICHD, ICHU
1220 EXTERNAL lze, lzeres
1222 EXTERNAL zmake,
zmvch, cztbmv, cztbsv, cztpmv,
1223 $ cztpsv, cztrmv, cztrsv
1227 INTEGER INFOT, NOUTC
1230 COMMON /infoc/infot, noutc, ok
1232 DATA ichu/
'UL'/, icht/
'NTC'/, ichd/
'UN'/
1234 full = sname( 9: 9 ).EQ.
'r'
1235 banded = sname( 9: 9 ).EQ.
'b'
1236 packed = sname( 9: 9 ).EQ.
'p'
1240 ELSE IF( banded )
THEN
1242 ELSE IF( packed )
THEN
1254 DO 110 in = 1, nidim
1280 laa = ( n*( n + 1 ) )/2
1287 uplo = ichu( icu: icu )
1288 IF (uplo.EQ.
'U')
THEN
1289 cuplo =
' CblasUpper'
1291 cuplo =
' CblasLower'
1295 trans = icht( ict: ict )
1296 IF (trans.EQ.
'N')
THEN
1297 ctrans =
' CblasNoTrans'
1298 ELSE IF (trans.EQ.
'T')
THEN
1299 ctrans =
' CblasTrans'
1301 ctrans =
'CblasConjTrans'
1305 diag = ichd( icd: icd )
1306 IF (diag.EQ.
'N')
THEN
1307 cdiag =
' CblasNonUnit'
1309 cdiag =
' CblasUnit'
1315 CALL zmake( sname( 8: 9 ), uplo, diag, n, n, a,
1316 $ nmax, aa, lda, k, k, reset, transl )
1325 CALL zmake(
'ge',
' ',
' ', 1, n, x, 1, xx,
1326 $ abs( incx ), 0, n - 1, reset,
1330 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
1353 IF( sname( 10: 11 ).EQ.
'mv' )
THEN
1356 $
WRITE( ntra, fmt = 9993 )nc, sname,
1357 $ cuplo, ctrans, cdiag, n, lda, incx
1360 CALL cztrmv( iorder, uplo, trans, diag,
1361 $ n, aa, lda, xx, incx )
1362 ELSE IF( banded )
THEN
1364 $
WRITE( ntra, fmt = 9994 )nc, sname,
1365 $ cuplo, ctrans, cdiag, n, k, lda, incx
1368 CALL cztbmv( iorder, uplo, trans, diag,
1369 $ n, k, aa, lda, xx, incx )
1370 ELSE IF( packed )
THEN
1372 $
WRITE( ntra, fmt = 9995 )nc, sname,
1373 $ cuplo, ctrans, cdiag, n, incx
1376 CALL cztpmv( iorder, uplo, trans, diag,
1379 ELSE IF( sname( 10: 11 ).EQ.
'sv' )
THEN
1382 $
WRITE( ntra, fmt = 9993 )nc, sname,
1383 $ cuplo, ctrans, cdiag, n, lda, incx
1386 CALL cztrsv( iorder, uplo, trans, diag,
1387 $ n, aa, lda, xx, incx )
1388 ELSE IF( banded )
THEN
1390 $
WRITE( ntra, fmt = 9994 )nc, sname,
1391 $ cuplo, ctrans, cdiag, n, k, lda, incx
1394 CALL cztbsv( iorder, uplo, trans, diag,
1395 $ n, k, aa, lda, xx, incx )
1396 ELSE IF( packed )
THEN
1398 $
WRITE( ntra, fmt = 9995 )nc, sname,
1399 $ cuplo, ctrans, cdiag, n, incx
1402 CALL cztpsv( iorder, uplo, trans, diag,
1410 WRITE( nout, fmt = 9992 )
1417 isame( 1 ) = uplo.EQ.uplos
1418 isame( 2 ) = trans.EQ.transs
1419 isame( 3 ) = diag.EQ.diags
1420 isame( 4 ) = ns.EQ.n
1422 isame( 5 ) = lze( as, aa, laa )
1423 isame( 6 ) = ldas.EQ.lda
1425 isame( 7 ) = lze( xs, xx, lx )
1427 isame( 7 ) = lzeres(
'ge',
' ', 1, n, xs,
1430 isame( 8 ) = incxs.EQ.incx
1431 ELSE IF( banded )
THEN
1432 isame( 5 ) = ks.EQ.k
1433 isame( 6 ) = lze( as, aa, laa )
1434 isame( 7 ) = ldas.EQ.lda
1436 isame( 8 ) = lze( xs, xx, lx )
1438 isame( 8 ) = lzeres(
'ge',
' ', 1, n, xs,
1441 isame( 9 ) = incxs.EQ.incx
1442 ELSE IF( packed )
THEN
1443 isame( 5 ) = lze( as, aa, laa )
1445 isame( 6 ) = lze( xs, xx, lx )
1447 isame( 6 ) = lzeres(
'ge',
' ', 1, n, xs,
1450 isame( 7 ) = incxs.EQ.incx
1458 same = same.AND.isame( i )
1459 IF( .NOT.isame( i ) )
1460 $
WRITE( nout, fmt = 9998 )i
1468 IF( sname( 10: 11 ).EQ.
'mv' )
THEN
1472 CALL zmvch( trans, n, n, one, a, nmax, x,
1473 $ incx, zero, z, incx, xt, g,
1474 $ xx, eps, err, fatal, nout,
1476 ELSE IF( sname( 10: 11 ).EQ.
'sv' )
THEN
1481 z( i ) = xx( 1 + ( i - 1 )*
1483 xx( 1 + ( i - 1 )*abs( incx ) )
1486 CALL zmvch( trans, n, n, one, a, nmax, z,
1487 $ incx, zero, x, incx, xt, g,
1488 $ xx, eps, err, fatal, nout,
1491 errmax = max( errmax, err )
1514 IF( errmax.LT.thresh )
THEN
1515 WRITE( nout, fmt = 9999 )sname, nc
1517 WRITE( nout, fmt = 9997 )sname, nc, errmax
1522 WRITE( nout, fmt = 9996 )sname
1524 WRITE( nout, fmt = 9993 )nc, sname, cuplo, ctrans, cdiag, n,
1526 ELSE IF( banded )
THEN
1527 WRITE( nout, fmt = 9994 )nc, sname, cuplo, ctrans, cdiag, n, k,
1529 ELSE IF( packed )
THEN
1530 WRITE( nout, fmt = 9995 )nc, sname, cuplo, ctrans, cdiag, n,
1537 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
1539 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1540 $
'ANGED INCORRECTLY *******' )
1541 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1542 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1543 $
' - SUSPECT *******' )
1544 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
1545 9995
FORMAT(1x, i6,
': ',a12,
'(', 3( a14,
',' ),/ 10x, i3,
', AP, ',
1547 9994
FORMAT(1x, i6,
': ',a12,
'(', 3( a14,
',' ),/ 10x, 2( i3,
',' ),
1548 $
' A,', i3,
', X,', i2,
') .' )
1549 9993
FORMAT( 1x, i6,
': ',a12,
'(', 3( a14,
',' ),/ 10x, i3,
', A,',
1550 $ i3,
', X,', i2,
') .' )
1551 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1557 SUBROUTINE zchk4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1558 $ FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,
1559 $ INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,
1571 COMPLEX*16 ZERO, HALF, ONE
1572 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
1573 $ half = ( 0.5d0, 0.0d0 ),
1574 $ one = ( 1.0d0, 0.0d0 ) )
1575 DOUBLE PRECISION RZERO
1576 PARAMETER ( RZERO = 0.0d0 )
1578 DOUBLE PRECISION EPS, THRESH
1579 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA,
1581 LOGICAL FATAL, REWI, TRACE
1584 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
1585 $ AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),
1586 $ xx( nmax*incmax ), y( nmax ),
1587 $ ys( nmax*incmax ), yt( nmax ),
1588 $ yy( nmax*incmax ), z( nmax )
1589 DOUBLE PRECISION G( NMAX )
1590 INTEGER IDIM( NIDIM ), INC( NINC )
1592 COMPLEX*16 ALPHA, ALS, TRANSL
1593 DOUBLE PRECISION ERR, ERRMAX
1594 INTEGER I, IA, IM, IN, INCX, INCXS, INCY, INCYS, IX,
1595 $ iy, j, laa, lda, ldas, lx, ly, m, ms, n, nargs,
1597 LOGICAL CONJ, NULL, RESET, SAME
1603 EXTERNAL lze, lzeres
1607 INTRINSIC abs, dconjg, max, min
1609 INTEGER INFOT, NOUTC
1612 COMMON /infoc/infot, noutc, ok
1614 conj = sname( 11: 11 ).EQ.
'c'
1622 DO 120 in = 1, nidim
1628 $ m = max( n - nd, 0 )
1630 $ m = min( n + nd, nmax )
1640 null = n.LE.0.OR.m.LE.0
1649 CALL zmake(
'ge',
' ',
' ', 1, m, x, 1, xx, abs( incx ),
1650 $ 0, m - 1, reset, transl )
1653 xx( 1 + abs( incx )*( m/2 - 1 ) ) = zero
1663 CALL zmake(
'ge',
' ',
' ', 1, n, y, 1, yy,
1664 $ abs( incy ), 0, n - 1, reset, transl )
1667 yy( 1 + abs( incy )*( n/2 - 1 ) ) = zero
1676 CALL zmake(sname( 8: 9 ),
' ',
' ', m, n, a, nmax,
1677 $ aa, lda, m - 1, n - 1, reset, transl )
1702 $
WRITE( ntra, fmt = 9994 )nc, sname, m, n,
1703 $ alpha, incx, incy, lda
1707 CALL czgerc( iorder, m, n, alpha, xx, incx,
1708 $ yy, incy, aa, lda )
1712 CALL czgeru( iorder, m, n, alpha, xx, incx,
1713 $ yy, incy, aa, lda )
1719 WRITE( nout, fmt = 9993 )
1726 isame( 1 ) = ms.EQ.m
1727 isame( 2 ) = ns.EQ.n
1728 isame( 3 ) = als.EQ.alpha
1729 isame( 4 ) = lze( xs, xx, lx )
1730 isame( 5 ) = incxs.EQ.incx
1731 isame( 6 ) = lze( ys, yy, ly )
1732 isame( 7 ) = incys.EQ.incy
1734 isame( 8 ) = lze( as, aa, laa )
1736 isame( 8 ) = lzeres(
'ge',
' ', m, n, as, aa,
1739 isame( 9 ) = ldas.EQ.lda
1745 same = same.AND.isame( i )
1746 IF( .NOT.isame( i ) )
1747 $
WRITE( nout, fmt = 9998 )i
1764 z( i ) = x( m - i + 1 )
1771 w( 1 ) = y( n - j + 1 )
1774 $ w( 1 ) = dconjg( w( 1 ) )
1775 CALL zmvch(
'N', m, 1, alpha, z, nmax, w, 1,
1776 $ one, a( 1, j ), 1, yt, g,
1777 $ aa( 1 + ( j - 1 )*lda ), eps,
1778 $ err, fatal, nout, .true. )
1779 errmax = max( errmax, err )
1801 IF( errmax.LT.thresh )
THEN
1802 WRITE( nout, fmt = 9999 )sname, nc
1804 WRITE( nout, fmt = 9997 )sname, nc, errmax
1809 WRITE( nout, fmt = 9995 )j
1812 WRITE( nout, fmt = 9996 )sname
1813 WRITE( nout, fmt = 9994 )nc, sname, m, n, alpha, incx, incy, lda
1818 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
1820 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1821 $
'ANGED INCORRECTLY *******' )
1822 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1823 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1824 $
' - SUSPECT *******' )
1825 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
1826 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
1827 9994
FORMAT(1x, i6,
': ',a12,
'(', 2( i3,
',' ),
'(', f4.1,
',', f4.1,
1828 $
'), X,', i2,
', Y,', i2,
', A,', i3,
') .' )
1829 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1835 SUBROUTINE zchk5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1836 $ FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,
1837 $ INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,
1849 COMPLEX*16 ZERO, HALF, ONE
1850 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
1851 $ half = ( 0.5d0, 0.0d0 ),
1852 $ one = ( 1.0d0, 0.0d0 ) )
1853 DOUBLE PRECISION RZERO
1854 PARAMETER ( RZERO = 0.0d0 )
1856 DOUBLE PRECISION EPS, THRESH
1857 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA,
1859 LOGICAL FATAL, REWI, TRACE
1862 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
1863 $ as( nmax*nmax ), x( nmax ), xs( nmax*incmax ),
1864 $ xx( nmax*incmax ), y( nmax ),
1865 $ ys( nmax*incmax ), yt( nmax ),
1866 $ yy( nmax*incmax ), z( nmax )
1867 DOUBLE PRECISION G( NMAX )
1868 INTEGER IDIM( NIDIM ), INC( NINC )
1870 COMPLEX*16 ALPHA, TRANSL
1871 DOUBLE PRECISION ERR, ERRMAX, RALPHA, RALS
1872 INTEGER I, IA, IC, IN, INCX, INCXS, IX, J, JA, JJ, LAA,
1873 $ lda, ldas, lj, lx, n, nargs, nc, ns
1874 LOGICAL FULL, NULL, PACKED, RESET, SAME, UPPER
1875 CHARACTER*1 UPLO, UPLOS
1883 EXTERNAL LZE, LZERES
1887 INTRINSIC abs, dcmplx, dconjg, max, dble
1889 INTEGER INFOT, NOUTC
1892 COMMON /infoc/infot, noutc, ok
1896 full = sname( 9: 9 ).EQ.
'e'
1897 packed = sname( 9: 9 ).EQ.
'p'
1901 ELSE IF( packed )
THEN
1909 DO 100 in = 1, nidim
1919 laa = ( n*( n + 1 ) )/2
1925 uplo = ich( ic: ic )
1926 IF (uplo.EQ.
'U')
THEN
1927 cuplo =
' CblasUpper'
1929 cuplo =
' CblasLower'
1940 CALL zmake(
'ge',
' ',
' ', 1, n, x, 1, xx, abs( incx ),
1941 $ 0, n - 1, reset, transl )
1944 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
1948 ralpha = dble( alf( ia ) )
1949 alpha = dcmplx( ralpha, rzero )
1950 null = n.LE.0.OR.ralpha.EQ.rzero
1955 CALL zmake( sname( 8: 9 ), uplo,
' ', n, n, a, nmax,
1956 $ aa, lda, n - 1, n - 1, reset, transl )
1978 $
WRITE( ntra, fmt = 9993 )nc, sname, cuplo, n,
1982 CALL czher( iorder, uplo, n, ralpha, xx,
1984 ELSE IF( packed )
THEN
1986 $
WRITE( ntra, fmt = 9994 )nc, sname, cuplo, n,
1990 CALL czhpr( iorder, uplo, n, ralpha,
1997 WRITE( nout, fmt = 9992 )
2004 isame( 1 ) = uplo.EQ.uplos
2005 isame( 2 ) = ns.EQ.n
2006 isame( 3 ) = rals.EQ.ralpha
2007 isame( 4 ) = lze( xs, xx, lx )
2008 isame( 5 ) = incxs.EQ.incx
2010 isame( 6 ) = lze( as, aa, laa )
2012 isame( 6 ) = lzeres( sname( 8: 9 ), uplo, n, n, as,
2015 IF( .NOT.packed )
THEN
2016 isame( 7 ) = ldas.EQ.lda
2023 same = same.AND.isame( i )
2024 IF( .NOT.isame( i ) )
2025 $
WRITE( nout, fmt = 9998 )i
2042 z( i ) = x( n - i + 1 )
2047 w( 1 ) = dconjg( z( j ) )
2055 CALL zmvch(
'N', lj, 1, alpha, z( jj ), lj, w,
2056 $ 1, one, a( jj, j ), 1, yt, g,
2057 $ aa( ja ), eps, err, fatal, nout,
2068 errmax = max( errmax, err )
2089 IF( errmax.LT.thresh )
THEN
2090 WRITE( nout, fmt = 9999 )sname, nc
2092 WRITE( nout, fmt = 9997 )sname, nc, errmax
2097 WRITE( nout, fmt = 9995 )j
2100 WRITE( nout, fmt = 9996 )sname
2102 WRITE( nout, fmt = 9993 )nc, sname, cuplo, n, ralpha, incx, lda
2103 ELSE IF( packed )
THEN
2104 WRITE( nout, fmt = 9994 )nc, sname, cuplo, n, ralpha, incx
2110 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
2112 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2113 $
'ANGED INCORRECTLY *******' )
2114 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
2115 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
2116 $
' - SUSPECT *******' )
2117 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
2118 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2119 9994
FORMAT(1x, i6,
': ',a12,
'(', a14,
',', i3,
',', f4.1,
', X,',
2121 9993
FORMAT(1x, i6,
': ',a12,
'(', a14,
',', i3,
',', f4.1,
', X,',
2122 $ i2,
', A,', i3,
') .' )
2123 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2129 SUBROUTINE zchk6( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
2130 $ FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,
2131 $ INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,
2143 COMPLEX*16 ZERO, HALF, ONE
2144 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
2145 $ half = ( 0.5d0, 0.0d0 ),
2146 $ one = ( 1.0d0, 0.0d0 ) )
2147 DOUBLE PRECISION RZERO
2148 PARAMETER ( RZERO = 0.0d0 )
2150 DOUBLE PRECISION EPS, THRESH
2151 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA,
2153 LOGICAL FATAL, REWI, TRACE
2156 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
2157 $ AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),
2158 $ XX( NMAX*INCMAX ), Y( NMAX ),
2159 $ YS( NMAX*INCMAX ), YT( NMAX ),
2160 $ yy( nmax*incmax ), z( nmax, 2 )
2161 DOUBLE PRECISION G( NMAX )
2162 INTEGER IDIM( NIDIM ), INC( NINC )
2164 COMPLEX*16 ALPHA, ALS, TRANSL
2165 DOUBLE PRECISION ERR, ERRMAX
2166 INTEGER I, IA, IC, IN, INCX, INCXS, INCY, INCYS, IX,
2167 $ iy, j, ja, jj, laa, lda, ldas, lj, lx, ly, n,
2169 LOGICAL FULL, NULL, PACKED, RESET, SAME, UPPER
2170 CHARACTER*1 UPLO, UPLOS
2178 EXTERNAL lze, lzeres
2182 INTRINSIC abs, dconjg, max
2184 INTEGER INFOT, NOUTC
2187 COMMON /infoc/infot, noutc, ok
2191 full = sname( 9: 9 ).EQ.
'e'
2192 packed = sname( 9: 9 ).EQ.
'p'
2196 ELSE IF( packed )
THEN
2204 DO 140 in = 1, nidim
2214 laa = ( n*( n + 1 ) )/2
2220 uplo = ich( ic: ic )
2221 IF (uplo.EQ.
'U')
THEN
2222 cuplo =
' CblasUpper'
2224 cuplo =
' CblasLower'
2235 CALL zmake(
'ge',
' ',
' ', 1, n, x, 1, xx, abs( incx ),
2236 $ 0, n - 1, reset, transl )
2239 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
2249 CALL zmake(
'ge',
' ',
' ', 1, n, y, 1, yy,
2250 $ abs( incy ), 0, n - 1, reset, transl )
2253 yy( 1 + abs( incy )*( n/2 - 1 ) ) = zero
2258 null = n.LE.0.OR.alpha.EQ.zero
2263 CALL zmake( sname( 8: 9 ), uplo,
' ', n, n, a,
2264 $ nmax, aa, lda, n - 1, n - 1, reset,
2291 $
WRITE( ntra, fmt = 9993 )nc, sname, cuplo, n,
2292 $ alpha, incx, incy, lda
2295 CALL czher2( iorder, uplo, n, alpha, xx, incx,
2296 $ yy, incy, aa, lda )
2297 ELSE IF( packed )
THEN
2299 $
WRITE( ntra, fmt = 9994 )nc, sname, cuplo, n,
2303 CALL czhpr2( iorder, uplo, n, alpha, xx, incx,
2310 WRITE( nout, fmt = 9992 )
2317 isame( 1 ) = uplo.EQ.uplos
2318 isame( 2 ) = ns.EQ.n
2319 isame( 3 ) = als.EQ.alpha
2320 isame( 4 ) = lze( xs, xx, lx )
2321 isame( 5 ) = incxs.EQ.incx
2322 isame( 6 ) = lze( ys, yy, ly )
2323 isame( 7 ) = incys.EQ.incy
2325 isame( 8 ) = lze( as, aa, laa )
2327 isame( 8 ) = lzeres( sname( 8: 9 ), uplo, n, n,
2330 IF( .NOT.packed )
THEN
2331 isame( 9 ) = ldas.EQ.lda
2338 same = same.AND.isame( i )
2339 IF( .NOT.isame( i ) )
2340 $
WRITE( nout, fmt = 9998 )i
2357 z( i, 1 ) = x( n - i + 1 )
2366 z( i, 2 ) = y( n - i + 1 )
2371 w( 1 ) = alpha*dconjg( z( j, 2 ) )
2372 w( 2 ) = dconjg( alpha )*dconjg( z( j, 1 ) )
2380 CALL zmvch(
'N', lj, 2, one, z( jj, 1 ),
2381 $ nmax, w, 1, one, a( jj, j ), 1,
2382 $ yt, g, aa( ja ), eps, err, fatal,
2393 errmax = max( errmax, err )
2416 IF( errmax.LT.thresh )
THEN
2417 WRITE( nout, fmt = 9999 )sname, nc
2419 WRITE( nout, fmt = 9997 )sname, nc, errmax
2424 WRITE( nout, fmt = 9995 )j
2427 WRITE( nout, fmt = 9996 )sname
2429 WRITE( nout, fmt = 9993 )nc, sname, cuplo, n, alpha, incx,
2431 ELSE IF( packed )
THEN
2432 WRITE( nout, fmt = 9994 )nc, sname, cuplo, n, alpha, incx, incy
2438 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
2440 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2441 $
'ANGED INCORRECTLY *******' )
2442 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
2443 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
2444 $
' - SUSPECT *******' )
2445 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
2446 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2447 9994
FORMAT(1x, i6,
': ',a12,
'(', a14,
',', i3,
',(', f4.1,
',',
2448 $ f4.1,
'), X,', i2,
', Y,', i2,
', AP) .' )
2449 9993
FORMAT(1x, i6,
': ',a12,
'(', a14,
',', i3,
',(', f4.1,
',',
2450 $ f4.1,
'), X,', i2,
', Y,', i2,
', A,', i3,
') .' )
2451 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2457 SUBROUTINE zmvch( TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y,
2458 $ INCY, YT, G, YY, EPS, ERR, FATAL, NOUT, MV )
2470 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ) )
2471 DOUBLE PRECISION RZERO, RONE
2472 PARAMETER ( RZERO = 0.0d0, rone = 1.0d0 )
2474 COMPLEX*16 ALPHA, BETA
2475 DOUBLE PRECISION EPS, ERR
2476 INTEGER INCX, INCY, M, N, NMAX, NOUT
2480 COMPLEX*16 A( NMAX, * ), X( * ), Y( * ), YT( * ), YY( * )
2481 DOUBLE PRECISION G( * )
2484 DOUBLE PRECISION ERRI
2485 INTEGER I, INCXL, INCYL, IY, J, JX, KX, KY, ML, NL
2488 INTRINSIC abs, dimag, dconjg, max, dble, sqrt
2490 DOUBLE PRECISION ABS1
2492 abs1( c ) = abs( dble( c ) ) + abs( dimag( c ) )
2495 ctran = trans.EQ.
'C'
2496 IF( tran.OR.ctran )
THEN
2528 yt( iy ) = yt( iy ) + a( j, i )*x( jx )
2529 g( iy ) = g( iy ) + abs1( a( j, i ) )*abs1( x( jx ) )
2532 ELSE IF( ctran )
THEN
2534 yt( iy ) = yt( iy ) + dconjg( a( j, i ) )*x( jx )
2535 g( iy ) = g( iy ) + abs1( a( j, i ) )*abs1( x( jx ) )
2540 yt( iy ) = yt( iy ) + a( i, j )*x( jx )
2541 g( iy ) = g( iy ) + abs1( a( i, j ) )*abs1( x( jx ) )
2545 yt( iy ) = alpha*yt( iy ) + beta*y( iy )
2546 g( iy ) = abs1( alpha )*g( iy ) + abs1( beta )*abs1( y( iy ) )
2554 erri = abs( yt( i ) - yy( 1 + ( i - 1 )*abs( incy ) ) )/eps
2555 IF( g( i ).NE.rzero )
2556 $ erri = erri/g( i )
2557 err = max( err, erri )
2558 IF( err*sqrt( eps ).GE.rone )
2567 WRITE( nout, fmt = 9999 )
2570 WRITE( nout, fmt = 9998 )i, yt( i ),
2571 $ yy( 1 + ( i - 1 )*abs( incy ) )
2573 WRITE( nout, fmt = 9998 )i,
2574 $ yy( 1 + ( i - 1 )*abs( incy ) ), yt( i )
2581 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
2582 $
'F ACCURATE *******', /
' EXPECTED RE',
2583 $
'SULT COMPUTED RESULT' )
2584 9998
FORMAT( 1x, i7, 2(
' (', g15.6,
',', g15.6,
')' ) )
2589 LOGICAL FUNCTION lze( RI, RJ, LR )
2602 COMPLEX*16 ri( * ), rj( * )
2607 IF( ri( i ).NE.rj( i ) )
2619 LOGICAL FUNCTION lzeres( TYPE, UPLO, M, N, AA, AS, LDA )
2636 COMPLEX*16 aa( lda, * ), as( lda, * )
2638 INTEGER i, ibeg, iend, j
2642 IF( type.EQ.
'ge' )
THEN
2644 DO 10 i = m + 1, lda
2645 IF( aa( i, j ).NE.as( i, j ) )
2649 ELSE IF( type.EQ.
'he' )
THEN
2658 DO 30 i = 1, ibeg - 1
2659 IF( aa( i, j ).NE.as( i, j ) )
2662 DO 40 i = iend + 1, lda
2663 IF( aa( i, j ).NE.as( i, j ) )
2693 INTEGER i, ic, j, mi, mj
2695 SAVE i, ic, j, mi, mj
2719 i = i - 1000*( i/1000 )
2720 j = j - 1000*( j/1000 )
2725 zbeg = dcmplx( ( i - 500 )/1001.0, ( j - 500 )/1001.0 )
2739 DOUBLE PRECISION x, y
2747 SUBROUTINE zmake( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL,
2748 $ KU, RESET, TRANSL )
2764 COMPLEX*16 ZERO, ONE
2765 parameter( zero = ( 0.0d0, 0.0d0 ),
2766 $ one = ( 1.0d0, 0.0d0 ) )
2768 PARAMETER ( ROGUE = ( -1.0d10, 1.0d10 ) )
2769 DOUBLE PRECISION RZERO
2770 PARAMETER ( RZERO = 0.0d0 )
2771 DOUBLE PRECISION RROGUE
2772 PARAMETER ( RROGUE = -1.0d10 )
2775 INTEGER KL, KU, LDA, M, N, NMAX
2777 CHARACTER*1 DIAG, UPLO
2780 COMPLEX*16 A( NMAX, * ), AA( * )
2782 INTEGER I, I1, I2, I3, IBEG, IEND, IOFF, J, JJ, KK
2783 LOGICAL GEN, LOWER, SYM, TRI, UNIT, UPPER
2788 INTRINSIC dcmplx, dconjg, max, min, dble
2790 gen =
TYPE( 1: 1 ).EQ.
'g'
2791 sym =
TYPE( 1: 1 ).EQ.
'h'
2792 TRI = type( 1: 1 ).EQ.
't'
2793 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2794 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2795 unit = tri.AND.diag.EQ.
'U'
2801 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2803 IF( ( i.LE.j.AND.j - i.LE.ku ).OR.
2804 $ ( i.GE.j.AND.i - j.LE.kl ) )
THEN
2805 a( i, j ) = zbeg( reset ) + transl
2811 a( j, i ) = dconjg( a( i, j ) )
2819 $ a( j, j ) = dcmplx( dble( a( j, j ) ), rzero )
2821 $ a( j, j ) = a( j, j ) + one
2828 IF( type.EQ.
'ge' )
THEN
2831 aa( i + ( j - 1 )*lda ) = a( i, j )
2833 DO 40 i = m + 1, lda
2834 aa( i + ( j - 1 )*lda ) = rogue
2837 ELSE IF( type.EQ.
'gb' )
THEN
2839 DO 60 i1 = 1, ku + 1 - j
2840 aa( i1 + ( j - 1 )*lda ) = rogue
2842 DO 70 i2 = i1, min( kl + ku + 1, ku + 1 + m - j )
2843 aa( i2 + ( j - 1 )*lda ) = a( i2 + j - ku - 1, j )
2846 aa( i3 + ( j - 1 )*lda ) = rogue
2849 ELSE IF( type.EQ.
'he'.OR.type.EQ.
'tr' )
THEN
2866 DO 100 i = 1, ibeg - 1
2867 aa( i + ( j - 1 )*lda ) = rogue
2869 DO 110 i = ibeg, iend
2870 aa( i + ( j - 1 )*lda ) = a( i, j )
2872 DO 120 i = iend + 1, lda
2873 aa( i + ( j - 1 )*lda ) = rogue
2876 jj = j + ( j - 1 )*lda
2877 aa( jj ) = dcmplx( dble( aa( jj ) ), rrogue )
2880 ELSE IF( type.EQ.
'hb'.OR.type.EQ.
'tb' )
THEN
2884 ibeg = max( 1, kl + 2 - j )
2897 iend = min( kl + 1, 1 + m - j )
2899 DO 140 i = 1, ibeg - 1
2900 aa( i + ( j - 1 )*lda ) = rogue
2902 DO 150 i = ibeg, iend
2903 aa( i + ( j - 1 )*lda ) = a( i + j - kk, j )
2905 DO 160 i = iend + 1, lda
2906 aa( i + ( j - 1 )*lda ) = rogue
2909 jj = kk + ( j - 1 )*lda
2910 aa( jj ) = dcmplx( dble( aa( jj ) ), rrogue )
2913 ELSE IF( type.EQ.
'hp'.OR.type.EQ.
'tp' )
THEN
2923 DO 180 i = ibeg, iend
2925 aa( ioff ) = a( i, j )
2928 $ aa( ioff ) = rogue
2930 $ aa( ioff ) = dcmplx( dble( aa( ioff ) ), rrogue )
double precision function ddiff(x, y)
logical function lze(ri, rj, lr)
subroutine zchk2(sname, eps, thresh, nout, ntra, trace, rewi, fatal, nidim, idim, nkb, kb, nalf, alf, nbet, bet, ninc, inc, nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys, yt, g)
subroutine zchk1(sname, eps, thresh, nout, ntra, trace, rewi, fatal, nidim, idim, nkb, kb, nalf, alf, nbet, bet, ninc, inc, nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys, yt, g)
logical function lzeres(type, uplo, m, n, aa, as, lda)
subroutine zmvch(trans, m, n, alpha, a, nmax, x, incx, beta, y, incy, yt, g, yy, eps, err, fatal, nout, mv)
complex *16 function zbeg(reset)
subroutine zchk3(sname, eps, thresh, nout, ntra, trace, rewi, fatal, nidim, idim, nkb, kb, ninc, inc, nmax, incmax, a, aa, as, x, xx, xs, xt, g, z)
subroutine zmake(type, uplo, diag, m, n, a, nmax, aa, lda, kl, ku, reset, transl)
subroutine zchk6(sname, eps, thresh, nout, ntra, trace, rewi, fatal, nidim, idim, nalf, alf, ninc, inc, nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys, yt, g, z)
subroutine zchk5(sname, eps, thresh, nout, ntra, trace, rewi, fatal, nidim, idim, nalf, alf, ninc, inc, nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys, yt, g, z)
subroutine zchk4(sname, eps, thresh, nout, ntra, trace, rewi, fatal, nidim, idim, nalf, alf, ninc, inc, nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys, yt, g, z)