68 parameter ( nin = 5, nout = 6 )
70 parameter ( nsubs = 17 )
72 parameter ( zero = ( 0.0, 0.0 ), one = ( 1.0, 0.0 ) )
73 REAL RZERO, RHALF, RONE
74 parameter ( rzero = 0.0, rhalf = 0.5, rone = 1.0 )
76 parameter ( nmax = 65, incmax = 2 )
77 INTEGER NINMAX, NIDMAX, NKBMAX, NALMAX, NBEMAX
78 parameter ( ninmax = 7, nidmax = 9, nkbmax = 7,
79 $ nalmax = 7, nbemax = 7 )
82 INTEGER I, ISNUM, J, N, NALF, NBET, NIDIM, NINC, NKB,
84 LOGICAL FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,
85 $ tsterr, corder, rorder
90 COMPLEX A( nmax, nmax ), AA( nmax*nmax ),
91 $ alf( nalmax ), as( nmax*nmax ), bet( nbemax ),
92 $ x( nmax ), xs( nmax*incmax ),
93 $ xx( nmax*incmax ), y( nmax ),
94 $ ys( nmax*incmax ), yt( nmax ),
95 $ yy( nmax*incmax ), z( 2*nmax )
97 INTEGER IDIM( nidmax ), INC( ninmax ), KB( nkbmax )
98 LOGICAL LTEST( nsubs )
99 CHARACTER*12 SNAMES( nsubs )
108 INTRINSIC abs, max, min
114 COMMON /infoc/infot, noutc, ok
115 COMMON /srnamc/srnamt
117 DATA snames/
'cblas_cgemv ',
'cblas_cgbmv ',
118 $
'cblas_chemv ',
'cblas_chbmv ',
'cblas_chpmv ',
119 $
'cblas_ctrmv ',
'cblas_ctbmv ',
'cblas_ctpmv ',
120 $
'cblas_ctrsv ',
'cblas_ctbsv ',
'cblas_ctpsv ',
121 $
'cblas_cgerc ',
'cblas_cgeru ',
'cblas_cher ',
122 $
'cblas_chpr ',
'cblas_cher2 ',
'cblas_chpr2 '/
129 READ( nin, fmt = * )snaps
130 READ( nin, fmt = * )ntra
133 OPEN( ntra, file = snaps )
136 READ( nin, fmt = * )rewi
137 rewi = rewi.AND.trace
139 READ( nin, fmt = * )sfatal
141 READ( nin, fmt = * )tsterr
143 READ( nin, fmt = * )layout
145 READ( nin, fmt = * )thresh
150 READ( nin, fmt = * )nidim
151 IF( nidim.LT.1.OR.nidim.GT.nidmax )
THEN
152 WRITE( nout, fmt = 9997 )
'N', nidmax
155 READ( nin, fmt = * )( idim( i ), i = 1, nidim )
157 IF( idim( i ).LT.0.OR.idim( i ).GT.nmax )
THEN
158 WRITE( nout, fmt = 9996 )nmax
163 READ( nin, fmt = * )nkb
164 IF( nkb.LT.1.OR.nkb.GT.nkbmax )
THEN
165 WRITE( nout, fmt = 9997 )
'K', nkbmax
168 READ( nin, fmt = * )( kb( i ), i = 1, nkb )
170 IF( kb( i ).LT.0 )
THEN
171 WRITE( nout, fmt = 9995 )
176 READ( nin, fmt = * )ninc
177 IF( ninc.LT.1.OR.ninc.GT.ninmax )
THEN
178 WRITE( nout, fmt = 9997 )
'INCX AND INCY', ninmax
181 READ( nin, fmt = * )( inc( i ), i = 1, ninc )
183 IF( inc( i ).EQ.0.OR.abs( inc( i ) ).GT.incmax )
THEN
184 WRITE( nout, fmt = 9994 )incmax
189 READ( nin, fmt = * )nalf
190 IF( nalf.LT.1.OR.nalf.GT.nalmax )
THEN
191 WRITE( nout, fmt = 9997 )
'ALPHA', nalmax
194 READ( nin, fmt = * )( alf( i ), i = 1, nalf )
196 READ( nin, fmt = * )nbet
197 IF( nbet.LT.1.OR.nbet.GT.nbemax )
THEN
198 WRITE( nout, fmt = 9997 )
'BETA', nbemax
201 READ( nin, fmt = * )( bet( i ), i = 1, nbet )
205 WRITE( nout, fmt = 9993 )
206 WRITE( nout, fmt = 9992 )( idim( i ), i = 1, nidim )
207 WRITE( nout, fmt = 9991 )( kb( i ), i = 1, nkb )
208 WRITE( nout, fmt = 9990 )( inc( i ), i = 1, ninc )
209 WRITE( nout, fmt = 9989 )( alf( i ), i = 1, nalf )
210 WRITE( nout, fmt = 9988 )( bet( i ), i = 1, nbet )
211 IF( .NOT.tsterr )
THEN
212 WRITE( nout, fmt = * )
213 WRITE( nout, fmt = 9980 )
215 WRITE( nout, fmt = * )
216 WRITE( nout, fmt = 9999 )thresh
217 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( sdiff( 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 cmvch( trans, n, n, one, a, nmax, x, 1, zero, y, 1, yt, g,
282 $ yy, eps, err, fatal, nout, .true. )
283 same = lce( yy, yt, n )
284 IF( .NOT.same.OR.err.NE.rzero )
THEN
285 WRITE( nout, fmt = 9985 )trans, same, err
289 CALL cmvch( trans, n, n, one, a, nmax, x, -1, zero, y, -1, yt, g,
290 $ yy, eps, err, fatal, nout, .true. )
291 same = lce( 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 cc2chke( 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 cchk1( 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 cchk1( 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 cchk2( 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 cchk2( 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 cchk3( 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 cchk3( 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 cchk4( 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 cchk4( 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 cchk5( 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 cchk5( 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 cchk6( 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 cchk6( 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 )
423 10002
FORMAT(
' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
424 10001
FORMAT(
' ROW-MAJOR DATA LAYOUT IS TESTED' )
425 10000
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 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 cchk1( 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 )
477 parameter ( zero = ( 0.0, 0.0 ), half = ( 0.5, 0.0 ) )
479 parameter ( rzero = 0.0 )
482 INTEGER INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,
484 LOGICAL FATAL, REWI, TRACE
487 COMPLEX A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
488 $ as( nmax*nmax ), bet( nbet ), x( nmax ),
489 $ xs( nmax*incmax ), xx( nmax*incmax ),
490 $ y( nmax ), ys( nmax*incmax ), yt( nmax ),
493 INTEGER IDIM( nidim ), INC( ninc ), KB( nkb )
495 COMPLEX ALPHA, ALS, BETA, BLS, TRANSL
497 INTEGER I, IA, IB, IC, IKU, IM, IN, INCX, INCXS, INCY,
498 $ incys, ix, iy, kl, kls, ku, kus, laa, lda,
499 $ ldas, lx, ly, m, ml, ms, n, nargs, nc, nd, nk,
501 LOGICAL BANDED, FULL, NULL, RESET, SAME, TRAN
502 CHARACTER*1 TRANS, TRANSS
513 INTRINSIC abs, max, min
518 COMMON /infoc/infot, noutc, ok
522 full = sname( 9: 9 ).EQ.
'e'
523 banded = sname( 9: 9 ).EQ.
'b'
527 ELSE IF( banded )
THEN
541 $ m = max( n - nd, 0 )
543 $ m = min( n + nd, nmax )
553 kl = max( ku - 1, 0 )
570 null = n.LE.0.OR.m.LE.0
575 CALL cmake( sname( 8: 9 ),
' ',
' ', m, n, a, nmax, aa,
576 $ lda, kl, ku, reset, transl )
579 trans = ich( ic: ic )
580 IF (trans.EQ.
'N')
THEN
581 ctrans =
' CblasNoTrans'
582 ELSE IF (trans.EQ.
'T')
THEN
583 ctrans =
' CblasTrans'
585 ctrans =
'CblasConjTrans'
587 tran = trans.EQ.
'T'.OR.trans.EQ.
'C'
604 CALL cmake(
'ge',
' ',
' ', 1, nl, x, 1, xx,
605 $ abs( incx ), 0, nl - 1, reset, transl )
608 xx( 1 + abs( incx )*( nl/2 - 1 ) ) = zero
624 CALL cmake(
'ge',
' ',
' ', 1, ml, y, 1,
625 $ yy, abs( incy ), 0, ml - 1,
657 $
WRITE( ntra, fmt = 9994 )nc, sname,
658 $ ctrans, m, n, alpha, lda, incx, beta,
662 CALL ccgemv( iorder, trans, m, n,
663 $ alpha, aa, lda, xx, incx,
665 ELSE IF( banded )
THEN
667 $
WRITE( ntra, fmt = 9995 )nc, sname,
668 $ ctrans, m, n, kl, ku, alpha, lda,
672 CALL ccgbmv( iorder, trans, m, n, kl,
673 $ ku, alpha, aa, lda, xx,
674 $ incx, beta, yy, incy )
680 WRITE( nout, fmt = 9993 )
688 isame( 1 ) = trans.EQ.transs
692 isame( 4 ) = als.EQ.alpha
693 isame( 5 ) = lce( as, aa, laa )
694 isame( 6 ) = ldas.EQ.lda
695 isame( 7 ) = lce( xs, xx, lx )
696 isame( 8 ) = incxs.EQ.incx
697 isame( 9 ) = bls.EQ.beta
699 isame( 10 ) = lce( ys, yy, ly )
701 isame( 10 ) = lceres(
'ge',
' ', 1,
705 isame( 11 ) = incys.EQ.incy
706 ELSE IF( banded )
THEN
707 isame( 4 ) = kls.EQ.kl
708 isame( 5 ) = kus.EQ.ku
709 isame( 6 ) = als.EQ.alpha
710 isame( 7 ) = lce( as, aa, laa )
711 isame( 8 ) = ldas.EQ.lda
712 isame( 9 ) = lce( xs, xx, lx )
713 isame( 10 ) = incxs.EQ.incx
714 isame( 11 ) = bls.EQ.beta
716 isame( 12 ) = lce( ys, yy, ly )
718 isame( 12 ) = lceres(
'ge',
' ', 1,
722 isame( 13 ) = incys.EQ.incy
730 same = same.AND.isame( i )
731 IF( .NOT.isame( i ) )
732 $
WRITE( nout, fmt = 9998 )i
743 CALL cmvch( trans, m, n, alpha, a,
744 $ nmax, x, incx, beta, y,
745 $ incy, yt, g, yy, eps, err,
746 $ fatal, nout, .true. )
747 errmax = max( errmax, err )
777 IF( errmax.LT.thresh )
THEN
778 WRITE( nout, fmt = 9999 )sname, nc
780 WRITE( nout, fmt = 9997 )sname, nc, errmax
785 WRITE( nout, fmt = 9996 )sname
787 WRITE( nout, fmt = 9994 )nc, sname, ctrans, m, n, alpha, lda,
789 ELSE IF( banded )
THEN
790 WRITE( nout, fmt = 9995 )nc, sname, ctrans, m, n, kl, ku,
791 $ alpha, lda, incx, beta, incy
797 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
799 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
800 $
'ANGED INCORRECTLY *******' )
801 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
802 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
803 $
' - SUSPECT *******' )
804 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
805 9995
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', 4( i3,
',' ),
'(',
806 $ f4.1,
',', f4.1,
'), A,',/ 10x, i3,
', X,', i2,
',(',
807 $ f4.1,
',', f4.1,
'), Y,', i2,
') .' )
808 9994
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', 2( i3,
',' ),
'(',
809 $ f4.1,
',', f4.1,
'), A,',/ 10x, i3,
', X,', i2,
',(',
810 $ f4.1,
',', f4.1,
'), Y,', i2,
') .' )
811 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
817 SUBROUTINE cchk2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
818 $ fatal, nidim, idim, nkb, kb, nalf, alf, nbet,
819 $ bet, ninc, inc, nmax, incmax, a, aa, as, x, xx,
820 $ xs, y, yy, ys, yt, g, iorder )
832 parameter ( zero = ( 0.0, 0.0 ), half = ( 0.5, 0.0 ) )
834 parameter ( rzero = 0.0 )
837 INTEGER INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,
839 LOGICAL FATAL, REWI, TRACE
842 COMPLEX A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
843 $ as( nmax*nmax ), bet( nbet ), x( nmax ),
844 $ xs( nmax*incmax ), xx( nmax*incmax ),
845 $ y( nmax ), ys( nmax*incmax ), yt( nmax ),
848 INTEGER IDIM( nidim ), INC( ninc ), KB( nkb )
850 COMPLEX ALPHA, ALS, BETA, BLS, TRANSL
852 INTEGER I, IA, IB, IC, IK, IN, INCX, INCXS, INCY,
853 $ incys, ix, iy, k, ks, laa, lda, ldas, lx, ly,
854 $ n, nargs, nc, nk, ns
855 LOGICAL BANDED, FULL, NULL, PACKED, RESET, SAME
856 CHARACTER*1 UPLO, UPLOS
872 COMMON /infoc/infot, noutc, ok
876 full = sname( 9: 9 ).EQ.
'e'
877 banded = sname( 9: 9 ).EQ.
'b'
878 packed = sname( 9: 9 ).EQ.
'p'
882 ELSE IF( banded )
THEN
884 ELSE IF( packed )
THEN
918 laa = ( n*( n + 1 ) )/2
927 cuplo =
' CblasUpper'
929 cuplo =
' CblasLower'
935 CALL cmake( sname( 8: 9 ), uplo,
' ', n, n, a, nmax, aa,
936 $ lda, k, k, reset, transl )
945 CALL cmake(
'ge',
' ',
' ', 1, n, x, 1, xx,
946 $ abs( incx ), 0, n - 1, reset, transl )
949 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
965 CALL cmake(
'ge',
' ',
' ', 1, n, y, 1, yy,
966 $ abs( incy ), 0, n - 1, reset,
996 $
WRITE( ntra, fmt = 9993 )nc, sname,
997 $ cuplo, n, alpha, lda, incx, beta, incy
1000 CALL cchemv( iorder, uplo, n, alpha, aa,
1001 $ lda, xx, incx, beta, yy,
1003 ELSE IF( banded )
THEN
1005 $
WRITE( ntra, fmt = 9994 )nc, sname,
1006 $ cuplo, n, k, alpha, lda, incx, beta,
1010 CALL cchbmv( iorder, uplo, n, k, alpha,
1011 $ aa, lda, xx, incx, beta,
1013 ELSE IF( packed )
THEN
1015 $
WRITE( ntra, fmt = 9995 )nc, sname,
1016 $ cuplo, n, alpha, incx, beta, incy
1019 CALL cchpmv( iorder, uplo, n, alpha, aa,
1020 $ xx, incx, beta, yy, incy )
1026 WRITE( nout, fmt = 9992 )
1033 isame( 1 ) = uplo.EQ.uplos
1034 isame( 2 ) = ns.EQ.n
1036 isame( 3 ) = als.EQ.alpha
1037 isame( 4 ) = lce( as, aa, laa )
1038 isame( 5 ) = ldas.EQ.lda
1039 isame( 6 ) = lce( xs, xx, lx )
1040 isame( 7 ) = incxs.EQ.incx
1041 isame( 8 ) = bls.EQ.beta
1043 isame( 9 ) = lce( ys, yy, ly )
1045 isame( 9 ) = lceres(
'ge',
' ', 1, n,
1046 $ ys, yy, abs( incy ) )
1048 isame( 10 ) = incys.EQ.incy
1049 ELSE IF( banded )
THEN
1050 isame( 3 ) = ks.EQ.k
1051 isame( 4 ) = als.EQ.alpha
1052 isame( 5 ) = lce( as, aa, laa )
1053 isame( 6 ) = ldas.EQ.lda
1054 isame( 7 ) = lce( xs, xx, lx )
1055 isame( 8 ) = incxs.EQ.incx
1056 isame( 9 ) = bls.EQ.beta
1058 isame( 10 ) = lce( ys, yy, ly )
1060 isame( 10 ) = lceres(
'ge',
' ', 1, n,
1061 $ ys, yy, abs( incy ) )
1063 isame( 11 ) = incys.EQ.incy
1064 ELSE IF( packed )
THEN
1065 isame( 3 ) = als.EQ.alpha
1066 isame( 4 ) = lce( as, aa, laa )
1067 isame( 5 ) = lce( xs, xx, lx )
1068 isame( 6 ) = incxs.EQ.incx
1069 isame( 7 ) = bls.EQ.beta
1071 isame( 8 ) = lce( ys, yy, ly )
1073 isame( 8 ) = lceres(
'ge',
' ', 1, n,
1074 $ ys, yy, abs( incy ) )
1076 isame( 9 ) = incys.EQ.incy
1084 same = same.AND.isame( i )
1085 IF( .NOT.isame( i ) )
1086 $
WRITE( nout, fmt = 9998 )i
1097 CALL cmvch(
'N', n, n, alpha, a, nmax, x,
1098 $ incx, beta, y, incy, yt, g,
1099 $ yy, eps, err, fatal, nout,
1101 errmax = max( errmax, err )
1127 IF( errmax.LT.thresh )
THEN
1128 WRITE( nout, fmt = 9999 )sname, nc
1130 WRITE( nout, fmt = 9997 )sname, nc, errmax
1135 WRITE( nout, fmt = 9996 )sname
1137 WRITE( nout, fmt = 9993 )nc, sname, cuplo, n, alpha, lda, incx,
1139 ELSE IF( banded )
THEN
1140 WRITE( nout, fmt = 9994 )nc, sname, cuplo, n, k, alpha, lda,
1142 ELSE IF( packed )
THEN
1143 WRITE( nout, fmt = 9995 )nc, sname, cuplo, n, alpha, incx,
1150 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
1152 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1153 $
'ANGED INCORRECTLY *******' )
1154 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1155 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1156 $
' - SUSPECT *******' )
1157 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
1158 9995
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', i3,
',(', f4.1,
',',
1159 $ f4.1,
'), AP, X,',/ 10x, i2,
',(', f4.1,
',', f4.1,
1160 $
'), Y,', i2,
') .' )
1161 9994
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', 2( i3,
',' ),
'(',
1162 $ f4.1,
',', f4.1,
'), A,', i3,
', X,',/ 10x, i2,
',(',
1163 $ f4.1,
',', f4.1,
'), Y,', i2,
') .' )
1164 9993
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', i3,
',(', f4.1,
',',
1165 $ f4.1,
'), A,', i3,
', X,',/ 10x, i2,
',(', f4.1,
',',
1166 $ f4.1,
'), ',
'Y,', i2,
') .' )
1167 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1173 SUBROUTINE cchk3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1174 $ fatal, nidim, idim, nkb, kb, ninc, inc, nmax,
1175 $ incmax, a, aa, as, x, xx, xs, xt, g, z, iorder )
1186 COMPLEX ZERO, HALF, ONE
1187 parameter ( zero = ( 0.0, 0.0 ), half = ( 0.5, 0.0 ),
1188 $ one = ( 1.0, 0.0 ) )
1190 parameter ( rzero = 0.0 )
1193 INTEGER INCMAX, NIDIM, NINC, NKB, NMAX, NOUT, NTRA,
1195 LOGICAL FATAL, REWI, TRACE
1198 COMPLEX A( nmax, nmax ), AA( nmax*nmax ),
1199 $ as( nmax*nmax ), x( nmax ), xs( nmax*incmax ),
1200 $ xt( nmax ), xx( nmax*incmax ), z( nmax )
1202 INTEGER IDIM( nidim ), INC( ninc ), KB( nkb )
1206 INTEGER I, ICD, ICT, ICU, IK, IN, INCX, INCXS, IX, K,
1207 $ ks, laa, lda, ldas, lx, n, nargs, nc, nk, ns
1208 LOGICAL BANDED, FULL, NULL, PACKED, RESET, SAME
1209 CHARACTER*1 DIAG, DIAGS, TRANS, TRANSS, UPLO, UPLOS
1210 CHARACTER*14 CUPLO,CTRANS,CDIAG
1211 CHARACTER*2 ICHD, ICHU
1217 EXTERNAL lce, lceres
1219 EXTERNAL cmake,
cmvch, cctbmv, cctbsv, cctpmv,
1220 $ cctpsv, cctrmv, cctrsv
1224 INTEGER INFOT, NOUTC
1227 COMMON /infoc/infot, noutc, ok
1229 DATA ichu/
'UL'/, icht/
'NTC'/, ichd/
'UN'/
1231 full = sname( 9: 9 ).EQ.
'r'
1232 banded = sname( 9: 9 ).EQ.
'b'
1233 packed = sname( 9: 9 ).EQ.
'p'
1237 ELSE IF( banded )
THEN
1239 ELSE IF( packed )
THEN
1251 DO 110 in = 1, nidim
1277 laa = ( n*( n + 1 ) )/2
1284 uplo = ichu( icu: icu )
1285 IF (uplo.EQ.
'U')
THEN
1286 cuplo =
' CblasUpper'
1288 cuplo =
' CblasLower'
1292 trans = icht( ict: ict )
1293 IF (trans.EQ.
'N')
THEN
1294 ctrans =
' CblasNoTrans'
1295 ELSE IF (trans.EQ.
'T')
THEN
1296 ctrans =
' CblasTrans'
1298 ctrans =
'CblasConjTrans'
1302 diag = ichd( icd: icd )
1303 IF (diag.EQ.
'N')
THEN
1304 cdiag =
' CblasNonUnit'
1306 cdiag =
' CblasUnit'
1312 CALL cmake( sname( 8: 9 ), uplo, diag, n, n, a,
1313 $ nmax, aa, lda, k, k, reset, transl )
1322 CALL cmake(
'ge',
' ',
' ', 1, n, x, 1, xx,
1323 $ abs( incx ), 0, n - 1, reset,
1327 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
1350 IF( sname( 10: 11 ).EQ.
'mv' )
THEN
1353 $
WRITE( ntra, fmt = 9993 )nc, sname,
1354 $ cuplo, ctrans, cdiag, n, lda, incx
1357 CALL cctrmv( iorder, uplo, trans, diag,
1358 $ n, aa, lda, xx, incx )
1359 ELSE IF( banded )
THEN
1361 $
WRITE( ntra, fmt = 9994 )nc, sname,
1362 $ cuplo, ctrans, cdiag, n, k, lda, incx
1365 CALL cctbmv( iorder, uplo, trans, diag,
1366 $ n, k, aa, lda, xx, incx )
1367 ELSE IF( packed )
THEN
1369 $
WRITE( ntra, fmt = 9995 )nc, sname,
1370 $ cuplo, ctrans, cdiag, n, incx
1373 CALL cctpmv( iorder, uplo, trans, diag,
1376 ELSE IF( sname( 10: 11 ).EQ.
'sv' )
THEN
1379 $
WRITE( ntra, fmt = 9993 )nc, sname,
1380 $ cuplo, ctrans, cdiag, n, lda, incx
1383 CALL cctrsv( iorder, uplo, trans, diag,
1384 $ n, aa, lda, xx, incx )
1385 ELSE IF( banded )
THEN
1387 $
WRITE( ntra, fmt = 9994 )nc, sname,
1388 $ cuplo, ctrans, cdiag, n, k, lda, incx
1391 CALL cctbsv( iorder, uplo, trans, diag,
1392 $ n, k, aa, lda, xx, incx )
1393 ELSE IF( packed )
THEN
1395 $
WRITE( ntra, fmt = 9995 )nc, sname,
1396 $ cuplo, ctrans, cdiag, n, incx
1399 CALL cctpsv( iorder, uplo, trans, diag,
1407 WRITE( nout, fmt = 9992 )
1414 isame( 1 ) = uplo.EQ.uplos
1415 isame( 2 ) = trans.EQ.transs
1416 isame( 3 ) = diag.EQ.diags
1417 isame( 4 ) = ns.EQ.n
1419 isame( 5 ) = lce( as, aa, laa )
1420 isame( 6 ) = ldas.EQ.lda
1422 isame( 7 ) = lce( xs, xx, lx )
1424 isame( 7 ) = lceres(
'ge',
' ', 1, n, xs,
1427 isame( 8 ) = incxs.EQ.incx
1428 ELSE IF( banded )
THEN
1429 isame( 5 ) = ks.EQ.k
1430 isame( 6 ) = lce( as, aa, laa )
1431 isame( 7 ) = ldas.EQ.lda
1433 isame( 8 ) = lce( xs, xx, lx )
1435 isame( 8 ) = lceres(
'ge',
' ', 1, n, xs,
1438 isame( 9 ) = incxs.EQ.incx
1439 ELSE IF( packed )
THEN
1440 isame( 5 ) = lce( as, aa, laa )
1442 isame( 6 ) = lce( xs, xx, lx )
1444 isame( 6 ) = lceres(
'ge',
' ', 1, n, xs,
1447 isame( 7 ) = incxs.EQ.incx
1455 same = same.AND.isame( i )
1456 IF( .NOT.isame( i ) )
1457 $
WRITE( nout, fmt = 9998 )i
1465 IF( sname( 10: 11 ).EQ.
'mv' )
THEN
1469 CALL cmvch( trans, n, n, one, a, nmax, x,
1470 $ incx, zero, z, incx, xt, g,
1471 $ xx, eps, err, fatal, nout,
1473 ELSE IF( sname( 10: 11 ).EQ.
'sv' )
THEN
1478 z( i ) = xx( 1 + ( i - 1 )*
1480 xx( 1 + ( i - 1 )*abs( incx ) )
1483 CALL cmvch( trans, n, n, one, a, nmax, z,
1484 $ incx, zero, x, incx, xt, g,
1485 $ xx, eps, err, fatal, nout,
1488 errmax = max( errmax, err )
1511 IF( errmax.LT.thresh )
THEN
1512 WRITE( nout, fmt = 9999 )sname, nc
1514 WRITE( nout, fmt = 9997 )sname, nc, errmax
1519 WRITE( nout, fmt = 9996 )sname
1521 WRITE( nout, fmt = 9993 )nc, sname, cuplo, ctrans, cdiag, n,
1523 ELSE IF( banded )
THEN
1524 WRITE( nout, fmt = 9994 )nc, sname, cuplo, ctrans, cdiag, n, k,
1526 ELSE IF( packed )
THEN
1527 WRITE( nout, fmt = 9995 )nc, sname, cuplo, ctrans, cdiag, n,
1534 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
1536 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1537 $
'ANGED INCORRECTLY *******' )
1538 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1539 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1540 $
' - SUSPECT *******' )
1541 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
1542 9995
FORMAT(1x, i6,
': ',a12,
'(', 3( a14,
',' ),/ 10x, i3,
', AP, ',
1544 9994
FORMAT(1x, i6,
': ',a12,
'(', 3( a14,
',' ),/ 10x, 2( i3,
',' ),
1545 $
' A,', i3,
', X,', i2,
') .' )
1546 9993
FORMAT( 1x, i6,
': ',a12,
'(', 3( a14,
',' ),/ 10x, i3,
', A,',
1547 $ i3,
', X,', i2,
') .' )
1548 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1554 SUBROUTINE cchk4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1555 $ fatal, nidim, idim, nalf, alf, ninc, inc, nmax,
1556 $ incmax, a, aa, as, x, xx, xs, y, yy, ys, yt, g,
1568 COMPLEX ZERO, HALF, ONE
1569 parameter ( zero = ( 0.0, 0.0 ), half = ( 0.5, 0.0 ),
1570 $ one = ( 1.0, 0.0 ) )
1572 parameter ( rzero = 0.0 )
1575 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA,
1577 LOGICAL FATAL, REWI, TRACE
1580 COMPLEX A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
1581 $ as( nmax*nmax ), x( nmax ), xs( nmax*incmax ),
1582 $ xx( nmax*incmax ), y( nmax ),
1583 $ ys( nmax*incmax ), yt( nmax ),
1584 $ yy( nmax*incmax ), z( nmax )
1586 INTEGER IDIM( nidim ), INC( ninc )
1588 COMPLEX ALPHA, ALS, TRANSL
1590 INTEGER I, IA, IM, IN, INCX, INCXS, INCY, INCYS, IX,
1591 $ iy, j, laa, lda, ldas, lx, ly, m, ms, n, nargs,
1593 LOGICAL CONJ, NULL, RESET, SAME
1599 EXTERNAL lce, lceres
1603 INTRINSIC abs, conjg, max, min
1605 INTEGER INFOT, NOUTC
1608 COMMON /infoc/infot, noutc, ok
1610 conj = sname( 11: 11 ).EQ.
'c'
1618 DO 120 in = 1, nidim
1624 $ m = max( n - nd, 0 )
1626 $ m = min( n + nd, nmax )
1636 null = n.LE.0.OR.m.LE.0
1645 CALL cmake(
'ge',
' ',
' ', 1, m, x, 1, xx, abs( incx ),
1646 $ 0, m - 1, reset, transl )
1649 xx( 1 + abs( incx )*( m/2 - 1 ) ) = zero
1659 CALL cmake(
'ge',
' ',
' ', 1, n, y, 1, yy,
1660 $ abs( incy ), 0, n - 1, reset, transl )
1663 yy( 1 + abs( incy )*( n/2 - 1 ) ) = zero
1672 CALL cmake(sname( 8: 9 ),
' ',
' ', m, n, a, nmax,
1673 $ aa, lda, m - 1, n - 1, reset, transl )
1698 $
WRITE( ntra, fmt = 9994 )nc, sname, m, n,
1699 $ alpha, incx, incy, lda
1703 CALL ccgerc( iorder, m, n, alpha, xx, incx,
1704 $ yy, incy, aa, lda )
1708 CALL ccgeru( iorder, m, n, alpha, xx, incx,
1709 $ yy, incy, aa, lda )
1715 WRITE( nout, fmt = 9993 )
1722 isame( 1 ) = ms.EQ.m
1723 isame( 2 ) = ns.EQ.n
1724 isame( 3 ) = als.EQ.alpha
1725 isame( 4 ) = lce( xs, xx, lx )
1726 isame( 5 ) = incxs.EQ.incx
1727 isame( 6 ) = lce( ys, yy, ly )
1728 isame( 7 ) = incys.EQ.incy
1730 isame( 8 ) = lce( as, aa, laa )
1732 isame( 8 ) = lceres(
'ge',
' ', m, n, as, aa,
1735 isame( 9 ) = ldas.EQ.lda
1741 same = same.AND.isame( i )
1742 IF( .NOT.isame( i ) )
1743 $
WRITE( nout, fmt = 9998 )i
1760 z( i ) = x( m - i + 1 )
1767 w( 1 ) = y( n - j + 1 )
1770 $ w( 1 ) = conjg( w( 1 ) )
1771 CALL cmvch(
'N', m, 1, alpha, z, nmax, w, 1,
1772 $ one, a( 1, j ), 1, yt, g,
1773 $ aa( 1 + ( j - 1 )*lda ), eps,
1774 $ err, fatal, nout, .true. )
1775 errmax = max( errmax, err )
1797 IF( errmax.LT.thresh )
THEN
1798 WRITE( nout, fmt = 9999 )sname, nc
1800 WRITE( nout, fmt = 9997 )sname, nc, errmax
1805 WRITE( nout, fmt = 9995 )j
1808 WRITE( nout, fmt = 9996 )sname
1809 WRITE( nout, fmt = 9994 )nc, sname, m, n, alpha, incx, incy, lda
1814 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
1816 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1817 $
'ANGED INCORRECTLY *******' )
1818 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1819 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1820 $
' - SUSPECT *******' )
1821 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
1822 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
1823 9994
FORMAT(1x, i6,
': ',a12,
'(', 2( i3,
',' ),
'(', f4.1,
',', f4.1,
1824 $
'), X,', i2,
', Y,', i2,
', A,', i3,
') .' )
1825 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1831 SUBROUTINE cchk5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1832 $ fatal, nidim, idim, nalf, alf, ninc, inc, nmax,
1833 $ incmax, a, aa, as, x, xx, xs, y, yy, ys, yt, g,
1845 COMPLEX ZERO, HALF, ONE
1846 parameter ( zero = ( 0.0, 0.0 ), half = ( 0.5, 0.0 ),
1847 $ one = ( 1.0, 0.0 ) )
1849 parameter ( rzero = 0.0 )
1852 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA,
1854 LOGICAL FATAL, REWI, TRACE
1857 COMPLEX A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
1858 $ as( nmax*nmax ), x( nmax ), xs( nmax*incmax ),
1859 $ xx( nmax*incmax ), y( nmax ),
1860 $ ys( nmax*incmax ), yt( nmax ),
1861 $ yy( nmax*incmax ), z( nmax )
1863 INTEGER IDIM( nidim ), INC( ninc )
1865 COMPLEX ALPHA, TRANSL
1866 REAL ERR, ERRMAX, RALPHA, RALS
1867 INTEGER I, IA, IC, IN, INCX, INCXS, IX, J, JA, JJ, LAA,
1868 $ lda, ldas, lj, lx, n, nargs, nc, ns
1869 LOGICAL FULL, NULL, PACKED, RESET, SAME, UPPER
1870 CHARACTER*1 UPLO, UPLOS
1878 EXTERNAL lce, lceres
1882 INTRINSIC abs, cmplx, conjg, max, real
1884 INTEGER INFOT, NOUTC
1887 COMMON /infoc/infot, noutc, ok
1891 full = sname( 9: 9 ).EQ.
'e'
1892 packed = sname( 9: 9 ).EQ.
'p'
1896 ELSE IF( packed )
THEN
1904 DO 100 in = 1, nidim
1914 laa = ( n*( n + 1 ) )/2
1920 uplo = ich( ic: ic )
1921 IF (uplo.EQ.
'U')
THEN
1922 cuplo =
' CblasUpper'
1924 cuplo =
' CblasLower'
1935 CALL cmake(
'ge',
' ',
' ', 1, n, x, 1, xx, abs( incx ),
1936 $ 0, n - 1, reset, transl )
1939 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
1943 ralpha =
REAL( ALF( IA ) )
1944 alpha = cmplx( ralpha, rzero )
1945 null = n.LE.0.OR.ralpha.EQ.rzero
1950 CALL cmake( sname( 8: 9 ), uplo,
' ', n, n, a, nmax,
1951 $ aa, lda, n - 1, n - 1, reset, transl )
1973 $
WRITE( ntra, fmt = 9993 )nc, sname, cuplo, n,
1977 CALL ccher( iorder, uplo, n, ralpha, xx,
1979 ELSE IF( packed )
THEN
1981 $
WRITE( ntra, fmt = 9994 )nc, sname, cuplo, n,
1985 CALL cchpr( iorder, uplo, n, ralpha,
1992 WRITE( nout, fmt = 9992 )
1999 isame( 1 ) = uplo.EQ.uplos
2000 isame( 2 ) = ns.EQ.n
2001 isame( 3 ) = rals.EQ.ralpha
2002 isame( 4 ) = lce( xs, xx, lx )
2003 isame( 5 ) = incxs.EQ.incx
2005 isame( 6 ) = lce( as, aa, laa )
2007 isame( 6 ) = lceres( sname( 8: 9 ), uplo, n, n, as,
2010 IF( .NOT.packed )
THEN
2011 isame( 7 ) = ldas.EQ.lda
2018 same = same.AND.isame( i )
2019 IF( .NOT.isame( i ) )
2020 $
WRITE( nout, fmt = 9998 )i
2037 z( i ) = x( n - i + 1 )
2042 w( 1 ) = conjg( z( j ) )
2050 CALL cmvch(
'N', lj, 1, alpha, z( jj ), lj, w,
2051 $ 1, one, a( jj, j ), 1, yt, g,
2052 $ aa( ja ), eps, err, fatal, nout,
2063 errmax = max( errmax, err )
2084 IF( errmax.LT.thresh )
THEN
2085 WRITE( nout, fmt = 9999 )sname, nc
2087 WRITE( nout, fmt = 9997 )sname, nc, errmax
2092 WRITE( nout, fmt = 9995 )j
2095 WRITE( nout, fmt = 9996 )sname
2097 WRITE( nout, fmt = 9993 )nc, sname, cuplo, n, ralpha, incx, lda
2098 ELSE IF( packed )
THEN
2099 WRITE( nout, fmt = 9994 )nc, sname, cuplo, n, ralpha, incx
2105 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
2107 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2108 $
'ANGED INCORRECTLY *******' )
2109 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
2110 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
2111 $
' - SUSPECT *******' )
2112 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
2113 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2114 9994
FORMAT(1x, i6,
': ',a12,
'(', a14,
',', i3,
',', f4.1,
', X,',
2116 9993
FORMAT(1x, i6,
': ',a12,
'(', a14,
',', i3,
',', f4.1,
', X,',
2117 $ i2,
', A,', i3,
') .' )
2118 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2124 SUBROUTINE cchk6( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
2125 $ fatal, nidim, idim, nalf, alf, ninc, inc, nmax,
2126 $ incmax, a, aa, as, x, xx, xs, y, yy, ys, yt, g,
2138 COMPLEX ZERO, HALF, ONE
2139 parameter ( zero = ( 0.0, 0.0 ), half = ( 0.5, 0.0 ),
2140 $ one = ( 1.0, 0.0 ) )
2142 parameter ( rzero = 0.0 )
2145 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA,
2147 LOGICAL FATAL, REWI, TRACE
2150 COMPLEX A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
2151 $ as( nmax*nmax ), x( nmax ), xs( nmax*incmax ),
2152 $ xx( nmax*incmax ), y( nmax ),
2153 $ ys( nmax*incmax ), yt( nmax ),
2154 $ yy( nmax*incmax ), z( nmax, 2 )
2156 INTEGER IDIM( nidim ), INC( ninc )
2158 COMPLEX ALPHA, ALS, TRANSL
2160 INTEGER I, IA, IC, IN, INCX, INCXS, INCY, INCYS, IX,
2161 $ iy, j, ja, jj, laa, lda, ldas, lj, lx, ly, n,
2163 LOGICAL FULL, NULL, PACKED, RESET, SAME, UPPER
2164 CHARACTER*1 UPLO, UPLOS
2172 EXTERNAL lce, lceres
2176 INTRINSIC abs, conjg, max
2178 INTEGER INFOT, NOUTC
2181 COMMON /infoc/infot, noutc, ok
2185 full = sname( 9: 9 ).EQ.
'e'
2186 packed = sname( 9: 9 ).EQ.
'p'
2190 ELSE IF( packed )
THEN
2198 DO 140 in = 1, nidim
2208 laa = ( n*( n + 1 ) )/2
2214 uplo = ich( ic: ic )
2215 IF (uplo.EQ.
'U')
THEN
2216 cuplo =
' CblasUpper'
2218 cuplo =
' CblasLower'
2229 CALL cmake(
'ge',
' ',
' ', 1, n, x, 1, xx, abs( incx ),
2230 $ 0, n - 1, reset, transl )
2233 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
2243 CALL cmake(
'ge',
' ',
' ', 1, n, y, 1, yy,
2244 $ abs( incy ), 0, n - 1, reset, transl )
2247 yy( 1 + abs( incy )*( n/2 - 1 ) ) = zero
2252 null = n.LE.0.OR.alpha.EQ.zero
2257 CALL cmake( sname( 8: 9 ), uplo,
' ', n, n, a,
2258 $ nmax, aa, lda, n - 1, n - 1, reset,
2285 $
WRITE( ntra, fmt = 9993 )nc, sname, cuplo, n,
2286 $ alpha, incx, incy, lda
2289 CALL ccher2( iorder, uplo, n, alpha, xx, incx,
2290 $ yy, incy, aa, lda )
2291 ELSE IF( packed )
THEN
2293 $
WRITE( ntra, fmt = 9994 )nc, sname, cuplo, n,
2297 CALL cchpr2( iorder, uplo, n, alpha, xx, incx,
2304 WRITE( nout, fmt = 9992 )
2311 isame( 1 ) = uplo.EQ.uplos
2312 isame( 2 ) = ns.EQ.n
2313 isame( 3 ) = als.EQ.alpha
2314 isame( 4 ) = lce( xs, xx, lx )
2315 isame( 5 ) = incxs.EQ.incx
2316 isame( 6 ) = lce( ys, yy, ly )
2317 isame( 7 ) = incys.EQ.incy
2319 isame( 8 ) = lce( as, aa, laa )
2321 isame( 8 ) = lceres( sname( 8: 9 ), uplo, n, n,
2324 IF( .NOT.packed )
THEN
2325 isame( 9 ) = ldas.EQ.lda
2332 same = same.AND.isame( i )
2333 IF( .NOT.isame( i ) )
2334 $
WRITE( nout, fmt = 9998 )i
2351 z( i, 1 ) = x( n - i + 1 )
2360 z( i, 2 ) = y( n - i + 1 )
2365 w( 1 ) = alpha*conjg( z( j, 2 ) )
2366 w( 2 ) = conjg( alpha )*conjg( z( j, 1 ) )
2374 CALL cmvch(
'N', lj, 2, one, z( jj, 1 ),
2375 $ nmax, w, 1, one, a( jj, j ), 1,
2376 $ yt, g, aa( ja ), eps, err, fatal,
2387 errmax = max( errmax, err )
2410 IF( errmax.LT.thresh )
THEN
2411 WRITE( nout, fmt = 9999 )sname, nc
2413 WRITE( nout, fmt = 9997 )sname, nc, errmax
2418 WRITE( nout, fmt = 9995 )j
2421 WRITE( nout, fmt = 9996 )sname
2423 WRITE( nout, fmt = 9993 )nc, sname, cuplo, n, alpha, incx,
2425 ELSE IF( packed )
THEN
2426 WRITE( nout, fmt = 9994 )nc, sname, cuplo, n, alpha, incx, incy
2432 9999
FORMAT(
' ',a12,
' PASSED THE COMPUTATIONAL TESTS (', i6,
' CALL',
2434 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2435 $
'ANGED INCORRECTLY *******' )
2436 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
2437 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
2438 $
' - SUSPECT *******' )
2439 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
2440 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2441 9994
FORMAT(1x, i6,
': ',a12,
'(', a14,
',', i3,
',(', f4.1,
',',
2442 $ f4.1,
'), X,', i2,
', Y,', i2,
', AP) .' )
2443 9993
FORMAT(1x, i6,
': ',a12,
'(', a14,
',', i3,
',(', f4.1,
',',
2444 $ f4.1,
'), X,', i2,
', Y,', i2,
', A,', i3,
') .' )
2445 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2451 SUBROUTINE cmvch( TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y,
2452 $ incy, yt, g, yy, eps, err, fatal, nout, mv )
2464 parameter ( zero = ( 0.0, 0.0 ) )
2466 parameter ( rzero = 0.0, rone = 1.0 )
2470 INTEGER INCX, INCY, M, N, NMAX, NOUT
2474 COMPLEX A( nmax, * ), X( * ), Y( * ), YT( * ), YY( * )
2479 INTEGER I, INCXL, INCYL, IY, J, JX, KX, KY, ML, NL
2482 INTRINSIC abs, aimag, conjg, max,
REAL, SQRT
2486 abs1( c ) = abs(
REAL( C ) ) + abs( AIMAG( c ) )
2489 ctran = trans.EQ.
'C'
2490 IF( tran.OR.ctran )
THEN
2522 yt( iy ) = yt( iy ) + a( j, i )*x( jx )
2523 g( iy ) = g( iy ) + abs1( a( j, i ) )*abs1( x( jx ) )
2526 ELSE IF( ctran )
THEN
2528 yt( iy ) = yt( iy ) + conjg( a( j, i ) )*x( jx )
2529 g( iy ) = g( iy ) + abs1( a( j, i ) )*abs1( x( jx ) )
2534 yt( iy ) = yt( iy ) + a( i, j )*x( jx )
2535 g( iy ) = g( iy ) + abs1( a( i, j ) )*abs1( x( jx ) )
2539 yt( iy ) = alpha*yt( iy ) + beta*y( iy )
2540 g( iy ) = abs1( alpha )*g( iy ) + abs1( beta )*abs1( y( iy ) )
2548 erri = abs( yt( i ) - yy( 1 + ( i - 1 )*abs( incy ) ) )/eps
2549 IF( g( i ).NE.rzero )
2550 $ erri = erri/g( i )
2551 err = max( err, erri )
2552 IF( err*sqrt( eps ).GE.rone )
2561 WRITE( nout, fmt = 9999 )
2564 WRITE( nout, fmt = 9998 )i, yt( i ),
2565 $ yy( 1 + ( i - 1 )*abs( incy ) )
2567 WRITE( nout, fmt = 9998 )i,
2568 $ yy( 1 + ( i - 1 )*abs( incy ) ), yt( i )
2575 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
2576 $
'F ACCURATE *******', /
' EXPECTED RE',
2577 $
'SULT COMPUTED RESULT' )
2578 9998
FORMAT( 1x, i7, 2(
' (', g15.6,
',', g15.6,
')' ) )
2583 LOGICAL FUNCTION lce( RI, RJ, LR )
2596 COMPLEX RI( * ), RJ( * )
2601 IF( ri( i ).NE.rj( i ) )
2613 LOGICAL FUNCTION lceres( TYPE, UPLO, M, N, AA, AS, LDA )
2630 COMPLEX AA( lda, * ), AS( lda, * )
2632 INTEGER I, IBEG, IEND, J
2636 IF( type.EQ.
'ge' )
THEN
2638 DO 10 i = m + 1, lda
2639 IF( aa( i, j ).NE.as( i, j ) )
2643 ELSE IF( type.EQ.
'he' )
THEN
2652 DO 30 i = 1, ibeg - 1
2653 IF( aa( i, j ).NE.as( i, j ) )
2656 DO 40 i = iend + 1, lda
2657 IF( aa( i, j ).NE.as( i, j ) )
2673 COMPLEX FUNCTION cbeg( RESET )
2687 INTEGER I, IC, J, MI, MJ
2689 SAVE i, ic, j, mi, mj
2713 i = i - 1000*( i/1000 )
2714 j = j - 1000*( j/1000 )
2719 cbeg = cmplx( ( i - 500 )/1001.0, ( j - 500 )/1001.0 )
2725 REAL FUNCTION sdiff( X, Y )
2741 SUBROUTINE cmake( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL,
2742 $ ku, reset, transl )
2759 parameter ( zero = ( 0.0, 0.0 ), one = ( 1.0, 0.0 ) )
2761 parameter ( rogue = ( -1.0e10, 1.0e10 ) )
2763 parameter ( rzero = 0.0 )
2765 parameter ( rrogue = -1.0e10 )
2768 INTEGER KL, KU, LDA, M, N, NMAX
2770 CHARACTER*1 DIAG, UPLO
2773 COMPLEX A( nmax, * ), AA( * )
2775 INTEGER I, I1, I2, I3, IBEG, IEND, IOFF, J, JJ, KK
2776 LOGICAL GEN, LOWER, SYM, TRI, UNIT, UPPER
2781 INTRINSIC cmplx, conjg, max, min, real
2783 gen =
TYPE( 1: 1 ).EQ.
'g'
2784 sym =
TYPE( 1: 1 ).EQ.
'h'
2785 tri =
TYPE( 1: 1 ).EQ.
't'
2786 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2787 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2788 unit = tri.AND.diag.EQ.
'U'
2794 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2796 IF( ( i.LE.j.AND.j - i.LE.ku ).OR.
2797 $ ( i.GE.j.AND.i - j.LE.kl ) )
THEN
2798 a( i, j ) = cbeg( reset ) + transl
2804 a( j, i ) = conjg( a( i, j ) )
2812 $ a( j, j ) = cmplx(
REAL( A( J, J ) ), RZERO )
2814 $ a( j, j ) = a( j, j ) + one
2821 IF( type.EQ.
'ge' )
THEN
2824 aa( i + ( j - 1 )*lda ) = a( i, j )
2826 DO 40 i = m + 1, lda
2827 aa( i + ( j - 1 )*lda ) = rogue
2830 ELSE IF( type.EQ.
'gb' )
THEN
2832 DO 60 i1 = 1, ku + 1 - j
2833 aa( i1 + ( j - 1 )*lda ) = rogue
2835 DO 70 i2 = i1, min( kl + ku + 1, ku + 1 + m - j )
2836 aa( i2 + ( j - 1 )*lda ) = a( i2 + j - ku - 1, j )
2839 aa( i3 + ( j - 1 )*lda ) = rogue
2842 ELSE IF( type.EQ.
'he'.OR.type.EQ.
'tr' )
THEN
2859 DO 100 i = 1, ibeg - 1
2860 aa( i + ( j - 1 )*lda ) = rogue
2862 DO 110 i = ibeg, iend
2863 aa( i + ( j - 1 )*lda ) = a( i, j )
2865 DO 120 i = iend + 1, lda
2866 aa( i + ( j - 1 )*lda ) = rogue
2869 jj = j + ( j - 1 )*lda
2870 aa( jj ) = cmplx(
REAL( AA( JJ ) ), RROGUE )
2873 ELSE IF( type.EQ.
'hb'.OR.type.EQ.
'tb' )
THEN
2877 ibeg = max( 1, kl + 2 - j )
2890 iend = min( kl + 1, 1 + m - j )
2892 DO 140 i = 1, ibeg - 1
2893 aa( i + ( j - 1 )*lda ) = rogue
2895 DO 150 i = ibeg, iend
2896 aa( i + ( j - 1 )*lda ) = a( i + j - kk, j )
2898 DO 160 i = iend + 1, lda
2899 aa( i + ( j - 1 )*lda ) = rogue
2902 jj = kk + ( j - 1 )*lda
2903 aa( jj ) = cmplx(
REAL( AA( JJ ) ), RROGUE )
2906 ELSE IF( type.EQ.
'hp'.OR.type.EQ.
'tp' )
THEN
2916 DO 180 i = ibeg, iend
2918 aa( ioff ) = a( i, j )
2921 $ aa( ioff ) = rogue
2923 $ aa( ioff ) = cmplx(
REAL( AA( IOFF ) ), RROGUE )
subroutine cchk6(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 cchk5(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 cchk3(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 cmvch(TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y, INCY, YT, G, YY, EPS, ERR, FATAL, NOUT, MV)
subroutine cchk2(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 lce(RI, RJ, LR)
real function sdiff(SA, SB)
subroutine cmake(TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL, KU, RESET, TRANSL)
logical function lceres(TYPE, UPLO, M, N, AA, AS, LDA)
complex function cbeg(RESET)
subroutine cchk4(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 cchk1(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)