114 parameter( nsubs = 17 )
116 parameter( zero = ( 0.0d0, 0.0d0 ),
117 $ one = ( 1.0d0, 0.0d0 ) )
118 DOUBLE PRECISION rzero
119 parameter( rzero = 0.0d0 )
121 parameter( nmax = 65, incmax = 2 )
122 INTEGER ninmax, nidmax, nkbmax, nalmax, nbemax
123 parameter( ninmax = 7, nidmax = 9, nkbmax = 7,
124 $ nalmax = 7, nbemax = 7 )
126 DOUBLE PRECISION eps, err, thresh
127 INTEGER i, isnum, j, n, nalf, nbet, nidim, ninc, nkb,
129 LOGICAL fatal, ltestt, rewi, same, sfatal, trace,
133 CHARACTER*32 snaps, summry
135 COMPLEX*16 a( nmax, nmax ), aa( nmax*nmax ),
136 $ alf( nalmax ), as( nmax*nmax ), bet( nbemax ),
137 $ x( nmax ), xs( nmax*incmax ),
138 $ xx( nmax*incmax ), y( nmax ),
139 $ ys( nmax*incmax ), yt( nmax ),
140 $ yy( nmax*incmax ), z( 2*nmax )
141 DOUBLE PRECISION g( nmax )
142 INTEGER idim( nidmax ), inc( ninmax ), kb( nkbmax )
143 LOGICAL ltest( nsubs )
144 CHARACTER*6 snames( nsubs )
146 DOUBLE PRECISION ddiff
153 INTRINSIC abs, max, min
159 COMMON /infoc/infot, noutc, ok, lerr
160 COMMON /srnamc/srnamt
162 DATA snames/
'ZGEMV ',
'ZGBMV ',
'ZHEMV ',
'ZHBMV ',
163 $
'ZHPMV ',
'ZTRMV ',
'ZTBMV ',
'ZTPMV ',
164 $
'ZTRSV ',
'ZTBSV ',
'ZTPSV ',
'ZGERC ',
165 $
'ZGERU ',
'ZHER ',
'ZHPR ',
'ZHER2 ',
171 READ( nin, fmt = * )summry
172 READ( nin, fmt = * )nout
173 OPEN( nout, file = summry, status =
'UNKNOWN' )
178 READ( nin, fmt = * )snaps
179 READ( nin, fmt = * )ntra
182 OPEN( ntra, file = snaps, status =
'UNKNOWN' )
185 READ( nin, fmt = * )rewi
186 rewi = rewi.AND.trace
188 READ( nin, fmt = * )sfatal
190 READ( nin, fmt = * )tsterr
192 READ( nin, fmt = * )thresh
197 READ( nin, fmt = * )nidim
198 IF( nidim.LT.1.OR.nidim.GT.nidmax )
THEN
199 WRITE( nout, fmt = 9997 )
'N', nidmax
202 READ( nin, fmt = * )( idim( i ), i = 1, nidim )
204 IF( idim( i ).LT.0.OR.idim( i ).GT.nmax )
THEN
205 WRITE( nout, fmt = 9996 )nmax
210 READ( nin, fmt = * )nkb
211 IF( nkb.LT.1.OR.nkb.GT.nkbmax )
THEN
212 WRITE( nout, fmt = 9997 )
'K', nkbmax
215 READ( nin, fmt = * )( kb( i ), i = 1, nkb )
217 IF( kb( i ).LT.0 )
THEN
218 WRITE( nout, fmt = 9995 )
223 READ( nin, fmt = * )ninc
224 IF( ninc.LT.1.OR.ninc.GT.ninmax )
THEN
225 WRITE( nout, fmt = 9997 )
'INCX AND INCY', ninmax
228 READ( nin, fmt = * )( inc( i ), i = 1, ninc )
230 IF( inc( i ).EQ.0.OR.abs( inc( i ) ).GT.incmax )
THEN
231 WRITE( nout, fmt = 9994 )incmax
236 READ( nin, fmt = * )nalf
237 IF( nalf.LT.1.OR.nalf.GT.nalmax )
THEN
238 WRITE( nout, fmt = 9997 )
'ALPHA', nalmax
241 READ( nin, fmt = * )( alf( i ), i = 1, nalf )
243 READ( nin, fmt = * )nbet
244 IF( nbet.LT.1.OR.nbet.GT.nbemax )
THEN
245 WRITE( nout, fmt = 9997 )
'BETA', nbemax
248 READ( nin, fmt = * )( bet( i ), i = 1, nbet )
252 WRITE( nout, fmt = 9993 )
253 WRITE( nout, fmt = 9992 )( idim( i ), i = 1, nidim )
254 WRITE( nout, fmt = 9991 )( kb( i ), i = 1, nkb )
255 WRITE( nout, fmt = 9990 )( inc( i ), i = 1, ninc )
256 WRITE( nout, fmt = 9989 )( alf( i ), i = 1, nalf )
257 WRITE( nout, fmt = 9988 )( bet( i ), i = 1, nbet )
258 IF( .NOT.tsterr )
THEN
259 WRITE( nout, fmt = * )
260 WRITE( nout, fmt = 9980 )
262 WRITE( nout, fmt = * )
263 WRITE( nout, fmt = 9999 )thresh
264 WRITE( nout, fmt = * )
272 50
READ( nin, fmt = 9984,
END = 80 )SNAMET, ltestt
274 IF( snamet.EQ.snames( i ) )
277 WRITE( nout, fmt = 9986 )snamet
279 70 ltest( i ) = ltestt
288 WRITE( nout, fmt = 9998 )eps
295 a( i, j ) = max( i - j + 1, 0 )
301 yy( j ) = j*( ( j + 1 )*j )/2 - ( ( j + 1 )*j*( j - 1 ) )/3
306 CALL zmvch( trans, n, n, one, a, nmax, x, 1, zero, y, 1, yt, g,
307 $ yy, eps, err, fatal, nout, .true. )
308 same =
lze( yy, yt, n )
309 IF( .NOT.same.OR.err.NE.rzero )
THEN
310 WRITE( nout, fmt = 9985 )trans, same, err
314 CALL zmvch( trans, n, n, one, a, nmax, x, -1, zero, y, -1, yt, g,
315 $ yy, eps, err, fatal, nout, .true. )
316 same =
lze( yy, yt, n )
317 IF( .NOT.same.OR.err.NE.rzero )
THEN
318 WRITE( nout, fmt = 9985 )trans, same, err
324 DO 210 isnum = 1, nsubs
325 WRITE( nout, fmt = * )
326 IF( .NOT.ltest( isnum ) )
THEN
328 WRITE( nout, fmt = 9983 )snames( isnum )
330 srnamt = snames( isnum )
333 CALL zchke( isnum, snames( isnum ), nout )
334 WRITE( nout, fmt = * )
340 GO TO ( 140, 140, 150, 150, 150, 160, 160,
341 $ 160, 160, 160, 160, 170, 170, 180,
342 $ 180, 190, 190 )isnum
344 140
CALL zchk1( snames( isnum ), eps, thresh, nout, ntra, trace,
345 $ rewi, fatal, nidim, idim, nkb, kb, nalf, alf,
346 $ nbet, bet, ninc, inc, nmax, incmax, a, aa, as,
347 $ x, xx, xs, y, yy, ys, yt, g )
350 150
CALL zchk2( snames( isnum ), eps, thresh, nout, ntra, trace,
351 $ rewi, fatal, nidim, idim, nkb, kb, nalf, alf,
352 $ nbet, bet, ninc, inc, nmax, incmax, a, aa, as,
353 $ x, xx, xs, y, yy, ys, yt, g )
357 160
CALL zchk3( snames( isnum ), eps, thresh, nout, ntra, trace,
358 $ rewi, fatal, nidim, idim, nkb, kb, ninc, inc,
359 $ nmax, incmax, a, aa, as, y, yy, ys, yt, g, z )
362 170
CALL zchk4( snames( isnum ), eps, thresh, nout, ntra, trace,
363 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
364 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
368 180
CALL zchk5( snames( isnum ), eps, thresh, nout, ntra, trace,
369 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
370 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
374 190
CALL zchk6( snames( isnum ), eps, thresh, nout, ntra, trace,
375 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
376 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
379 200
IF( fatal.AND.sfatal )
383 WRITE( nout, fmt = 9982 )
387 WRITE( nout, fmt = 9981 )
391 WRITE( nout, fmt = 9987 )
399 9999
FORMAT(
' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',
401 9998
FORMAT(
' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1p, d9.1 )
402 9997
FORMAT(
' NUMBER OF VALUES OF ', a,
' IS LESS THAN 1 OR GREATER ',
404 9996
FORMAT(
' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', i2 )
405 9995
FORMAT(
' VALUE OF K IS LESS THAN 0' )
406 9994
FORMAT(
' ABSOLUTE VALUE OF INCX OR INCY IS 0 OR GREATER THAN ',
408 9993
FORMAT(
' TESTS OF THE COMPLEX*16 LEVEL 2 BLAS', //
' THE F',
409 $
'OLLOWING PARAMETER VALUES WILL BE USED:' )
410 9992
FORMAT(
' FOR N ', 9i6 )
411 9991
FORMAT(
' FOR K ', 7i6 )
412 9990
FORMAT(
' FOR INCX AND INCY ', 7i6 )
413 9989
FORMAT(
' FOR ALPHA ',
414 $ 7(
'(', f4.1,
',', f4.1,
') ', : ) )
415 9988
FORMAT(
' FOR BETA ',
416 $ 7(
'(', f4.1,
',', f4.1,
') ', : ) )
417 9987
FORMAT(
' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',
418 $ /
' ******* TESTS ABANDONED *******' )
419 9986
FORMAT(
' SUBPROGRAM NAME ', a6,
' NOT RECOGNIZED', /
' ******* T',
420 $
'ESTS ABANDONED *******' )
421 9985
FORMAT(
' ERROR IN ZMVCH - IN-LINE DOT PRODUCTS ARE BEING EVALU',
422 $
'ATED WRONGLY.', /
' ZMVCH WAS CALLED WITH TRANS = ', a1,
423 $
' AND RETURNED SAME = ', l1,
' AND ERR = ', f12.3,
'.', /
424 $
' THIS MAY BE DUE TO FAULTS IN THE ARITHMETIC OR THE COMPILER.'
425 $ , /
' ******* TESTS ABANDONED *******' )
426 9984
FORMAT( a6, l2 )
427 9983
FORMAT( 1x, a6,
' WAS NOT TESTED' )
428 9982
FORMAT( /
' END OF TESTS' )
429 9981
FORMAT( /
' ******* FATAL ERROR - TESTS ABANDONED *******' )
430 9980
FORMAT(
' ERROR-EXITS WILL NOT BE TESTED' )
435 SUBROUTINE zchk1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
436 $ FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,
437 $ BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,
438 $ XS, Y, YY, YS, YT, G )
449 COMPLEX*16 ZERO, HALF
450 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
451 $ half = ( 0.5d0, 0.0d0 ) )
452 DOUBLE PRECISION RZERO
453 parameter( rzero = 0.0d0 )
455 DOUBLE PRECISION EPS, THRESH
456 INTEGER INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,
458 LOGICAL FATAL, REWI, TRACE
461 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
462 $ as( nmax*nmax ), bet( nbet ), x( nmax ),
463 $ xs( nmax*incmax ), xx( nmax*incmax ),
464 $ y( nmax ), ys( nmax*incmax ), yt( nmax ),
466 DOUBLE PRECISION G( NMAX )
467 INTEGER IDIM( NIDIM ), INC( NINC ), KB( NKB )
469 COMPLEX*16 ALPHA, ALS, BETA, BLS, TRANSL
470 DOUBLE PRECISION ERR, ERRMAX
471 INTEGER I, IA, IB, IC, IKU, IM, IN, INCX, INCXS, INCY,
472 $ incys, ix, iy, kl, kls, ku, kus, laa, lda,
473 $ ldas, lx, ly, m, ml, ms, n, nargs, nc, nd, nk,
475 LOGICAL BANDED, FULL, NULL, RESET, SAME, TRAN
476 CHARACTER*1 TRANS, TRANSS
486 INTRINSIC abs, max, min
491 COMMON /infoc/infot, noutc, ok, lerr
495 full = sname( 3: 3 ).EQ.
'E'
496 banded = sname( 3: 3 ).EQ.
'B'
500 ELSE IF( banded )
THEN
514 $ m = max( n - nd, 0 )
516 $ m = min( n + nd, nmax )
526 kl = max( ku - 1, 0 )
543 null = n.LE.0.OR.m.LE.0
548 CALL zmake( sname( 2: 3 ),
' ',
' ', m, n, a, nmax, aa,
549 $ lda, kl, ku, reset, transl )
552 trans = ich( ic: ic )
553 tran = trans.EQ.
'T'.OR.trans.EQ.
'C'
570 CALL zmake(
'GE',
' ',
' ', 1, nl, x, 1, xx,
571 $ abs( incx ), 0, nl - 1, reset, transl )
574 xx( 1 + abs( incx )*( nl/2 - 1 ) ) = zero
590 CALL zmake(
'GE',
' ',
' ', 1, ml, y, 1,
591 $ yy, abs( incy ), 0, ml - 1,
623 $
WRITE( ntra, fmt = 9994 )nc, sname,
624 $ trans, m, n, alpha, lda, incx, beta,
628 CALL zgemv( trans, m, n, alpha, aa,
629 $ lda, xx, incx, beta, yy,
631 ELSE IF( banded )
THEN
633 $
WRITE( ntra, fmt = 9995 )nc, sname,
634 $ trans, m, n, kl, ku, alpha, lda,
638 CALL zgbmv( trans, m, n, kl, ku, alpha,
639 $ aa, lda, xx, incx, beta,
646 WRITE( nout, fmt = 9993 )
653 isame( 1 ) = trans.EQ.transs
657 isame( 4 ) = als.EQ.alpha
658 isame( 5 ) = lze( as, aa, laa )
659 isame( 6 ) = ldas.EQ.lda
660 isame( 7 ) = lze( xs, xx, lx )
661 isame( 8 ) = incxs.EQ.incx
662 isame( 9 ) = bls.EQ.beta
664 isame( 10 ) = lze( ys, yy, ly )
666 isame( 10 ) = lzeres(
'GE',
' ', 1,
670 isame( 11 ) = incys.EQ.incy
671 ELSE IF( banded )
THEN
672 isame( 4 ) = kls.EQ.kl
673 isame( 5 ) = kus.EQ.ku
674 isame( 6 ) = als.EQ.alpha
675 isame( 7 ) = lze( as, aa, laa )
676 isame( 8 ) = ldas.EQ.lda
677 isame( 9 ) = lze( xs, xx, lx )
678 isame( 10 ) = incxs.EQ.incx
679 isame( 11 ) = bls.EQ.beta
681 isame( 12 ) = lze( ys, yy, ly )
683 isame( 12 ) = lzeres(
'GE',
' ', 1,
687 isame( 13 ) = incys.EQ.incy
695 same = same.AND.isame( i )
696 IF( .NOT.isame( i ) )
697 $
WRITE( nout, fmt = 9998 )i
708 CALL zmvch( trans, m, n, alpha, a,
709 $ nmax, x, incx, beta, y,
710 $ incy, yt, g, yy, eps, err,
711 $ fatal, nout, .true. )
712 errmax = max( errmax, err )
741 CALL zregr1( trans, m, n, ly, kl, ku, alpha, aa, lda, xx, incx,
742 $ beta, yy, incy, ys )
745 $
WRITE( ntra, fmt = 9994 )nc, sname, trans, m, n, alpha, lda,
749 CALL zgemv( trans, m, n, alpha, aa, lda, xx, incx, beta, yy,
751 ELSE IF( banded )
THEN
753 $
WRITE( ntra, fmt = 9995 )nc, sname, trans, m, n, kl, ku,
754 $ alpha, lda, incx, beta, incy
757 CALL zgbmv( trans, m, n, kl, ku, alpha, aa, lda, xx, incx,
761 IF( .NOT.lze( ys, yy, ly ) )
THEN
762 WRITE( nout, fmt = 9998 )nargs - 1
769 IF( errmax.LT.thresh )
THEN
770 WRITE( nout, fmt = 9999 )sname, nc
772 WRITE( nout, fmt = 9997 )sname, nc, errmax
777 WRITE( nout, fmt = 9996 )sname
779 WRITE( nout, fmt = 9994 )nc, sname, trans, m, n, alpha, lda,
781 ELSE IF( banded )
THEN
782 WRITE( nout, fmt = 9995 )nc, sname, trans, m, n, kl, ku,
783 $ alpha, lda, incx, beta, incy
789 9999
FORMAT(
' ', a6,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
791 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
792 $
'ANGED INCORRECTLY *******' )
793 9997
FORMAT(
' ', a6,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
794 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
795 $
' - SUSPECT *******' )
796 9996
FORMAT(
' ******* ', a6,
' FAILED ON CALL NUMBER:' )
797 9995
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', 4( i3,
',' ),
'(',
798 $ f4.1,
',', f4.1,
'), A,', i3,
', X,', i2,
',(', f4.1,
',',
799 $ f4.1,
'), Y,', i2,
') .' )
800 9994
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', 2( i3,
',' ),
'(',
801 $ f4.1,
',', f4.1,
'), A,', i3,
', X,', i2,
',(', f4.1,
',',
802 $ f4.1,
'), Y,', i2,
') .' )
803 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
809 SUBROUTINE zchk2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
810 $ FATAL, NIDIM, IDIM, NKB, KB, NALF, ALF, NBET,
811 $ BET, NINC, INC, NMAX, INCMAX, A, AA, AS, X, XX,
812 $ XS, Y, YY, YS, YT, G )
823 COMPLEX*16 ZERO, HALF
824 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
825 $ half = ( 0.5d0, 0.0d0 ) )
826 DOUBLE PRECISION RZERO
827 PARAMETER ( RZERO = 0.0d0 )
829 DOUBLE PRECISION EPS, THRESH
830 INTEGER INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,
832 LOGICAL FATAL, REWI, TRACE
835 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
836 $ as( nmax*nmax ), bet( nbet ), x( nmax ),
837 $ xs( nmax*incmax ), xx( nmax*incmax ),
838 $ y( nmax ), ys( nmax*incmax ), yt( nmax ),
840 DOUBLE PRECISION G( NMAX )
841 INTEGER IDIM( NIDIM ), INC( NINC ), KB( NKB )
843 COMPLEX*16 ALPHA, ALS, BETA, BLS, TRANSL
844 DOUBLE PRECISION ERR, ERRMAX
845 INTEGER I, IA, IB, IC, IK, IN, INCX, INCXS, INCY,
846 $ incys, ix, iy, k, ks, laa, lda, ldas, lx, ly,
847 $ n, nargs, nc, nk, ns
848 LOGICAL BANDED, FULL, NULL, PACKED, RESET, SAME
849 CHARACTER*1 UPLO, UPLOS
864 COMMON /infoc/infot, noutc, ok, lerr
868 full = sname( 3: 3 ).EQ.
'E'
869 banded = sname( 3: 3 ).EQ.
'B'
870 packed = sname( 3: 3 ).EQ.
'P'
874 ELSE IF( banded )
THEN
876 ELSE IF( packed )
THEN
910 laa = ( n*( n + 1 ) )/2
922 CALL zmake( sname( 2: 3 ), uplo,
' ', n, n, a, nmax, aa,
923 $ lda, k, k, reset, transl )
932 CALL zmake(
'GE',
' ',
' ', 1, n, x, 1, xx,
933 $ abs( incx ), 0, n - 1, reset, transl )
936 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
952 CALL zmake(
'GE',
' ',
' ', 1, n, y, 1, yy,
953 $ abs( incy ), 0, n - 1, reset,
983 $
WRITE( ntra, fmt = 9993 )nc, sname,
984 $ uplo, n, alpha, lda, incx, beta, incy
987 CALL zhemv( uplo, n, alpha, aa, lda, xx,
988 $ incx, beta, yy, incy )
989 ELSE IF( banded )
THEN
991 $
WRITE( ntra, fmt = 9994 )nc, sname,
992 $ uplo, n, k, alpha, lda, incx, beta,
996 CALL zhbmv( uplo, n, k, alpha, aa, lda,
997 $ xx, incx, beta, yy, incy )
998 ELSE IF( packed )
THEN
1000 $
WRITE( ntra, fmt = 9995 )nc, sname,
1001 $ uplo, n, alpha, incx, beta, incy
1004 CALL zhpmv( uplo, n, alpha, aa, xx, incx,
1011 WRITE( nout, fmt = 9992 )
1018 isame( 1 ) = uplo.EQ.uplos
1019 isame( 2 ) = ns.EQ.n
1021 isame( 3 ) = als.EQ.alpha
1022 isame( 4 ) = lze( as, aa, laa )
1023 isame( 5 ) = ldas.EQ.lda
1024 isame( 6 ) = lze( xs, xx, lx )
1025 isame( 7 ) = incxs.EQ.incx
1026 isame( 8 ) = bls.EQ.beta
1028 isame( 9 ) = lze( ys, yy, ly )
1030 isame( 9 ) = lzeres(
'GE',
' ', 1, n,
1031 $ ys, yy, abs( incy ) )
1033 isame( 10 ) = incys.EQ.incy
1034 ELSE IF( banded )
THEN
1035 isame( 3 ) = ks.EQ.k
1036 isame( 4 ) = als.EQ.alpha
1037 isame( 5 ) = lze( as, aa, laa )
1038 isame( 6 ) = ldas.EQ.lda
1039 isame( 7 ) = lze( xs, xx, lx )
1040 isame( 8 ) = incxs.EQ.incx
1041 isame( 9 ) = bls.EQ.beta
1043 isame( 10 ) = lze( ys, yy, ly )
1045 isame( 10 ) = lzeres(
'GE',
' ', 1, n,
1046 $ ys, yy, abs( incy ) )
1048 isame( 11 ) = incys.EQ.incy
1049 ELSE IF( packed )
THEN
1050 isame( 3 ) = als.EQ.alpha
1051 isame( 4 ) = lze( as, aa, laa )
1052 isame( 5 ) = lze( xs, xx, lx )
1053 isame( 6 ) = incxs.EQ.incx
1054 isame( 7 ) = bls.EQ.beta
1056 isame( 8 ) = lze( ys, yy, ly )
1058 isame( 8 ) = lzeres(
'GE',
' ', 1, n,
1059 $ ys, yy, abs( incy ) )
1061 isame( 9 ) = incys.EQ.incy
1069 same = same.AND.isame( i )
1070 IF( .NOT.isame( i ) )
1071 $
WRITE( nout, fmt = 9998 )i
1082 CALL zmvch(
'N', n, n, alpha, a, nmax, x,
1083 $ incx, beta, y, incy, yt, g,
1084 $ yy, eps, err, fatal, nout,
1086 errmax = max( errmax, err )
1112 IF( errmax.LT.thresh )
THEN
1113 WRITE( nout, fmt = 9999 )sname, nc
1115 WRITE( nout, fmt = 9997 )sname, nc, errmax
1120 WRITE( nout, fmt = 9996 )sname
1122 WRITE( nout, fmt = 9993 )nc, sname, uplo, n, alpha, lda, incx,
1124 ELSE IF( banded )
THEN
1125 WRITE( nout, fmt = 9994 )nc, sname, uplo, n, k, alpha, lda,
1127 ELSE IF( packed )
THEN
1128 WRITE( nout, fmt = 9995 )nc, sname, uplo, n, alpha, incx,
1135 9999
FORMAT(
' ', a6,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
1137 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1138 $
'ANGED INCORRECTLY *******' )
1139 9997
FORMAT(
' ', a6,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1140 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1141 $
' - SUSPECT *******' )
1142 9996
FORMAT(
' ******* ', a6,
' FAILED ON CALL NUMBER:' )
1143 9995
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', i3,
',(', f4.1,
',',
1144 $ f4.1,
'), AP, X,', i2,
',(', f4.1,
',', f4.1,
'), Y,', i2,
1146 9994
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', 2( i3,
',' ),
'(',
1147 $ f4.1,
',', f4.1,
'), A,', i3,
', X,', i2,
',(', f4.1,
',',
1148 $ f4.1,
'), Y,', i2,
') .' )
1149 9993
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', i3,
',(', f4.1,
',',
1150 $ f4.1,
'), A,', i3,
', X,', i2,
',(', f4.1,
',', f4.1,
'), ',
1152 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1158 SUBROUTINE zchk3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1159 $ FATAL, NIDIM, IDIM, NKB, KB, NINC, INC, NMAX,
1160 $ INCMAX, A, AA, AS, X, XX, XS, XT, G, Z )
1171 COMPLEX*16 ZERO, HALF, ONE
1172 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
1173 $ half = ( 0.5d0, 0.0d0 ),
1174 $ one = ( 1.0d0, 0.0d0 ) )
1175 DOUBLE PRECISION RZERO
1176 PARAMETER ( RZERO = 0.0d0 )
1178 DOUBLE PRECISION EPS, THRESH
1179 INTEGER INCMAX, NIDIM, NINC, NKB, NMAX, NOUT, NTRA
1180 LOGICAL FATAL, REWI, TRACE
1183 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ),
1184 $ as( nmax*nmax ), x( nmax ), xs( nmax*incmax ),
1185 $ xt( nmax ), xx( nmax*incmax ), z( nmax )
1186 DOUBLE PRECISION G( NMAX )
1187 INTEGER IDIM( NIDIM ), INC( NINC ), KB( NKB )
1190 DOUBLE PRECISION ERR, ERRMAX
1191 INTEGER I, ICD, ICT, ICU, IK, IN, INCX, INCXS, IX, K,
1192 $ KS, LAA, LDA, LDAS, LX, N, NARGS, NC, NK, NS
1193 LOGICAL BANDED, FULL, NULL, PACKED, RESET, SAME
1194 CHARACTER*1 DIAG, DIAGS, TRANS, TRANSS, UPLO, UPLOS
1195 CHARACTER*2 ICHD, ICHU
1201 EXTERNAL lze, lzeres
1208 INTEGER INFOT, NOUTC
1211 COMMON /infoc/infot, noutc, ok, lerr
1213 DATA ichu/
'UL'/, icht/
'NTC'/, ichd/
'UN'/
1215 full = sname( 3: 3 ).EQ.
'R'
1216 banded = sname( 3: 3 ).EQ.
'B'
1217 packed = sname( 3: 3 ).EQ.
'P'
1221 ELSE IF( banded )
THEN
1223 ELSE IF( packed )
THEN
1235 DO 110 in = 1, nidim
1261 laa = ( n*( n + 1 ) )/2
1268 uplo = ichu( icu: icu )
1271 trans = icht( ict: ict )
1274 diag = ichd( icd: icd )
1279 CALL zmake( sname( 2: 3 ), uplo, diag, n, n, a,
1280 $ nmax, aa, lda, k, k, reset, transl )
1289 CALL zmake(
'GE',
' ',
' ', 1, n, x, 1, xx,
1290 $ abs( incx ), 0, n - 1, reset,
1294 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
1317 IF( sname( 4: 5 ).EQ.
'MV' )
THEN
1320 $
WRITE( ntra, fmt = 9993 )nc, sname,
1321 $ uplo, trans, diag, n, lda, incx
1324 CALL ztrmv( uplo, trans, diag, n, aa, lda,
1326 ELSE IF( banded )
THEN
1328 $
WRITE( ntra, fmt = 9994 )nc, sname,
1329 $ uplo, trans, diag, n, k, lda, incx
1332 CALL ztbmv( uplo, trans, diag, n, k, aa,
1334 ELSE IF( packed )
THEN
1336 $
WRITE( ntra, fmt = 9995 )nc, sname,
1337 $ uplo, trans, diag, n, incx
1340 CALL ztpmv( uplo, trans, diag, n, aa, xx,
1343 ELSE IF( sname( 4: 5 ).EQ.
'SV' )
THEN
1346 $
WRITE( ntra, fmt = 9993 )nc, sname,
1347 $ uplo, trans, diag, n, lda, incx
1350 CALL ztrsv( uplo, trans, diag, n, aa, lda,
1352 ELSE IF( banded )
THEN
1354 $
WRITE( ntra, fmt = 9994 )nc, sname,
1355 $ uplo, trans, diag, n, k, lda, incx
1358 CALL ztbsv( uplo, trans, diag, n, k, aa,
1360 ELSE IF( packed )
THEN
1362 $
WRITE( ntra, fmt = 9995 )nc, sname,
1363 $ uplo, trans, diag, n, incx
1366 CALL ztpsv( uplo, trans, diag, n, aa, xx,
1374 WRITE( nout, fmt = 9992 )
1381 isame( 1 ) = uplo.EQ.uplos
1382 isame( 2 ) = trans.EQ.transs
1383 isame( 3 ) = diag.EQ.diags
1384 isame( 4 ) = ns.EQ.n
1386 isame( 5 ) = lze( as, aa, laa )
1387 isame( 6 ) = ldas.EQ.lda
1389 isame( 7 ) = lze( xs, xx, lx )
1391 isame( 7 ) = lzeres(
'GE',
' ', 1, n, xs,
1394 isame( 8 ) = incxs.EQ.incx
1395 ELSE IF( banded )
THEN
1396 isame( 5 ) = ks.EQ.k
1397 isame( 6 ) = lze( as, aa, laa )
1398 isame( 7 ) = ldas.EQ.lda
1400 isame( 8 ) = lze( xs, xx, lx )
1402 isame( 8 ) = lzeres(
'GE',
' ', 1, n, xs,
1405 isame( 9 ) = incxs.EQ.incx
1406 ELSE IF( packed )
THEN
1407 isame( 5 ) = lze( as, aa, laa )
1409 isame( 6 ) = lze( xs, xx, lx )
1411 isame( 6 ) = lzeres(
'GE',
' ', 1, n, xs,
1414 isame( 7 ) = incxs.EQ.incx
1422 same = same.AND.isame( i )
1423 IF( .NOT.isame( i ) )
1424 $
WRITE( nout, fmt = 9998 )i
1432 IF( sname( 4: 5 ).EQ.
'MV' )
THEN
1436 CALL zmvch( trans, n, n, one, a, nmax, x,
1437 $ incx, zero, z, incx, xt, g,
1438 $ xx, eps, err, fatal, nout,
1440 ELSE IF( sname( 4: 5 ).EQ.
'SV' )
THEN
1445 z( i ) = xx( 1 + ( i - 1 )*
1447 xx( 1 + ( i - 1 )*abs( incx ) )
1450 CALL zmvch( trans, n, n, one, a, nmax, z,
1451 $ incx, zero, x, incx, xt, g,
1452 $ xx, eps, err, fatal, nout,
1455 errmax = max( errmax, err )
1478 IF( errmax.LT.thresh )
THEN
1479 WRITE( nout, fmt = 9999 )sname, nc
1481 WRITE( nout, fmt = 9997 )sname, nc, errmax
1486 WRITE( nout, fmt = 9996 )sname
1488 WRITE( nout, fmt = 9993 )nc, sname, uplo, trans, diag, n, lda,
1490 ELSE IF( banded )
THEN
1491 WRITE( nout, fmt = 9994 )nc, sname, uplo, trans, diag, n, k,
1493 ELSE IF( packed )
THEN
1494 WRITE( nout, fmt = 9995 )nc, sname, uplo, trans, diag, n, incx
1500 9999
FORMAT(
' ', a6,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
1502 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1503 $
'ANGED INCORRECTLY *******' )
1504 9997
FORMAT(
' ', a6,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1505 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1506 $
' - SUSPECT *******' )
1507 9996
FORMAT(
' ******* ', a6,
' FAILED ON CALL NUMBER:' )
1508 9995
FORMAT( 1x, i6,
': ', a6,
'(', 3(
'''', a1,
''',' ), i3,
', AP, ',
1510 9994
FORMAT( 1x, i6,
': ', a6,
'(', 3(
'''', a1,
''',' ), 2( i3,
',' ),
1511 $
' A,', i3,
', X,', i2,
') .' )
1512 9993
FORMAT( 1x, i6,
': ', a6,
'(', 3(
'''', a1,
''',' ), i3,
', A,',
1513 $ i3,
', X,', i2,
') .' )
1514 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1520 SUBROUTINE zchk4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1521 $ FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,
1522 $ INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,
1534 COMPLEX*16 ZERO, HALF, ONE
1535 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
1536 $ half = ( 0.5d0, 0.0d0 ),
1537 $ one = ( 1.0d0, 0.0d0 ) )
1538 DOUBLE PRECISION RZERO
1539 PARAMETER ( RZERO = 0.0d0 )
1541 DOUBLE PRECISION EPS, THRESH
1542 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA
1543 LOGICAL FATAL, REWI, TRACE
1546 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
1547 $ AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),
1548 $ XX( NMAX*INCMAX ), Y( NMAX ),
1549 $ ys( nmax*incmax ), yt( nmax ),
1550 $ yy( nmax*incmax ), z( nmax )
1551 DOUBLE PRECISION G( NMAX )
1552 INTEGER IDIM( NIDIM ), INC( NINC )
1554 COMPLEX*16 ALPHA, ALS, TRANSL
1555 DOUBLE PRECISION ERR, ERRMAX
1556 INTEGER I, IA, IM, IN, INCX, INCXS, INCY, INCYS, IX,
1557 $ iy, j, laa, lda, ldas, lx, ly, m, ms, n, nargs,
1559 LOGICAL CONJ, NULL, RESET, SAME
1565 EXTERNAL lze, lzeres
1569 INTRINSIC abs, dconjg, max, min
1571 INTEGER INFOT, NOUTC
1574 COMMON /infoc/infot, noutc, ok, lerr
1576 conj = sname( 5: 5 ).EQ.
'C'
1584 DO 120 in = 1, nidim
1590 $ m = max( n - nd, 0 )
1592 $ m = min( n + nd, nmax )
1602 null = n.LE.0.OR.m.LE.0
1611 CALL zmake(
'GE',
' ',
' ', 1, m, x, 1, xx, abs( incx ),
1612 $ 0, m - 1, reset, transl )
1615 xx( 1 + abs( incx )*( m/2 - 1 ) ) = zero
1625 CALL zmake(
'GE',
' ',
' ', 1, n, y, 1, yy,
1626 $ abs( incy ), 0, n - 1, reset, transl )
1629 yy( 1 + abs( incy )*( n/2 - 1 ) ) = zero
1638 CALL zmake( sname( 2: 3 ),
' ',
' ', m, n, a, nmax,
1639 $ aa, lda, m - 1, n - 1, reset, transl )
1664 $
WRITE( ntra, fmt = 9994 )nc, sname, m, n,
1665 $ alpha, incx, incy, lda
1669 CALL zgerc( m, n, alpha, xx, incx, yy, incy, aa,
1674 CALL zgeru( m, n, alpha, xx, incx, yy, incy, aa,
1681 WRITE( nout, fmt = 9993 )
1688 isame( 1 ) = ms.EQ.m
1689 isame( 2 ) = ns.EQ.n
1690 isame( 3 ) = als.EQ.alpha
1691 isame( 4 ) = lze( xs, xx, lx )
1692 isame( 5 ) = incxs.EQ.incx
1693 isame( 6 ) = lze( ys, yy, ly )
1694 isame( 7 ) = incys.EQ.incy
1696 isame( 8 ) = lze( as, aa, laa )
1698 isame( 8 ) = lzeres(
'GE',
' ', m, n, as, aa,
1701 isame( 9 ) = ldas.EQ.lda
1707 same = same.AND.isame( i )
1708 IF( .NOT.isame( i ) )
1709 $
WRITE( nout, fmt = 9998 )i
1726 z( i ) = x( m - i + 1 )
1733 w( 1 ) = y( n - j + 1 )
1736 $ w( 1 ) = dconjg( w( 1 ) )
1737 CALL zmvch(
'N', m, 1, alpha, z, nmax, w, 1,
1738 $ one, a( 1, j ), 1, yt, g,
1739 $ aa( 1 + ( j - 1 )*lda ), eps,
1740 $ err, fatal, nout, .true. )
1741 errmax = max( errmax, err )
1763 IF( errmax.LT.thresh )
THEN
1764 WRITE( nout, fmt = 9999 )sname, nc
1766 WRITE( nout, fmt = 9997 )sname, nc, errmax
1771 WRITE( nout, fmt = 9995 )j
1774 WRITE( nout, fmt = 9996 )sname
1775 WRITE( nout, fmt = 9994 )nc, sname, m, n, alpha, incx, incy, lda
1780 9999
FORMAT(
' ', a6,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
1782 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1783 $
'ANGED INCORRECTLY *******' )
1784 9997
FORMAT(
' ', a6,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1785 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1786 $
' - SUSPECT *******' )
1787 9996
FORMAT(
' ******* ', a6,
' FAILED ON CALL NUMBER:' )
1788 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
1789 9994
FORMAT( 1x, i6,
': ', a6,
'(', 2( i3,
',' ),
'(', f4.1,
',', f4.1,
1790 $
'), X,', i2,
', Y,', i2,
', A,', i3,
') ',
1792 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1798 SUBROUTINE zchk5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1799 $ FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,
1800 $ INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,
1812 COMPLEX*16 ZERO, HALF, ONE
1813 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
1814 $ half = ( 0.5d0, 0.0d0 ),
1815 $ one = ( 1.0d0, 0.0d0 ) )
1816 DOUBLE PRECISION RZERO
1817 PARAMETER ( RZERO = 0.0d0 )
1819 DOUBLE PRECISION EPS, THRESH
1820 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA
1821 LOGICAL FATAL, REWI, TRACE
1824 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
1825 $ AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),
1826 $ xx( nmax*incmax ), y( nmax ),
1827 $ ys( nmax*incmax ), yt( nmax ),
1828 $ yy( nmax*incmax ), z( nmax )
1829 DOUBLE PRECISION G( NMAX )
1830 INTEGER IDIM( NIDIM ), INC( NINC )
1832 COMPLEX*16 ALPHA, TRANSL
1833 DOUBLE PRECISION ERR, ERRMAX, RALPHA, RALS
1834 INTEGER I, IA, IC, IN, INCX, INCXS, IX, J, JA, JJ, LAA,
1835 $ lda, ldas, lj, lx, n, nargs, nc, ns
1836 LOGICAL FULL, NULL, PACKED, RESET, SAME, UPPER
1837 CHARACTER*1 UPLO, UPLOS
1844 EXTERNAL lze, lzeres
1848 INTRINSIC abs, dble, dcmplx, dconjg, max
1850 INTEGER INFOT, NOUTC
1853 COMMON /infoc/infot, noutc, ok, lerr
1857 full = sname( 3: 3 ).EQ.
'E'
1858 packed = sname( 3: 3 ).EQ.
'P'
1862 ELSE IF( packed )
THEN
1870 DO 100 in = 1, nidim
1880 laa = ( n*( n + 1 ) )/2
1886 uplo = ich( ic: ic )
1896 CALL zmake(
'GE',
' ',
' ', 1, n, x, 1, xx, abs( incx ),
1897 $ 0, n - 1, reset, transl )
1900 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
1904 ralpha = dble( alf( ia ) )
1905 alpha = dcmplx( ralpha, rzero )
1906 null = n.LE.0.OR.ralpha.EQ.rzero
1911 CALL zmake( sname( 2: 3 ), uplo,
' ', n, n, a, nmax,
1912 $ aa, lda, n - 1, n - 1, reset, transl )
1934 $
WRITE( ntra, fmt = 9993 )nc, sname, uplo, n,
1938 CALL zher( uplo, n, ralpha, xx, incx, aa, lda )
1939 ELSE IF( packed )
THEN
1941 $
WRITE( ntra, fmt = 9994 )nc, sname, uplo, n,
1945 CALL zhpr( uplo, n, ralpha, xx, incx, aa )
1951 WRITE( nout, fmt = 9992 )
1958 isame( 1 ) = uplo.EQ.uplos
1959 isame( 2 ) = ns.EQ.n
1960 isame( 3 ) = rals.EQ.ralpha
1961 isame( 4 ) = lze( xs, xx, lx )
1962 isame( 5 ) = incxs.EQ.incx
1964 isame( 6 ) = lze( as, aa, laa )
1966 isame( 6 ) = lzeres( sname( 2: 3 ), uplo, n, n, as,
1969 IF( .NOT.packed )
THEN
1970 isame( 7 ) = ldas.EQ.lda
1977 same = same.AND.isame( i )
1978 IF( .NOT.isame( i ) )
1979 $
WRITE( nout, fmt = 9998 )i
1996 z( i ) = x( n - i + 1 )
2001 w( 1 ) = dconjg( z( j ) )
2009 CALL zmvch(
'N', lj, 1, alpha, z( jj ), lj, w,
2010 $ 1, one, a( jj, j ), 1, yt, g,
2011 $ aa( ja ), eps, err, fatal, nout,
2022 errmax = max( errmax, err )
2043 IF( errmax.LT.thresh )
THEN
2044 WRITE( nout, fmt = 9999 )sname, nc
2046 WRITE( nout, fmt = 9997 )sname, nc, errmax
2051 WRITE( nout, fmt = 9995 )j
2054 WRITE( nout, fmt = 9996 )sname
2056 WRITE( nout, fmt = 9993 )nc, sname, uplo, n, ralpha, incx, lda
2057 ELSE IF( packed )
THEN
2058 WRITE( nout, fmt = 9994 )nc, sname, uplo, n, ralpha, incx
2064 9999
FORMAT(
' ', a6,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
2066 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2067 $
'ANGED INCORRECTLY *******' )
2068 9997
FORMAT(
' ', a6,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
2069 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
2070 $
' - SUSPECT *******' )
2071 9996
FORMAT(
' ******* ', a6,
' FAILED ON CALL NUMBER:' )
2072 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2073 9994
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', i3,
',', f4.1,
', X,',
2075 9993
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', i3,
',', f4.1,
', X,',
2076 $ i2,
', A,', i3,
') .' )
2077 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2083 SUBROUTINE zchk6( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
2084 $ FATAL, NIDIM, IDIM, NALF, ALF, NINC, INC, NMAX,
2085 $ INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,
2097 COMPLEX*16 ZERO, HALF, ONE
2098 PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ),
2099 $ half = ( 0.5d0, 0.0d0 ),
2100 $ one = ( 1.0d0, 0.0d0 ) )
2101 DOUBLE PRECISION RZERO
2102 PARAMETER ( RZERO = 0.0d0 )
2104 DOUBLE PRECISION EPS, THRESH
2105 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA
2106 LOGICAL FATAL, REWI, TRACE
2109 COMPLEX*16 A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
2110 $ AS( NMAX*NMAX ), X( NMAX ), XS( NMAX*INCMAX ),
2111 $ XX( NMAX*INCMAX ), Y( NMAX ),
2112 $ YS( NMAX*INCMAX ), YT( NMAX ),
2113 $ YY( NMAX*INCMAX ), Z( NMAX, 2 )
2114 DOUBLE PRECISION G( NMAX )
2115 INTEGER IDIM( NIDIM ), INC( NINC )
2117 COMPLEX*16 ALPHA, ALS, TRANSL
2118 DOUBLE PRECISION ERR, ERRMAX
2119 INTEGER I, IA, IC, IN, INCX, INCXS, INCY, INCYS, IX,
2120 $ IY, J, JA, JJ, LAA, LDA, LDAS, LJ, LX, LY, N,
2122 LOGICAL FULL, NULL, PACKED, RESET, SAME, UPPER
2123 CHARACTER*1 UPLO, UPLOS
2130 EXTERNAL LZE, LZERES
2134 INTRINSIC abs, dconjg, max
2136 INTEGER INFOT, NOUTC
2139 COMMON /infoc/infot, noutc, ok, lerr
2143 full = sname( 3: 3 ).EQ.
'E'
2144 packed = sname( 3: 3 ).EQ.
'P'
2148 ELSE IF( packed )
THEN
2156 DO 140 in = 1, nidim
2166 laa = ( n*( n + 1 ) )/2
2172 uplo = ich( ic: ic )
2182 CALL zmake(
'GE',
' ',
' ', 1, n, x, 1, xx, abs( incx ),
2183 $ 0, n - 1, reset, transl )
2186 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
2196 CALL zmake(
'GE',
' ',
' ', 1, n, y, 1, yy,
2197 $ abs( incy ), 0, n - 1, reset, transl )
2200 yy( 1 + abs( incy )*( n/2 - 1 ) ) = zero
2205 null = n.LE.0.OR.alpha.EQ.zero
2210 CALL zmake( sname( 2: 3 ), uplo,
' ', n, n, a,
2211 $ nmax, aa, lda, n - 1, n - 1, reset,
2238 $
WRITE( ntra, fmt = 9993 )nc, sname, uplo, n,
2239 $ alpha, incx, incy, lda
2242 CALL zher2( uplo, n, alpha, xx, incx, yy, incy,
2244 ELSE IF( packed )
THEN
2246 $
WRITE( ntra, fmt = 9994 )nc, sname, uplo, n,
2250 CALL zhpr2( uplo, n, alpha, xx, incx, yy, incy,
2257 WRITE( nout, fmt = 9992 )
2264 isame( 1 ) = uplo.EQ.uplos
2265 isame( 2 ) = ns.EQ.n
2266 isame( 3 ) = als.EQ.alpha
2267 isame( 4 ) = lze( xs, xx, lx )
2268 isame( 5 ) = incxs.EQ.incx
2269 isame( 6 ) = lze( ys, yy, ly )
2270 isame( 7 ) = incys.EQ.incy
2272 isame( 8 ) = lze( as, aa, laa )
2274 isame( 8 ) = lzeres( sname( 2: 3 ), uplo, n, n,
2277 IF( .NOT.packed )
THEN
2278 isame( 9 ) = ldas.EQ.lda
2285 same = same.AND.isame( i )
2286 IF( .NOT.isame( i ) )
2287 $
WRITE( nout, fmt = 9998 )i
2304 z( i, 1 ) = x( n - i + 1 )
2313 z( i, 2 ) = y( n - i + 1 )
2318 w( 1 ) = alpha*dconjg( z( j, 2 ) )
2319 w( 2 ) = dconjg( alpha )*dconjg( z( j, 1 ) )
2327 CALL zmvch(
'N', lj, 2, one, z( jj, 1 ),
2328 $ nmax, w, 1, one, a( jj, j ), 1,
2329 $ yt, g, aa( ja ), eps, err, fatal,
2340 errmax = max( errmax, err )
2363 IF( errmax.LT.thresh )
THEN
2364 WRITE( nout, fmt = 9999 )sname, nc
2366 WRITE( nout, fmt = 9997 )sname, nc, errmax
2371 WRITE( nout, fmt = 9995 )j
2374 WRITE( nout, fmt = 9996 )sname
2376 WRITE( nout, fmt = 9993 )nc, sname, uplo, n, alpha, incx,
2378 ELSE IF( packed )
THEN
2379 WRITE( nout, fmt = 9994 )nc, sname, uplo, n, alpha, incx, incy
2385 9999
FORMAT(
' ', a6,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
2387 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2388 $
'ANGED INCORRECTLY *******' )
2389 9997
FORMAT(
' ', a6,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
2390 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
2391 $
' - SUSPECT *******' )
2392 9996
FORMAT(
' ******* ', a6,
' FAILED ON CALL NUMBER:' )
2393 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2394 9994
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', i3,
',(', f4.1,
',',
2395 $ f4.1,
'), X,', i2,
', Y,', i2,
', AP) ',
2397 9993
FORMAT( 1x, i6,
': ', a6,
'(''', a1,
''',', i3,
',(', f4.1,
',',
2398 $ f4.1,
'), X,', i2,
', Y,', i2,
', A,', i3,
') ',
2400 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2422 INTEGER INFOT, NOUTC
2425 COMPLEX*16 ALPHA, BETA
2426 DOUBLE PRECISION RALPHA
2428 COMPLEX*16 A( 1, 1 ), X( 1 ), Y( 1 )
2430 EXTERNAL CHKXER, ZGBMV, ZGEMV, ZGERC, ZGERU, ZHBMV,
2431 $ ZHEMV, ZHER, ZHER2, ZHPMV, ZHPR, ZHPR2, ZTBMV,
2432 $ ZTBSV, ZTPMV, ZTPSV, ZTRMV, ZTRSV
2434 COMMON /INFOC/INFOT, NOUTC, OK, LERR
2442 GO TO ( 10, 20, 30, 40, 50, 60, 70, 80,
2443 $ 90, 100, 110, 120, 130, 140, 150, 160,
2446 CALL zgemv(
'/', 0, 0, alpha, a, 1, x, 1, beta, y, 1 )
2447 CALL chkxer( srnamt, infot, nout, lerr, ok )
2449 CALL zgemv(
'N', -1, 0, alpha, a, 1, x, 1, beta, y, 1 )
2450 CALL chkxer( srnamt, infot, nout, lerr, ok )
2452 CALL zgemv(
'N', 0, -1, alpha, a, 1, x, 1, beta, y, 1 )
2453 CALL chkxer( srnamt, infot, nout, lerr, ok )
2455 CALL zgemv(
'N', 2, 0, alpha, a, 1, x, 1, beta, y, 1 )
2456 CALL chkxer( srnamt, infot, nout, lerr, ok )
2458 CALL zgemv(
'N', 0, 0, alpha, a, 1, x, 0, beta, y, 1 )
2459 CALL chkxer( srnamt, infot, nout, lerr, ok )
2461 CALL zgemv(
'N', 0, 0, alpha, a, 1, x, 1, beta, y, 0 )
2462 CALL chkxer( srnamt, infot, nout, lerr, ok )
2465 CALL zgbmv(
'/', 0, 0, 0, 0, alpha, a, 1, x, 1, beta, y, 1 )
2466 CALL chkxer( srnamt, infot, nout, lerr, ok )
2468 CALL zgbmv(
'N', -1, 0, 0, 0, alpha, a, 1, x, 1, beta, y, 1 )
2469 CALL chkxer( srnamt, infot, nout, lerr, ok )
2471 CALL zgbmv(
'N', 0, -1, 0, 0, alpha, a, 1, x, 1, beta, y, 1 )
2472 CALL chkxer( srnamt, infot, nout, lerr, ok )
2474 CALL zgbmv(
'N', 0, 0, -1, 0, alpha, a, 1, x, 1, beta, y, 1 )
2475 CALL chkxer( srnamt, infot, nout, lerr, ok )
2477 CALL zgbmv(
'N', 2, 0, 0, -1, alpha, a, 1, x, 1, beta, y, 1 )
2478 CALL chkxer( srnamt, infot, nout, lerr, ok )
2480 CALL zgbmv(
'N', 0, 0, 1, 0, alpha, a, 1, x, 1, beta, y, 1 )
2481 CALL chkxer( srnamt, infot, nout, lerr, ok )
2483 CALL zgbmv(
'N', 0, 0, 0, 0, alpha, a, 1, x, 0, beta, y, 1 )
2484 CALL chkxer( srnamt, infot, nout, lerr, ok )
2486 CALL zgbmv(
'N', 0, 0, 0, 0, alpha, a, 1, x, 1, beta, y, 0 )
2487 CALL chkxer( srnamt, infot, nout, lerr, ok )
2490 CALL zhemv(
'/', 0, alpha, a, 1, x, 1, beta, y, 1 )
2491 CALL chkxer( srnamt, infot, nout, lerr, ok )
2493 CALL zhemv(
'U', -1, alpha, a, 1, x, 1, beta, y, 1 )
2494 CALL chkxer( srnamt, infot, nout, lerr, ok )
2496 CALL zhemv(
'U', 2, alpha, a, 1, x, 1, beta, y, 1 )
2497 CALL chkxer( srnamt, infot, nout, lerr, ok )
2499 CALL zhemv(
'U', 0, alpha, a, 1, x, 0, beta, y, 1 )
2500 CALL chkxer( srnamt, infot, nout, lerr, ok )
2502 CALL zhemv(
'U', 0, alpha, a, 1, x, 1, beta, y, 0 )
2503 CALL chkxer( srnamt, infot, nout, lerr, ok )
2506 CALL zhbmv(
'/', 0, 0, alpha, a, 1, x, 1, beta, y, 1 )
2507 CALL chkxer( srnamt, infot, nout, lerr, ok )
2509 CALL zhbmv(
'U', -1, 0, alpha, a, 1, x, 1, beta, y, 1 )
2510 CALL chkxer( srnamt, infot, nout, lerr, ok )
2512 CALL zhbmv(
'U', 0, -1, alpha, a, 1, x, 1, beta, y, 1 )
2513 CALL chkxer( srnamt, infot, nout, lerr, ok )
2515 CALL zhbmv(
'U', 0, 1, alpha, a, 1, x, 1, beta, y, 1 )
2516 CALL chkxer( srnamt, infot, nout, lerr, ok )
2518 CALL zhbmv(
'U', 0, 0, alpha, a, 1, x, 0, beta, y, 1 )
2519 CALL chkxer( srnamt, infot, nout, lerr, ok )
2521 CALL zhbmv(
'U', 0, 0, alpha, a, 1, x, 1, beta, y, 0 )
2522 CALL chkxer( srnamt, infot, nout, lerr, ok )
2525 CALL zhpmv(
'/', 0, alpha, a, x, 1, beta, y, 1 )
2526 CALL chkxer( srnamt, infot, nout, lerr, ok )
2528 CALL zhpmv(
'U', -1, alpha, a, x, 1, beta, y, 1 )
2529 CALL chkxer( srnamt, infot, nout, lerr, ok )
2531 CALL zhpmv(
'U', 0, alpha, a, x, 0, beta, y, 1 )
2532 CALL chkxer( srnamt, infot, nout, lerr, ok )
2534 CALL zhpmv(
'U', 0, alpha, a, x, 1, beta, y, 0 )
2535 CALL chkxer( srnamt, infot, nout, lerr, ok )
2538 CALL ztrmv(
'/',
'N',
'N', 0, a, 1, x, 1 )
2539 CALL chkxer( srnamt, infot, nout, lerr, ok )
2541 CALL ztrmv(
'U',
'/',
'N', 0, a, 1, x, 1 )
2542 CALL chkxer( srnamt, infot, nout, lerr, ok )
2544 CALL ztrmv(
'U',
'N',
'/', 0, a, 1, x, 1 )
2545 CALL chkxer( srnamt, infot, nout, lerr, ok )
2547 CALL ztrmv(
'U',
'N',
'N', -1, a, 1, x, 1 )
2548 CALL chkxer( srnamt, infot, nout, lerr, ok )
2550 CALL ztrmv(
'U',
'N',
'N', 2, a, 1, x, 1 )
2551 CALL chkxer( srnamt, infot, nout, lerr, ok )
2553 CALL ztrmv(
'U',
'N',
'N', 0, a, 1, x, 0 )
2554 CALL chkxer( srnamt, infot, nout, lerr, ok )
2557 CALL ztbmv(
'/',
'N',
'N', 0, 0, a, 1, x, 1 )
2558 CALL chkxer( srnamt, infot, nout, lerr, ok )
2560 CALL ztbmv(
'U',
'/',
'N', 0, 0, a, 1, x, 1 )
2561 CALL chkxer( srnamt, infot, nout, lerr, ok )
2563 CALL ztbmv(
'U',
'N',
'/', 0, 0, a, 1, x, 1 )
2564 CALL chkxer( srnamt, infot, nout, lerr, ok )
2566 CALL ztbmv(
'U',
'N',
'N', -1, 0, a, 1, x, 1 )
2567 CALL chkxer( srnamt, infot, nout, lerr, ok )
2569 CALL ztbmv(
'U',
'N',
'N', 0, -1, a, 1, x, 1 )
2570 CALL chkxer( srnamt, infot, nout, lerr, ok )
2572 CALL ztbmv(
'U',
'N',
'N', 0, 1, a, 1, x, 1 )
2573 CALL chkxer( srnamt, infot, nout, lerr, ok )
2575 CALL ztbmv(
'U',
'N',
'N', 0, 0, a, 1, x, 0 )
2576 CALL chkxer( srnamt, infot, nout, lerr, ok )
2579 CALL ztpmv(
'/',
'N',
'N', 0, a, x, 1 )
2580 CALL chkxer( srnamt, infot, nout, lerr, ok )
2582 CALL ztpmv(
'U',
'/',
'N', 0, a, x, 1 )
2583 CALL chkxer( srnamt, infot, nout, lerr, ok )
2585 CALL ztpmv(
'U',
'N',
'/', 0, a, x, 1 )
2586 CALL chkxer( srnamt, infot, nout, lerr, ok )
2588 CALL ztpmv(
'U',
'N',
'N', -1, a, x, 1 )
2589 CALL chkxer( srnamt, infot, nout, lerr, ok )
2591 CALL ztpmv(
'U',
'N',
'N', 0, a, x, 0 )
2592 CALL chkxer( srnamt, infot, nout, lerr, ok )
2595 CALL ztrsv(
'/',
'N',
'N', 0, a, 1, x, 1 )
2596 CALL chkxer( srnamt, infot, nout, lerr, ok )
2598 CALL ztrsv(
'U',
'/',
'N', 0, a, 1, x, 1 )
2599 CALL chkxer( srnamt, infot, nout, lerr, ok )
2601 CALL ztrsv(
'U',
'N',
'/', 0, a, 1, x, 1 )
2602 CALL chkxer( srnamt, infot, nout, lerr, ok )
2604 CALL ztrsv(
'U',
'N',
'N', -1, a, 1, x, 1 )
2605 CALL chkxer( srnamt, infot, nout, lerr, ok )
2607 CALL ztrsv(
'U',
'N',
'N', 2, a, 1, x, 1 )
2608 CALL chkxer( srnamt, infot, nout, lerr, ok )
2610 CALL ztrsv(
'U',
'N',
'N', 0, a, 1, x, 0 )
2611 CALL chkxer( srnamt, infot, nout, lerr, ok )
2614 CALL ztbsv(
'/',
'N',
'N', 0, 0, a, 1, x, 1 )
2615 CALL chkxer( srnamt, infot, nout, lerr, ok )
2617 CALL ztbsv(
'U',
'/',
'N', 0, 0, a, 1, x, 1 )
2618 CALL chkxer( srnamt, infot, nout, lerr, ok )
2620 CALL ztbsv(
'U',
'N',
'/', 0, 0, a, 1, x, 1 )
2621 CALL chkxer( srnamt, infot, nout, lerr, ok )
2623 CALL ztbsv(
'U',
'N',
'N', -1, 0, a, 1, x, 1 )
2624 CALL chkxer( srnamt, infot, nout, lerr, ok )
2626 CALL ztbsv(
'U',
'N',
'N', 0, -1, a, 1, x, 1 )
2627 CALL chkxer( srnamt, infot, nout, lerr, ok )
2629 CALL ztbsv(
'U',
'N',
'N', 0, 1, a, 1, x, 1 )
2630 CALL chkxer( srnamt, infot, nout, lerr, ok )
2632 CALL ztbsv(
'U',
'N',
'N', 0, 0, a, 1, x, 0 )
2633 CALL chkxer( srnamt, infot, nout, lerr, ok )
2636 CALL ztpsv(
'/',
'N',
'N', 0, a, x, 1 )
2637 CALL chkxer( srnamt, infot, nout, lerr, ok )
2639 CALL ztpsv(
'U',
'/',
'N', 0, a, x, 1 )
2640 CALL chkxer( srnamt, infot, nout, lerr, ok )
2642 CALL ztpsv(
'U',
'N',
'/', 0, a, x, 1 )
2643 CALL chkxer( srnamt, infot, nout, lerr, ok )
2645 CALL ztpsv(
'U',
'N',
'N', -1, a, x, 1 )
2646 CALL chkxer( srnamt, infot, nout, lerr, ok )
2648 CALL ztpsv(
'U',
'N',
'N', 0, a, x, 0 )
2649 CALL chkxer( srnamt, infot, nout, lerr, ok )
2652 CALL zgerc( -1, 0, alpha, x, 1, y, 1, a, 1 )
2653 CALL chkxer( srnamt, infot, nout, lerr, ok )
2655 CALL zgerc( 0, -1, alpha, x, 1, y, 1, a, 1 )
2656 CALL chkxer( srnamt, infot, nout, lerr, ok )
2658 CALL zgerc( 0, 0, alpha, x, 0, y, 1, a, 1 )
2659 CALL chkxer( srnamt, infot, nout, lerr, ok )
2661 CALL zgerc( 0, 0, alpha, x, 1, y, 0, a, 1 )
2662 CALL chkxer( srnamt, infot, nout, lerr, ok )
2664 CALL zgerc( 2, 0, alpha, x, 1, y, 1, a, 1 )
2665 CALL chkxer( srnamt, infot, nout, lerr, ok )
2668 CALL zgeru( -1, 0, alpha, x, 1, y, 1, a, 1 )
2669 CALL chkxer( srnamt, infot, nout, lerr, ok )
2671 CALL zgeru( 0, -1, alpha, x, 1, y, 1, a, 1 )
2672 CALL chkxer( srnamt, infot, nout, lerr, ok )
2674 CALL zgeru( 0, 0, alpha, x, 0, y, 1, a, 1 )
2675 CALL chkxer( srnamt, infot, nout, lerr, ok )
2677 CALL zgeru( 0, 0, alpha, x, 1, y, 0, a, 1 )
2678 CALL chkxer( srnamt, infot, nout, lerr, ok )
2680 CALL zgeru( 2, 0, alpha, x, 1, y, 1, a, 1 )
2681 CALL chkxer( srnamt, infot, nout, lerr, ok )
2684 CALL zher(
'/', 0, ralpha, x, 1, a, 1 )
2685 CALL chkxer( srnamt, infot, nout, lerr, ok )
2687 CALL zher(
'U', -1, ralpha, x, 1, a, 1 )
2688 CALL chkxer( srnamt, infot, nout, lerr, ok )
2690 CALL zher(
'U', 0, ralpha, x, 0, a, 1 )
2691 CALL chkxer( srnamt, infot, nout, lerr, ok )
2693 CALL zher(
'U', 2, ralpha, x, 1, a, 1 )
2694 CALL chkxer( srnamt, infot, nout, lerr, ok )
2697 CALL zhpr(
'/', 0, ralpha, x, 1, a )
2698 CALL chkxer( srnamt, infot, nout, lerr, ok )
2700 CALL zhpr(
'U', -1, ralpha, x, 1, a )
2701 CALL chkxer( srnamt, infot, nout, lerr, ok )
2703 CALL zhpr(
'U', 0, ralpha, x, 0, a )
2704 CALL chkxer( srnamt, infot, nout, lerr, ok )
2707 CALL zher2(
'/', 0, alpha, x, 1, y, 1, a, 1 )
2708 CALL chkxer( srnamt, infot, nout, lerr, ok )
2710 CALL zher2(
'U', -1, alpha, x, 1, y, 1, a, 1 )
2711 CALL chkxer( srnamt, infot, nout, lerr, ok )
2713 CALL zher2(
'U', 0, alpha, x, 0, y, 1, a, 1 )
2714 CALL chkxer( srnamt, infot, nout, lerr, ok )
2716 CALL zher2(
'U', 0, alpha, x, 1, y, 0, a, 1 )
2717 CALL chkxer( srnamt, infot, nout, lerr, ok )
2719 CALL zher2(
'U', 2, alpha, x, 1, y, 1, a, 1 )
2720 CALL chkxer( srnamt, infot, nout, lerr, ok )
2723 CALL zhpr2(
'/', 0, alpha, x, 1, y, 1, a )
2724 CALL chkxer( srnamt, infot, nout, lerr, ok )
2726 CALL zhpr2(
'U', -1, alpha, x, 1, y, 1, a )
2727 CALL chkxer( srnamt, infot, nout, lerr, ok )
2729 CALL zhpr2(
'U', 0, alpha, x, 0, y, 1, a )
2730 CALL chkxer( srnamt, infot, nout, lerr, ok )
2732 CALL zhpr2(
'U', 0, alpha, x, 1, y, 0, a )
2733 CALL chkxer( srnamt, infot, nout, lerr, ok )
2736 WRITE( nout, fmt = 9999 )srnamt
2738 WRITE( nout, fmt = 9998 )srnamt
2742 9999
FORMAT(
' ', a6,
' PASSED THE TESTS OF ERROR-EXITS' )
2743 9998
FORMAT(
' ******* ', a6,
' FAILED THE TESTS OF ERROR-EXITS *****',
2749 SUBROUTINE zmake( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL,
2750 $ KU, RESET, TRANSL )
2766 COMPLEX*16 ZERO, ONE
2767 parameter( zero = ( 0.0d0, 0.0d0 ),
2768 $ one = ( 1.0d0, 0.0d0 ) )
2770 PARAMETER ( ROGUE = ( -1.0d10, 1.0d10 ) )
2771 DOUBLE PRECISION RZERO
2772 PARAMETER ( RZERO = 0.0d0 )
2773 DOUBLE PRECISION RROGUE
2774 PARAMETER ( RROGUE = -1.0d10 )
2777 INTEGER KL, KU, LDA, M, N, NMAX
2779 CHARACTER*1 DIAG, UPLO
2782 COMPLEX*16 A( NMAX, * ), AA( * )
2784 INTEGER I, I1, I2, I3, IBEG, IEND, IOFF, J, JJ, KK
2785 LOGICAL GEN, LOWER, SYM, TRI, UNIT, UPPER
2790 INTRINSIC dble, dcmplx, dconjg, max, min
2792 gen =
TYPE( 1: 1 ).EQ.
'G'
2793 SYM = type( 1: 1 ).EQ.
'H'
2794 tri =
TYPE( 1: 1 ).EQ.
'T'
2795 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2796 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2797 unit = tri.AND.diag.EQ.
'U'
2803 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2805 IF( ( i.LE.j.AND.j - i.LE.ku ).OR.
2806 $ ( i.GE.j.AND.i - j.LE.kl ) )
THEN
2807 a( i, j ) = zbeg( reset ) + transl
2813 a( j, i ) = dconjg( a( i, j ) )
2821 $ a( j, j ) = dcmplx( dble( a( j, j ) ), rzero )
2823 $ a( j, j ) = a( j, j ) + one
2830 IF( type.EQ.
'GE' )
THEN
2833 aa( i + ( j - 1 )*lda ) = a( i, j )
2835 DO 40 i = m + 1, lda
2836 aa( i + ( j - 1 )*lda ) = rogue
2839 ELSE IF( type.EQ.
'GB' )
THEN
2841 DO 60 i1 = 1, ku + 1 - j
2842 aa( i1 + ( j - 1 )*lda ) = rogue
2844 DO 70 i2 = i1, min( kl + ku + 1, ku + 1 + m - j )
2845 aa( i2 + ( j - 1 )*lda ) = a( i2 + j - ku - 1, j )
2848 aa( i3 + ( j - 1 )*lda ) = rogue
2851 ELSE IF( type.EQ.
'HE'.OR.type.EQ.
'TR' )
THEN
2868 DO 100 i = 1, ibeg - 1
2869 aa( i + ( j - 1 )*lda ) = rogue
2871 DO 110 i = ibeg, iend
2872 aa( i + ( j - 1 )*lda ) = a( i, j )
2874 DO 120 i = iend + 1, lda
2875 aa( i + ( j - 1 )*lda ) = rogue
2878 jj = j + ( j - 1 )*lda
2879 aa( jj ) = dcmplx( dble( aa( jj ) ), rrogue )
2882 ELSE IF( type.EQ.
'HB'.OR.type.EQ.
'TB' )
THEN
2886 ibeg = max( 1, kl + 2 - j )
2899 iend = min( kl + 1, 1 + m - j )
2901 DO 140 i = 1, ibeg - 1
2902 aa( i + ( j - 1 )*lda ) = rogue
2904 DO 150 i = ibeg, iend
2905 aa( i + ( j - 1 )*lda ) = a( i + j - kk, j )
2907 DO 160 i = iend + 1, lda
2908 aa( i + ( j - 1 )*lda ) = rogue
2911 jj = kk + ( j - 1 )*lda
2912 aa( jj ) = dcmplx( dble( aa( jj ) ), rrogue )
2915 ELSE IF( type.EQ.
'HP'.OR.type.EQ.
'TP' )
THEN
2925 DO 180 i = ibeg, iend
2927 aa( ioff ) = a( i, j )
2930 $ aa( ioff ) = rogue
2932 $ aa( ioff ) = dcmplx( dble( aa( ioff ) ), rrogue )
2942 SUBROUTINE zmvch( TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y,
2943 $ INCY, YT, G, YY, EPS, ERR, FATAL, NOUT, MV )
2955 parameter( zero = ( 0.0d0, 0.0d0 ) )
2956 DOUBLE PRECISION RZERO, RONE
2957 PARAMETER ( RZERO = 0.0d0, rone = 1.0d0 )
2959 COMPLEX*16 ALPHA, BETA
2960 DOUBLE PRECISION EPS, ERR
2961 INTEGER INCX, INCY, M, N, NMAX, NOUT
2965 COMPLEX*16 A( NMAX, * ), X( * ), Y( * ), YT( * ), YY( * )
2966 DOUBLE PRECISION G( * )
2969 DOUBLE PRECISION ERRI
2970 INTEGER I, INCXL, INCYL, IY, J, JX, KX, KY, ML, NL
2973 INTRINSIC abs, dble, dconjg, dimag, max, sqrt
2975 DOUBLE PRECISION ABS1
2977 abs1( c ) = abs( dble( c ) ) + abs( dimag( c ) )
2980 ctran = trans.EQ.
'C'
2981 IF( tran.OR.ctran )
THEN
3013 yt( iy ) = yt( iy ) + a( j, i )*x( jx )
3014 g( iy ) = g( iy ) + abs1( a( j, i ) )*abs1( x( jx ) )
3017 ELSE IF( ctran )
THEN
3019 yt( iy ) = yt( iy ) + dconjg( a( j, i ) )*x( jx )
3020 g( iy ) = g( iy ) + abs1( a( j, i ) )*abs1( x( jx ) )
3025 yt( iy ) = yt( iy ) + a( i, j )*x( jx )
3026 g( iy ) = g( iy ) + abs1( a( i, j ) )*abs1( x( jx ) )
3030 yt( iy ) = alpha*yt( iy ) + beta*y( iy )
3031 g( iy ) = abs1( alpha )*g( iy ) + abs1( beta )*abs1( y( iy ) )
3039 erri = abs( yt( i ) - yy( 1 + ( i - 1 )*abs( incy ) ) )/eps
3040 IF( g( i ).NE.rzero )
3041 $ erri = erri/g( i )
3042 err = max( err, erri )
3043 IF( err*sqrt( eps ).GE.rone )
3052 WRITE( nout, fmt = 9999 )
3055 WRITE( nout, fmt = 9998 )i, yt( i ),
3056 $ yy( 1 + ( i - 1 )*abs( incy ) )
3058 WRITE( nout, fmt = 9998 )i,
3059 $ yy( 1 + ( i - 1 )*abs( incy ) ), yt( i )
3066 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
3067 $
'F ACCURATE *******', /
' EXPECTED RE',
3068 $
'SULT COMPUTED RESULT' )
3069 9998
FORMAT( 1x, i7, 2(
' (', g15.6,
',', g15.6,
')' ) )
3074 LOGICAL FUNCTION lze( RI, RJ, LR )
3087 COMPLEX*16 ri( * ), rj( * )
3092 IF( ri( i ).NE.rj( i ) )
3104 LOGICAL FUNCTION lzeres( TYPE, UPLO, M, N, AA, AS, LDA )
3121 COMPLEX*16 aa( lda, * ), as( lda, * )
3123 INTEGER i, ibeg, iend, j
3127 IF( type.EQ.
'GE' )
THEN
3129 DO 10 i = m + 1, lda
3130 IF( aa( i, j ).NE.as( i, j ) )
3134 ELSE IF( type.EQ.
'HE' )
THEN
3143 DO 30 i = 1, ibeg - 1
3144 IF( aa( i, j ).NE.as( i, j ) )
3147 DO 40 i = iend + 1, lda
3148 IF( aa( i, j ).NE.as( i, j ) )
3177 INTEGER i, ic, j, mi, mj
3179 SAVE i, ic, j, mi, mj
3203 i = i - 1000*( i/1000 )
3204 j = j - 1000*( j/1000 )
3209 zbeg = dcmplx( ( i - 500 )/1001.0d0, ( j - 500 )/1001.0d0 )
3223 DOUBLE PRECISION x, y
3231 SUBROUTINE chkxer( SRNAMT, INFOT, NOUT, LERR, OK )
3247 WRITE( nout, fmt = 9999 )infot, srnamt
3253 9999
FORMAT(
' ***** ILLEGAL VALUE OF PARAMETER NUMBER ', i2,
' NOT D',
3254 $
'ETECTED BY ', a6,
' *****' )
3259 SUBROUTINE zregr1( TRANS, M, N, LY, KL, KU, ALPHA, A, LDA, X,
3260 $ INCX, BETA, Y, INCY, YS )
3266 INTEGER LY, M, N, KL, KU, LDA, INCX, INCY
3267 COMPLEX*16 ALPHA, BETA
3269 COMPLEX*16 A(LDA,*), X(*), Y(*), YS(*)
3273 INTRINSIC dble, dcmplx
3280 alpha = dcmplx( 1.0d0 )
3283 beta = dcmplx( -0.7d0, -0.8d0 )
3287 y( i ) = dcmplx( 42.0d0, dble( i ) )
3317 COMMON /INFOC/INFOT, NOUT, OK, LERR
3318 COMMON /SRNAMC/SRNAMT
3321 IF( info.NE.infot )
THEN
3322 IF( infot.NE.0 )
THEN
3323 WRITE( nout, fmt = 9999 )info, infot
3325 WRITE( nout, fmt = 9997 )info
3329 IF( srname.NE.srnamt )
THEN
3330 WRITE( nout, fmt = 9998 )srname, srnamt
3335 9999
FORMAT(
' ******* XERBLA WAS CALLED WITH INFO = ', i6,
' INSTEAD',
3336 $
' OF ', i2,
' *******' )
3337 9998
FORMAT(
' ******* XERBLA WAS CALLED WITH SRNAME = ', a6,
' INSTE',
3338 $
'AD OF ', a6,
' *******' )
3339 9997
FORMAT(
' ******* XERBLA WAS CALLED WITH INFO = ', i6,
subroutine xerbla(srname, info)
subroutine chkxer(srnamt, infot, nout, lerr, ok)
double precision function ddiff(x, y)
subroutine zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
ZGBMV
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
subroutine zgeru(m, n, alpha, x, incx, y, incy, a, lda)
ZGERU
subroutine zgerc(m, n, alpha, x, incx, y, incy, a, lda)
ZGERC
subroutine zhbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
ZHBMV
subroutine zhemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
ZHEMV
subroutine zher2(uplo, n, alpha, x, incx, y, incy, a, lda)
ZHER2
subroutine zher(uplo, n, alpha, x, incx, a, lda)
ZHER
subroutine zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
ZHPMV
subroutine zhpr2(uplo, n, alpha, x, incx, y, incy, ap)
ZHPR2
subroutine zhpr(uplo, n, alpha, x, incx, ap)
ZHPR
subroutine ztbmv(uplo, trans, diag, n, k, a, lda, x, incx)
ZTBMV
subroutine ztbsv(uplo, trans, diag, n, k, a, lda, x, incx)
ZTBSV
subroutine ztpmv(uplo, trans, diag, n, ap, x, incx)
ZTPMV
subroutine ztpsv(uplo, trans, diag, n, ap, x, incx)
ZTPSV
subroutine ztrmv(uplo, trans, diag, n, a, lda, x, incx)
ZTRMV
subroutine ztrsv(uplo, trans, diag, n, a, lda, x, incx)
ZTRSV
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)
subroutine zchke(isnum, srnamt, nout)
subroutine zregr1(trans, m, n, ly, kl, ku, alpha, a, lda, x, incx, beta, y, incy, ys)
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)