67 parameter ( nin = 5, nout = 6 )
69 parameter ( nsubs = 16 )
70 DOUBLE PRECISION ZERO, HALF, ONE
71 parameter ( zero = 0.0d0, half = 0.5d0, one = 1.0d0 )
73 parameter ( nmax = 65, incmax = 2 )
74 INTEGER NINMAX, NIDMAX, NKBMAX, NALMAX, NBEMAX
75 parameter ( ninmax = 7, nidmax = 9, nkbmax = 7,
76 $ nalmax = 7, nbemax = 7 )
78 DOUBLE PRECISION EPS, ERR, THRESH
79 INTEGER I, ISNUM, J, N, NALF, NBET, NIDIM, NINC, NKB,
81 LOGICAL FATAL, LTESTT, REWI, SAME, SFATAL, TRACE,
82 $ tsterr, corder, rorder
87 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ),
88 $ alf( nalmax ), as( nmax*nmax ), bet( nbemax ),
89 $ g( nmax ), x( nmax ), xs( nmax*incmax ),
90 $ xx( nmax*incmax ), y( nmax ),
91 $ ys( nmax*incmax ), yt( nmax ),
92 $ yy( nmax*incmax ), z( 2*nmax )
93 INTEGER IDIM( nidmax ), INC( ninmax ), KB( nkbmax )
94 LOGICAL LTEST( nsubs )
95 CHARACTER*12 SNAMES( nsubs )
97 DOUBLE PRECISION DDIFF
104 INTRINSIC abs, max, min
110 COMMON /infoc/infot, noutc, ok
111 COMMON /srnamc/srnamt
113 DATA snames/
'cblas_dgemv ',
'cblas_dgbmv ',
114 $
'cblas_dsymv ',
'cblas_dsbmv ',
'cblas_dspmv ',
115 $
'cblas_dtrmv ',
'cblas_dtbmv ',
'cblas_dtpmv ',
116 $
'cblas_dtrsv ',
'cblas_dtbsv ',
'cblas_dtpsv ',
117 $
'cblas_dger ',
'cblas_dsyr ',
'cblas_dspr ',
118 $
'cblas_dsyr2 ',
'cblas_dspr2 '/
125 READ( nin, fmt = * )snaps
126 READ( nin, fmt = * )ntra
129 OPEN( ntra, file = snaps )
132 READ( nin, fmt = * )rewi
133 rewi = rewi.AND.trace
135 READ( nin, fmt = * )sfatal
137 READ( nin, fmt = * )tsterr
139 READ( nin, fmt = * )layout
141 READ( nin, fmt = * )thresh
146 READ( nin, fmt = * )nidim
147 IF( nidim.LT.1.OR.nidim.GT.nidmax )
THEN
148 WRITE( nout, fmt = 9997 )
'N', nidmax
151 READ( nin, fmt = * )( idim( i ), i = 1, nidim )
153 IF( idim( i ).LT.0.OR.idim( i ).GT.nmax )
THEN
154 WRITE( nout, fmt = 9996 )nmax
159 READ( nin, fmt = * )nkb
160 IF( nkb.LT.1.OR.nkb.GT.nkbmax )
THEN
161 WRITE( nout, fmt = 9997 )
'K', nkbmax
164 READ( nin, fmt = * )( kb( i ), i = 1, nkb )
166 IF( kb( i ).LT.0 )
THEN
167 WRITE( nout, fmt = 9995 )
172 READ( nin, fmt = * )ninc
173 IF( ninc.LT.1.OR.ninc.GT.ninmax )
THEN
174 WRITE( nout, fmt = 9997 )
'INCX AND INCY', ninmax
177 READ( nin, fmt = * )( inc( i ), i = 1, ninc )
179 IF( inc( i ).EQ.0.OR.abs( inc( i ) ).GT.incmax )
THEN
180 WRITE( nout, fmt = 9994 )incmax
185 READ( nin, fmt = * )nalf
186 IF( nalf.LT.1.OR.nalf.GT.nalmax )
THEN
187 WRITE( nout, fmt = 9997 )
'ALPHA', nalmax
190 READ( nin, fmt = * )( alf( i ), i = 1, nalf )
192 READ( nin, fmt = * )nbet
193 IF( nbet.LT.1.OR.nbet.GT.nbemax )
THEN
194 WRITE( nout, fmt = 9997 )
'BETA', nbemax
197 READ( nin, fmt = * )( bet( i ), i = 1, nbet )
201 WRITE( nout, fmt = 9993 )
202 WRITE( nout, fmt = 9992 )( idim( i ), i = 1, nidim )
203 WRITE( nout, fmt = 9991 )( kb( i ), i = 1, nkb )
204 WRITE( nout, fmt = 9990 )( inc( i ), i = 1, ninc )
205 WRITE( nout, fmt = 9989 )( alf( i ), i = 1, nalf )
206 WRITE( nout, fmt = 9988 )( bet( i ), i = 1, nbet )
207 IF( .NOT.tsterr )
THEN
208 WRITE( nout, fmt = * )
209 WRITE( nout, fmt = 9980 )
211 WRITE( nout, fmt = * )
212 WRITE( nout, fmt = 9999 )thresh
213 WRITE( nout, fmt = * )
217 IF (layout.EQ.2)
THEN
220 WRITE( *, fmt = 10002 )
221 ELSE IF (layout.EQ.1)
THEN
223 WRITE( *, fmt = 10001 )
224 ELSE IF (layout.EQ.0)
THEN
226 WRITE( *, fmt = 10000 )
236 50
READ( nin, fmt = 9984, end = 80 )snamet, ltestt
238 IF( snamet.EQ.snames( i ) )
241 WRITE( nout, fmt = 9986 )snamet
243 70 ltest( i ) = ltestt
253 IF( ddiff( one + eps, one ).EQ.zero )
259 WRITE( nout, fmt = 9998 )eps
266 a( i, j ) = max( i - j + 1, 0 )
272 yy( j ) = j*( ( j + 1 )*j )/2 - ( ( j + 1 )*j*( j - 1 ) )/3
277 CALL dmvch( trans, n, n, one, a, nmax, x, 1, zero, y, 1, yt, g,
278 $ yy, eps, err, fatal, nout, .true. )
279 same = lde( yy, yt, n )
280 IF( .NOT.same.OR.err.NE.zero )
THEN
281 WRITE( nout, fmt = 9985 )trans, same, err
285 CALL dmvch( trans, n, n, one, a, nmax, x, -1, zero, y, -1, yt, g,
286 $ yy, eps, err, fatal, nout, .true. )
287 same = lde( yy, yt, n )
288 IF( .NOT.same.OR.err.NE.zero )
THEN
289 WRITE( nout, fmt = 9985 )trans, same, err
295 DO 210 isnum = 1, nsubs
296 WRITE( nout, fmt = * )
297 IF( .NOT.ltest( isnum ) )
THEN
299 WRITE( nout, fmt = 9983 )snames( isnum )
301 srnamt = snames( isnum )
304 CALL cd2chke( snames( isnum ) )
305 WRITE( nout, fmt = * )
311 GO TO ( 140, 140, 150, 150, 150, 160, 160,
312 $ 160, 160, 160, 160, 170, 180, 180,
316 CALL dchk1( snames( isnum ), eps, thresh, nout, ntra, trace,
317 $ rewi, fatal, nidim, idim, nkb, kb, nalf, alf,
318 $ nbet, bet, ninc, inc, nmax, incmax, a, aa, as,
319 $ x, xx, xs, y, yy, ys, yt, g, 0 )
322 CALL dchk1( snames( isnum ), eps, thresh, nout, ntra, trace,
323 $ rewi, fatal, nidim, idim, nkb, kb, nalf, alf,
324 $ nbet, bet, ninc, inc, nmax, incmax, a, aa, as,
325 $ x, xx, xs, y, yy, ys, yt, g, 1 )
330 CALL dchk2( snames( isnum ), eps, thresh, nout, ntra, trace,
331 $ rewi, fatal, nidim, idim, nkb, kb, nalf, alf,
332 $ nbet, bet, ninc, inc, nmax, incmax, a, aa, as,
333 $ x, xx, xs, y, yy, ys, yt, g, 0 )
336 CALL dchk2( snames( isnum ), eps, thresh, nout, ntra, trace,
337 $ rewi, fatal, nidim, idim, nkb, kb, nalf, alf,
338 $ nbet, bet, ninc, inc, nmax, incmax, a, aa, as,
339 $ x, xx, xs, y, yy, ys, yt, g, 1 )
345 CALL dchk3( snames( isnum ), eps, thresh, nout, ntra, trace,
346 $ rewi, fatal, nidim, idim, nkb, kb, ninc, inc,
347 $ nmax, incmax, a, aa, as, y, yy, ys, yt, g, z,
351 CALL dchk3( snames( isnum ), eps, thresh, nout, ntra, trace,
352 $ rewi, fatal, nidim, idim, nkb, kb, ninc, inc,
353 $ nmax, incmax, a, aa, as, y, yy, ys, yt, g, z,
359 CALL dchk4( snames( isnum ), eps, thresh, nout, ntra, trace,
360 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
361 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
365 CALL dchk4( snames( isnum ), eps, thresh, nout, ntra, trace,
366 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
367 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
373 CALL dchk5( snames( isnum ), eps, thresh, nout, ntra, trace,
374 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
375 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
379 CALL dchk5( snames( isnum ), eps, thresh, nout, ntra, trace,
380 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
381 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
387 CALL dchk6( snames( isnum ), eps, thresh, nout, ntra, trace,
388 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
389 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
393 CALL dchk6( snames( isnum ), eps, thresh, nout, ntra, trace,
394 $ rewi, fatal, nidim, idim, nalf, alf, ninc, inc,
395 $ nmax, incmax, a, aa, as, x, xx, xs, y, yy, ys,
399 200
IF( fatal.AND.sfatal )
403 WRITE( nout, fmt = 9982 )
407 WRITE( nout, fmt = 9981 )
411 WRITE( nout, fmt = 9987 )
419 10002
FORMAT(
' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
420 10001
FORMAT(
' ROW-MAJOR DATA LAYOUT IS TESTED' )
421 10000
FORMAT(
' COLUMN-MAJOR DATA LAYOUT IS TESTED' )
422 9999
FORMAT(
' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',
424 9998
FORMAT(
' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1p, d9.1 )
425 9997
FORMAT(
' NUMBER OF VALUES OF ', a,
' IS LESS THAN 1 OR GREATER ',
427 9996
FORMAT(
' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', i2 )
428 9995
FORMAT(
' VALUE OF K IS LESS THAN 0' )
429 9994
FORMAT(
' ABSOLUTE VALUE OF INCX OR INCY IS 0 OR GREATER THAN ',
431 9993
FORMAT(
' TESTS OF THE DOUBLE PRECISION LEVEL 2 BLAS', //
' THE F',
432 $
'OLLOWING PARAMETER VALUES WILL BE USED:' )
433 9992
FORMAT(
' FOR N ', 9i6 )
434 9991
FORMAT(
' FOR K ', 7i6 )
435 9990
FORMAT(
' FOR INCX AND INCY ', 7i6 )
436 9989
FORMAT(
' FOR ALPHA ', 7f6.1 )
437 9988
FORMAT(
' FOR BETA ', 7f6.1 )
438 9987
FORMAT(
' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',
439 $ /
' ******* TESTS ABANDONED *******' )
440 9986
FORMAT(
' SUBPROGRAM NAME ',a12,
' NOT RECOGNIZED', /
' ******* T',
441 $
'ESTS ABANDONED *******' )
442 9985
FORMAT(
' ERROR IN DMVCH - IN-LINE DOT PRODUCTS ARE BEING EVALU',
443 $
'ATED WRONGLY.', /
' DMVCH WAS CALLED WITH TRANS = ', a1,
444 $
' AND RETURNED SAME = ', l1,
' AND ERR = ', f12.3,
'.', /
445 $
' THIS MAY BE DUE TO FAULTS IN THE ARITHMETIC OR THE COMPILER.'
446 $ , /
' ******* TESTS ABANDONED *******' )
447 9984
FORMAT(a12, l2 )
448 9983
FORMAT( 1x,a12,
' WAS NOT TESTED' )
449 9982
FORMAT( /
' END OF TESTS' )
450 9981
FORMAT( /
' ******* FATAL ERROR - TESTS ABANDONED *******' )
451 9980
FORMAT(
' ERROR-EXITS WILL NOT BE TESTED' )
456 SUBROUTINE dchk1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
457 $ fatal, nidim, idim, nkb, kb, nalf, alf, nbet,
458 $ bet, ninc, inc, nmax, incmax, a, aa, as, x, xx,
459 $ xs, y, yy, ys, yt, g, iorder )
470 DOUBLE PRECISION ZERO, HALF
471 parameter ( zero = 0.0d0, half = 0.5d0 )
473 DOUBLE PRECISION EPS, THRESH
474 INTEGER INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,
476 LOGICAL FATAL, REWI, TRACE
479 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
480 $ as( nmax*nmax ), bet( nbet ), g( nmax ),
481 $ x( nmax ), xs( nmax*incmax ),
482 $ xx( nmax*incmax ), y( nmax ),
483 $ ys( nmax*incmax ), yt( nmax ),
485 INTEGER IDIM( nidim ), INC( ninc ), KB( nkb )
487 DOUBLE PRECISION ALPHA, ALS, BETA, BLS, ERR, ERRMAX, TRANSL
488 INTEGER I, IA, IB, IC, IKU, IM, IN, INCX, INCXS, INCY,
489 $ incys, ix, iy, kl, kls, ku, kus, laa, lda,
490 $ ldas, lx, ly, m, ml, ms, n, nargs, nc, nd, nk,
492 LOGICAL BANDED, FULL, NULL, RESET, SAME, TRAN
493 CHARACTER*1 TRANS, TRANSS
504 INTRINSIC abs, max, min
509 COMMON /infoc/infot, noutc, ok
513 full = sname( 9: 9 ).EQ.
'e'
514 banded = sname( 9: 9 ).EQ.
'b'
518 ELSE IF( banded )
THEN
532 $ m = max( n - nd, 0 )
534 $ m = min( n + nd, nmax )
544 kl = max( ku - 1, 0 )
561 null = n.LE.0.OR.m.LE.0
566 CALL dmake( sname( 8: 9 ),
' ',
' ', m, n, a, nmax, aa,
567 $ lda, kl, ku, reset, transl )
570 trans = ich( ic: ic )
571 IF (trans.EQ.
'N')
THEN
572 ctrans =
' CblasNoTrans'
573 ELSE IF (trans.EQ.
'T')
THEN
574 ctrans =
' CblasTrans'
576 ctrans =
'CblasConjTrans'
578 tran = trans.EQ.
'T'.OR.trans.EQ.
'C'
595 CALL dmake(
'ge',
' ',
' ', 1, nl, x, 1, xx,
596 $ abs( incx ), 0, nl - 1, reset, transl )
599 xx( 1 + abs( incx )*( nl/2 - 1 ) ) = zero
615 CALL dmake(
'ge',
' ',
' ', 1, ml, y, 1,
616 $ yy, abs( incy ), 0, ml - 1,
648 $
WRITE( ntra, fmt = 9994 )nc, sname,
649 $ ctrans, m, n, alpha, lda, incx,
653 CALL cdgemv( iorder, trans, m, n,
654 $ alpha, aa, lda, xx, incx,
656 ELSE IF( banded )
THEN
658 $
WRITE( ntra, fmt = 9995 )nc, sname,
659 $ ctrans, m, n, kl, ku, alpha, lda,
663 CALL cdgbmv( iorder, trans, m, n, kl,
664 $ ku, alpha, aa, lda, xx,
665 $ incx, beta, yy, incy )
671 WRITE( nout, fmt = 9993 )
678 isame( 1 ) = trans.EQ.transs
682 isame( 4 ) = als.EQ.alpha
683 isame( 5 ) = lde( as, aa, laa )
684 isame( 6 ) = ldas.EQ.lda
685 isame( 7 ) = lde( xs, xx, lx )
686 isame( 8 ) = incxs.EQ.incx
687 isame( 9 ) = bls.EQ.beta
689 isame( 10 ) = lde( ys, yy, ly )
691 isame( 10 ) = lderes(
'ge',
' ', 1,
695 isame( 11 ) = incys.EQ.incy
696 ELSE IF( banded )
THEN
697 isame( 4 ) = kls.EQ.kl
698 isame( 5 ) = kus.EQ.ku
699 isame( 6 ) = als.EQ.alpha
700 isame( 7 ) = lde( as, aa, laa )
701 isame( 8 ) = ldas.EQ.lda
702 isame( 9 ) = lde( xs, xx, lx )
703 isame( 10 ) = incxs.EQ.incx
704 isame( 11 ) = bls.EQ.beta
706 isame( 12 ) = lde( ys, yy, ly )
708 isame( 12 ) = lderes(
'ge',
' ', 1,
712 isame( 13 ) = incys.EQ.incy
720 same = same.AND.isame( i )
721 IF( .NOT.isame( i ) )
722 $
WRITE( nout, fmt = 9998 )i
733 CALL dmvch( trans, m, n, alpha, a,
734 $ nmax, x, incx, beta, y,
735 $ incy, yt, g, yy, eps, err,
736 $ fatal, nout, .true. )
737 errmax = max( errmax, err )
766 IF( errmax.LT.thresh )
THEN
767 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
768 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
770 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
771 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
776 WRITE( nout, fmt = 9996 )sname
778 WRITE( nout, fmt = 9994 )nc, sname, ctrans, m, n, alpha, lda,
780 ELSE IF( banded )
THEN
781 WRITE( nout, fmt = 9995 )nc, sname, ctrans, m, n, kl, ku,
782 $ alpha, lda, incx, beta, incy
788 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
789 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
790 $
'RATIO ', f8.2,
' - SUSPECT *******' )
791 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
792 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
793 $
'RATIO ', f8.2,
' - SUSPECT *******' )
794 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
795 $
' (', i6,
' CALL',
'S)' )
796 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
797 $
' (', i6,
' CALL',
'S)' )
798 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
799 $
'ANGED INCORRECTLY *******' )
800 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
801 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
802 $
' - SUSPECT *******' )
803 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
804 9995
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', 4( i3,
',' ), f4.1,
805 $
', A,', i3,
',',/ 10x,
'X,', i2,
',', f4.1,
', Y,',
807 9994
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', 2( i3,
',' ), f4.1,
808 $
', A,', i3,
', X,', i2,
',', f4.1,
', Y,', i2,
810 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
816 SUBROUTINE dchk2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
817 $ fatal, nidim, idim, nkb, kb, nalf, alf, nbet,
818 $ bet, ninc, inc, nmax, incmax, a, aa, as, x, xx,
819 $ xs, y, yy, ys, yt, g, iorder )
830 DOUBLE PRECISION ZERO, HALF
831 parameter ( zero = 0.0d0, half = 0.5d0 )
833 DOUBLE PRECISION EPS, THRESH
834 INTEGER INCMAX, NALF, NBET, NIDIM, NINC, NKB, NMAX,
836 LOGICAL FATAL, REWI, TRACE
839 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
840 $ as( nmax*nmax ), bet( nbet ), g( nmax ),
841 $ x( nmax ), xs( nmax*incmax ),
842 $ xx( nmax*incmax ), y( nmax ),
843 $ ys( nmax*incmax ), yt( nmax ),
845 INTEGER IDIM( nidim ), INC( ninc ), KB( nkb )
847 DOUBLE PRECISION ALPHA, ALS, BETA, BLS, ERR, ERRMAX, TRANSL
848 INTEGER I, IA, IB, IC, IK, IN, INCX, INCXS, INCY,
849 $ incys, ix, iy, k, ks, laa, lda, ldas, lx, ly,
850 $ n, nargs, nc, nk, ns
851 LOGICAL BANDED, FULL, NULL, PACKED, RESET, SAME
852 CHARACTER*1 UPLO, UPLOS
868 COMMON /infoc/infot, noutc, ok
872 full = sname( 9: 9 ).EQ.
'y'
873 banded = sname( 9: 9 ).EQ.
'b'
874 packed = sname( 9: 9 ).EQ.
'p'
878 ELSE IF( banded )
THEN
880 ELSE IF( packed )
THEN
914 laa = ( n*( n + 1 ) )/2
923 cuplo =
' CblasUpper'
925 cuplo =
' CblasLower'
931 CALL dmake( sname( 8: 9 ), uplo,
' ', n, n, a, nmax, aa,
932 $ lda, k, k, reset, transl )
941 CALL dmake(
'ge',
' ',
' ', 1, n, x, 1, xx,
942 $ abs( incx ), 0, n - 1, reset, transl )
945 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
961 CALL dmake(
'ge',
' ',
' ', 1, n, y, 1, yy,
962 $ abs( incy ), 0, n - 1, reset,
992 $
WRITE( ntra, fmt = 9993 )nc, sname,
993 $ cuplo, n, alpha, lda, incx, beta, incy
996 CALL cdsymv( iorder, uplo, n, alpha, aa,
997 $ lda, xx, incx, beta, yy, incy )
998 ELSE IF( banded )
THEN
1000 $
WRITE( ntra, fmt = 9994 )nc, sname,
1001 $ cuplo, n, k, alpha, lda, incx, beta,
1005 CALL cdsbmv( iorder, uplo, n, k, alpha,
1006 $ aa, lda, xx, incx, beta, yy,
1008 ELSE IF( packed )
THEN
1010 $
WRITE( ntra, fmt = 9995 )nc, sname,
1011 $ cuplo, n, alpha, incx, beta, incy
1014 CALL cdspmv( iorder, uplo, n, alpha, aa,
1015 $ xx, incx, beta, yy, incy )
1021 WRITE( nout, fmt = 9992 )
1028 isame( 1 ) = uplo.EQ.uplos
1029 isame( 2 ) = ns.EQ.n
1031 isame( 3 ) = als.EQ.alpha
1032 isame( 4 ) = lde( as, aa, laa )
1033 isame( 5 ) = ldas.EQ.lda
1034 isame( 6 ) = lde( xs, xx, lx )
1035 isame( 7 ) = incxs.EQ.incx
1036 isame( 8 ) = bls.EQ.beta
1038 isame( 9 ) = lde( ys, yy, ly )
1040 isame( 9 ) = lderes(
'ge',
' ', 1, n,
1041 $ ys, yy, abs( incy ) )
1043 isame( 10 ) = incys.EQ.incy
1044 ELSE IF( banded )
THEN
1045 isame( 3 ) = ks.EQ.k
1046 isame( 4 ) = als.EQ.alpha
1047 isame( 5 ) = lde( as, aa, laa )
1048 isame( 6 ) = ldas.EQ.lda
1049 isame( 7 ) = lde( xs, xx, lx )
1050 isame( 8 ) = incxs.EQ.incx
1051 isame( 9 ) = bls.EQ.beta
1053 isame( 10 ) = lde( ys, yy, ly )
1055 isame( 10 ) = lderes(
'ge',
' ', 1, n,
1056 $ ys, yy, abs( incy ) )
1058 isame( 11 ) = incys.EQ.incy
1059 ELSE IF( packed )
THEN
1060 isame( 3 ) = als.EQ.alpha
1061 isame( 4 ) = lde( as, aa, laa )
1062 isame( 5 ) = lde( xs, xx, lx )
1063 isame( 6 ) = incxs.EQ.incx
1064 isame( 7 ) = bls.EQ.beta
1066 isame( 8 ) = lde( ys, yy, ly )
1068 isame( 8 ) = lderes(
'ge',
' ', 1, n,
1069 $ ys, yy, abs( incy ) )
1071 isame( 9 ) = incys.EQ.incy
1079 same = same.AND.isame( i )
1080 IF( .NOT.isame( i ) )
1081 $
WRITE( nout, fmt = 9998 )i
1092 CALL dmvch(
'N', n, n, alpha, a, nmax, x,
1093 $ incx, beta, y, incy, yt, g,
1094 $ yy, eps, err, fatal, nout,
1096 errmax = max( errmax, err )
1122 IF( errmax.LT.thresh )
THEN
1123 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
1124 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
1126 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
1127 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
1132 WRITE( nout, fmt = 9996 )sname
1134 WRITE( nout, fmt = 9993 )nc, sname, cuplo, n, alpha, lda, incx,
1136 ELSE IF( banded )
THEN
1137 WRITE( nout, fmt = 9994 )nc, sname, cuplo, n, k, alpha, lda,
1139 ELSE IF( packed )
THEN
1140 WRITE( nout, fmt = 9995 )nc, sname, cuplo, n, alpha, incx,
1147 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1148 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1149 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1150 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1151 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1152 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1153 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1154 $
' (', i6,
' CALL',
'S)' )
1155 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1156 $
' (', i6,
' CALL',
'S)' )
1157 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1158 $
'ANGED INCORRECTLY *******' )
1159 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1160 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1161 $
' - SUSPECT *******' )
1162 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
1163 9995
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', i3,
',', f4.1,
', AP',
1164 $
', X,', i2,
',', f4.1,
', Y,', i2,
') .' )
1165 9994
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', 2( i3,
',' ), f4.1,
1166 $
', A,', i3,
', X,', i2,
',', f4.1,
', Y,', i2,
1168 9993
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', i3,
',', f4.1,
', A,',
1169 $ i3,
', X,', i2,
',', f4.1,
', Y,', i2,
') .' )
1170 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1176 SUBROUTINE dchk3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1177 $ fatal, nidim, idim, nkb, kb, ninc, inc, nmax,
1178 $ incmax, a, aa, as, x, xx, xs, xt, g, z, iorder )
1189 DOUBLE PRECISION ZERO, HALF, ONE
1190 parameter ( zero = 0.0d0, half = 0.5d0, one = 1.0d0 )
1192 DOUBLE PRECISION EPS, THRESH
1193 INTEGER INCMAX, NIDIM, NINC, NKB, NMAX, NOUT, NTRA,
1195 LOGICAL FATAL, REWI, TRACE
1198 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ),
1199 $ as( nmax*nmax ), g( nmax ), x( nmax ),
1200 $ xs( nmax*incmax ), xt( nmax ),
1201 $ xx( nmax*incmax ), z( nmax )
1202 INTEGER IDIM( nidim ), INC( ninc ), KB( nkb )
1204 DOUBLE PRECISION ERR, ERRMAX, TRANSL
1205 INTEGER I, ICD, ICT, ICU, IK, IN, INCX, INCXS, IX, K,
1206 $ ks, laa, lda, ldas, lx, n, nargs, nc, nk, ns
1207 LOGICAL BANDED, FULL, NULL, PACKED, RESET, SAME
1208 CHARACTER*1 DIAG, DIAGS, TRANS, TRANSS, UPLO, UPLOS
1209 CHARACTER*14 CUPLO,CTRANS,CDIAG
1210 CHARACTER*2 ICHD, ICHU
1216 EXTERNAL lde, lderes
1218 EXTERNAL dmake,
dmvch, cdtbmv, cdtbsv, cdtpmv,
1219 $ cdtpsv, cdtrmv, cdtrsv
1223 INTEGER INFOT, NOUTC
1226 COMMON /infoc/infot, noutc, ok
1228 DATA ichu/
'UL'/, icht/
'NTC'/, ichd/
'UN'/
1230 full = sname( 9: 9 ).EQ.
'r'
1231 banded = sname( 9: 9 ).EQ.
'b'
1232 packed = sname( 9: 9 ).EQ.
'p'
1236 ELSE IF( banded )
THEN
1238 ELSE IF( packed )
THEN
1250 DO 110 in = 1, nidim
1276 laa = ( n*( n + 1 ) )/2
1283 uplo = ichu( icu: icu )
1284 IF (uplo.EQ.
'U')
THEN
1285 cuplo =
' CblasUpper'
1287 cuplo =
' CblasLower'
1291 trans = icht( ict: ict )
1292 IF (trans.EQ.
'N')
THEN
1293 ctrans =
' CblasNoTrans'
1294 ELSE IF (trans.EQ.
'T')
THEN
1295 ctrans =
' CblasTrans'
1297 ctrans =
'CblasConjTrans'
1301 diag = ichd( icd: icd )
1302 IF (diag.EQ.
'N')
THEN
1303 cdiag =
' CblasNonUnit'
1305 cdiag =
' CblasUnit'
1311 CALL dmake( sname( 8: 9 ), uplo, diag, n, n, a,
1312 $ nmax, aa, lda, k, k, reset, transl )
1321 CALL dmake(
'ge',
' ',
' ', 1, n, x, 1, xx,
1322 $ abs( incx ), 0, n - 1, reset,
1326 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
1349 IF( sname( 10: 11 ).EQ.
'mv' )
THEN
1352 $
WRITE( ntra, fmt = 9993 )nc, sname,
1353 $ cuplo, ctrans, cdiag, n, lda, incx
1356 CALL cdtrmv( iorder, uplo, trans, diag,
1357 $ n, aa, lda, xx, incx )
1358 ELSE IF( banded )
THEN
1360 $
WRITE( ntra, fmt = 9994 )nc, sname,
1361 $ cuplo, ctrans, cdiag, n, k, lda, incx
1364 CALL cdtbmv( iorder, uplo, trans, diag,
1365 $ n, k, aa, lda, xx, incx )
1366 ELSE IF( packed )
THEN
1368 $
WRITE( ntra, fmt = 9995 )nc, sname,
1369 $ cuplo, ctrans, cdiag, n, incx
1372 CALL cdtpmv( iorder, uplo, trans, diag,
1375 ELSE IF( sname( 10: 11 ).EQ.
'sv' )
THEN
1378 $
WRITE( ntra, fmt = 9993 )nc, sname,
1379 $ cuplo, ctrans, cdiag, n, lda, incx
1382 CALL cdtrsv( iorder, uplo, trans, diag,
1383 $ n, aa, lda, xx, incx )
1384 ELSE IF( banded )
THEN
1386 $
WRITE( ntra, fmt = 9994 )nc, sname,
1387 $ cuplo, ctrans, cdiag, n, k, lda, incx
1390 CALL cdtbsv( iorder, uplo, trans, diag,
1391 $ n, k, aa, lda, xx, incx )
1392 ELSE IF( packed )
THEN
1394 $
WRITE( ntra, fmt = 9995 )nc, sname,
1395 $ cuplo, ctrans, cdiag, n, incx
1398 CALL cdtpsv( iorder, uplo, trans, diag,
1406 WRITE( nout, fmt = 9992 )
1413 isame( 1 ) = uplo.EQ.uplos
1414 isame( 2 ) = trans.EQ.transs
1415 isame( 3 ) = diag.EQ.diags
1416 isame( 4 ) = ns.EQ.n
1418 isame( 5 ) = lde( as, aa, laa )
1419 isame( 6 ) = ldas.EQ.lda
1421 isame( 7 ) = lde( xs, xx, lx )
1423 isame( 7 ) = lderes(
'ge',
' ', 1, n, xs,
1426 isame( 8 ) = incxs.EQ.incx
1427 ELSE IF( banded )
THEN
1428 isame( 5 ) = ks.EQ.k
1429 isame( 6 ) = lde( as, aa, laa )
1430 isame( 7 ) = ldas.EQ.lda
1432 isame( 8 ) = lde( xs, xx, lx )
1434 isame( 8 ) = lderes(
'ge',
' ', 1, n, xs,
1437 isame( 9 ) = incxs.EQ.incx
1438 ELSE IF( packed )
THEN
1439 isame( 5 ) = lde( as, aa, laa )
1441 isame( 6 ) = lde( xs, xx, lx )
1443 isame( 6 ) = lderes(
'ge',
' ', 1, n, xs,
1446 isame( 7 ) = incxs.EQ.incx
1454 same = same.AND.isame( i )
1455 IF( .NOT.isame( i ) )
1456 $
WRITE( nout, fmt = 9998 )i
1464 IF( sname( 10: 11 ).EQ.
'mv' )
THEN
1468 CALL dmvch( trans, n, n, one, a, nmax, x,
1469 $ incx, zero, z, incx, xt, g,
1470 $ xx, eps, err, fatal, nout,
1472 ELSE IF( sname( 10: 11 ).EQ.
'sv' )
THEN
1477 z( i ) = xx( 1 + ( i - 1 )*
1479 xx( 1 + ( i - 1 )*abs( incx ) )
1482 CALL dmvch( trans, n, n, one, a, nmax, z,
1483 $ incx, zero, x, incx, xt, g,
1484 $ xx, eps, err, fatal, nout,
1487 errmax = max( errmax, err )
1510 IF( errmax.LT.thresh )
THEN
1511 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
1512 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
1514 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
1515 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
1520 WRITE( nout, fmt = 9996 )sname
1522 WRITE( nout, fmt = 9993 )nc, sname, cuplo, ctrans, cdiag, n,
1524 ELSE IF( banded )
THEN
1525 WRITE( nout, fmt = 9994 )nc, sname, cuplo, ctrans, cdiag, n, k,
1527 ELSE IF( packed )
THEN
1528 WRITE( nout, fmt = 9995 )nc, sname, cuplo, ctrans, cdiag, n,
1535 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1536 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1537 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1538 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1539 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1540 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1541 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1542 $
' (', i6,
' CALL',
'S)' )
1543 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1544 $
' (', i6,
' CALL',
'S)' )
1545 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1546 $
'ANGED INCORRECTLY *******' )
1547 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
1548 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
1549 $
' - SUSPECT *******' )
1550 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
1551 9995
FORMAT( 1x, i6,
': ',a12,
'(', 3( a14,
',' ),/ 10x, i3,
', AP, ',
1553 9994
FORMAT( 1x, i6,
': ',a12,
'(', 3( a14,
',' ),/ 10x, 2( i3,
',' ),
1554 $
' A,', i3,
', X,', i2,
') .' )
1555 9993
FORMAT( 1x, i6,
': ',a12,
'(', 3( a14,
',' ),/ 10x, i3,
', A,',
1556 $ i3,
', X,', i2,
') .' )
1557 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1563 SUBROUTINE dchk4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1564 $ fatal, nidim, idim, nalf, alf, ninc, inc, nmax,
1565 $ incmax, a, aa, as, x, xx, xs, y, yy, ys, yt, g,
1577 DOUBLE PRECISION ZERO, HALF, ONE
1578 parameter ( zero = 0.0d0, half = 0.5d0, one = 1.0d0 )
1580 DOUBLE PRECISION EPS, THRESH
1581 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA,
1583 LOGICAL FATAL, REWI, TRACE
1586 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
1587 $ as( nmax*nmax ), g( nmax ), x( nmax ),
1588 $ xs( nmax*incmax ), xx( nmax*incmax ),
1589 $ y( nmax ), ys( nmax*incmax ), yt( nmax ),
1590 $ yy( nmax*incmax ), z( nmax )
1591 INTEGER IDIM( nidim ), INC( ninc )
1593 DOUBLE PRECISION ALPHA, ALS, ERR, ERRMAX, TRANSL
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 NULL, RESET, SAME
1599 DOUBLE PRECISION W( 1 )
1603 EXTERNAL lde, lderes
1607 INTRINSIC abs, max, min
1609 INTEGER INFOT, NOUTC
1612 COMMON /infoc/infot, noutc, ok
1621 DO 120 in = 1, nidim
1627 $ m = max( n - nd, 0 )
1629 $ m = min( n + nd, nmax )
1639 null = n.LE.0.OR.m.LE.0
1648 CALL dmake(
'ge',
' ',
' ', 1, m, x, 1, xx, abs( incx ),
1649 $ 0, m - 1, reset, transl )
1652 xx( 1 + abs( incx )*( m/2 - 1 ) ) = zero
1662 CALL dmake(
'ge',
' ',
' ', 1, n, y, 1, yy,
1663 $ abs( incy ), 0, n - 1, reset, transl )
1666 yy( 1 + abs( incy )*( n/2 - 1 ) ) = zero
1675 CALL dmake( sname( 8: 9 ),
' ',
' ', m, n, a, nmax,
1676 $ aa, lda, m - 1, n - 1, reset, transl )
1701 $
WRITE( ntra, fmt = 9994 )nc, sname, m, n,
1702 $ alpha, incx, incy, lda
1705 CALL cdger( iorder, m, n, alpha, xx, incx, yy,
1711 WRITE( nout, fmt = 9993 )
1718 isame( 1 ) = ms.EQ.m
1719 isame( 2 ) = ns.EQ.n
1720 isame( 3 ) = als.EQ.alpha
1721 isame( 4 ) = lde( xs, xx, lx )
1722 isame( 5 ) = incxs.EQ.incx
1723 isame( 6 ) = lde( ys, yy, ly )
1724 isame( 7 ) = incys.EQ.incy
1726 isame( 8 ) = lde( as, aa, laa )
1728 isame( 8 ) = lderes(
'ge',
' ', m, n, as, aa,
1731 isame( 9 ) = ldas.EQ.lda
1737 same = same.AND.isame( i )
1738 IF( .NOT.isame( i ) )
1739 $
WRITE( nout, fmt = 9998 )i
1756 z( i ) = x( m - i + 1 )
1763 w( 1 ) = y( n - j + 1 )
1765 CALL dmvch(
'N', m, 1, alpha, z, nmax, w, 1,
1766 $ one, a( 1, j ), 1, yt, g,
1767 $ aa( 1 + ( j - 1 )*lda ), eps,
1768 $ err, fatal, nout, .true. )
1769 errmax = max( errmax, err )
1791 IF( errmax.LT.thresh )
THEN
1792 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
1793 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
1795 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
1796 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
1801 WRITE( nout, fmt = 9995 )j
1804 WRITE( nout, fmt = 9996 )sname
1805 WRITE( nout, fmt = 9994 )nc, sname, m, n, alpha, incx, incy, lda
1810 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1811 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1812 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1813 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1814 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1815 $
'RATIO ', f8.2,
' - SUSPECT *******' )
1816 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1817 $
' (', i6,
' CALL',
'S)' )
1818 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1819 $
' (', i6,
' CALL',
'S)' )
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,
', X,', i2,
1828 $
', Y,', i2,
', A,', i3,
') .' )
1829 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1835 SUBROUTINE dchk5( 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 DOUBLE PRECISION ZERO, HALF, ONE
1850 parameter ( zero = 0.0d0, half = 0.5d0, one = 1.0d0 )
1852 DOUBLE PRECISION EPS, THRESH
1853 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA,
1855 LOGICAL FATAL, REWI, TRACE
1858 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
1859 $ as( nmax*nmax ), g( nmax ), x( nmax ),
1860 $ xs( nmax*incmax ), xx( nmax*incmax ),
1861 $ y( nmax ), ys( nmax*incmax ), yt( nmax ),
1862 $ yy( nmax*incmax ), z( nmax )
1863 INTEGER IDIM( nidim ), INC( ninc )
1865 DOUBLE PRECISION ALPHA, ALS, ERR, ERRMAX, TRANSL
1866 INTEGER I, IA, IC, IN, INCX, INCXS, IX, J, JA, JJ, LAA,
1867 $ lda, ldas, lj, lx, n, nargs, nc, ns
1868 LOGICAL FULL, NULL, PACKED, RESET, SAME, UPPER
1869 CHARACTER*1 UPLO, UPLOS
1873 DOUBLE PRECISION W( 1 )
1877 EXTERNAL lde, lderes
1883 INTEGER INFOT, NOUTC
1886 COMMON /infoc/infot, noutc, ok
1890 full = sname( 9: 9 ).EQ.
'y'
1891 packed = sname( 9: 9 ).EQ.
'p'
1895 ELSE IF( packed )
THEN
1903 DO 100 in = 1, nidim
1913 laa = ( n*( n + 1 ) )/2
1919 uplo = ich( ic: ic )
1920 IF (uplo.EQ.
'U')
THEN
1921 cuplo =
' CblasUpper'
1923 cuplo =
' CblasLower'
1934 CALL dmake(
'ge',
' ',
' ', 1, n, x, 1, xx, abs( incx ),
1935 $ 0, n - 1, reset, transl )
1938 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
1943 null = n.LE.0.OR.alpha.EQ.zero
1948 CALL dmake( sname( 8: 9 ), uplo,
' ', n, n, a, nmax,
1949 $ aa, lda, n - 1, n - 1, reset, transl )
1971 $
WRITE( ntra, fmt = 9993 )nc, sname, cuplo, n,
1975 CALL cdsyr( iorder, uplo, n, alpha, xx, incx,
1977 ELSE IF( packed )
THEN
1979 $
WRITE( ntra, fmt = 9994 )nc, sname, cuplo, n,
1983 CALL cdspr( iorder, uplo, n, alpha, xx, incx, aa )
1989 WRITE( nout, fmt = 9992 )
1996 isame( 1 ) = uplo.EQ.uplos
1997 isame( 2 ) = ns.EQ.n
1998 isame( 3 ) = als.EQ.alpha
1999 isame( 4 ) = lde( xs, xx, lx )
2000 isame( 5 ) = incxs.EQ.incx
2002 isame( 6 ) = lde( as, aa, laa )
2004 isame( 6 ) = lderes( sname( 8: 9 ), uplo, n, n, as,
2007 IF( .NOT.packed )
THEN
2008 isame( 7 ) = ldas.EQ.lda
2015 same = same.AND.isame( i )
2016 IF( .NOT.isame( i ) )
2017 $
WRITE( nout, fmt = 9998 )i
2034 z( i ) = x( n - i + 1 )
2047 CALL dmvch(
'N', lj, 1, alpha, z( jj ), lj, w,
2048 $ 1, one, a( jj, j ), 1, yt, g,
2049 $ aa( ja ), eps, err, fatal, nout,
2060 errmax = max( errmax, err )
2081 IF( errmax.LT.thresh )
THEN
2082 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
2083 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
2085 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
2086 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
2091 WRITE( nout, fmt = 9995 )j
2094 WRITE( nout, fmt = 9996 )sname
2096 WRITE( nout, fmt = 9993 )nc, sname, cuplo, n, alpha, incx, lda
2097 ELSE IF( packed )
THEN
2098 WRITE( nout, fmt = 9994 )nc, sname, cuplo, n, alpha, incx
2104 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
2105 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
2106 $
'RATIO ', f8.2,
' - SUSPECT *******' )
2107 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
2108 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
2109 $
'RATIO ', f8.2,
' - SUSPECT *******' )
2110 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
2111 $
' (', i6,
' CALL',
'S)' )
2112 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
2113 $
' (', i6,
' CALL',
'S)' )
2114 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2115 $
'ANGED INCORRECTLY *******' )
2116 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
2117 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
2118 $
' - SUSPECT *******' )
2119 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
2120 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2121 9994
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', i3,
',', f4.1,
', X,',
2123 9993
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', i3,
',', f4.1,
', X,',
2124 $ i2,
', A,', i3,
') .' )
2125 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2131 SUBROUTINE dchk6( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
2132 $ fatal, nidim, idim, nalf, alf, ninc, inc, nmax,
2133 $ incmax, a, aa, as, x, xx, xs, y, yy, ys, yt, g,
2145 DOUBLE PRECISION ZERO, HALF, ONE
2146 parameter ( zero = 0.0d0, half = 0.5d0, one = 1.0d0 )
2148 DOUBLE PRECISION EPS, THRESH
2149 INTEGER INCMAX, NALF, NIDIM, NINC, NMAX, NOUT, NTRA,
2151 LOGICAL FATAL, REWI, TRACE
2154 DOUBLE PRECISION A( nmax, nmax ), AA( nmax*nmax ), ALF( nalf ),
2155 $ as( nmax*nmax ), g( nmax ), x( nmax ),
2156 $ xs( nmax*incmax ), xx( nmax*incmax ),
2157 $ y( nmax ), ys( nmax*incmax ), yt( nmax ),
2158 $ yy( nmax*incmax ), z( nmax, 2 )
2159 INTEGER IDIM( nidim ), INC( ninc )
2161 DOUBLE PRECISION ALPHA, ALS, ERR, ERRMAX, TRANSL
2162 INTEGER I, IA, IC, IN, INCX, INCXS, INCY, INCYS, IX,
2163 $ iy, j, ja, jj, laa, lda, ldas, lj, lx, ly, n,
2165 LOGICAL FULL, NULL, PACKED, RESET, SAME, UPPER
2166 CHARACTER*1 UPLO, UPLOS
2170 DOUBLE PRECISION W( 2 )
2174 EXTERNAL lde, lderes
2180 INTEGER INFOT, NOUTC
2183 COMMON /infoc/infot, noutc, ok
2187 full = sname( 9: 9 ).EQ.
'y'
2188 packed = sname( 9: 9 ).EQ.
'p'
2192 ELSE IF( packed )
THEN
2200 DO 140 in = 1, nidim
2210 laa = ( n*( n + 1 ) )/2
2216 uplo = ich( ic: ic )
2217 IF (uplo.EQ.
'U')
THEN
2218 cuplo =
' CblasUpper'
2220 cuplo =
' CblasLower'
2231 CALL dmake(
'ge',
' ',
' ', 1, n, x, 1, xx, abs( incx ),
2232 $ 0, n - 1, reset, transl )
2235 xx( 1 + abs( incx )*( n/2 - 1 ) ) = zero
2245 CALL dmake(
'ge',
' ',
' ', 1, n, y, 1, yy,
2246 $ abs( incy ), 0, n - 1, reset, transl )
2249 yy( 1 + abs( incy )*( n/2 - 1 ) ) = zero
2254 null = n.LE.0.OR.alpha.EQ.zero
2259 CALL dmake( sname( 8: 9 ), uplo,
' ', n, n, a,
2260 $ nmax, aa, lda, n - 1, n - 1, reset,
2287 $
WRITE( ntra, fmt = 9993 )nc, sname, cuplo, n,
2288 $ alpha, incx, incy, lda
2291 CALL cdsyr2( iorder, uplo, n, alpha, xx, incx,
2292 $ yy, incy, aa, lda )
2293 ELSE IF( packed )
THEN
2295 $
WRITE( ntra, fmt = 9994 )nc, sname, cuplo, n,
2299 CALL cdspr2( iorder, uplo, n, alpha, xx, incx,
2306 WRITE( nout, fmt = 9992 )
2313 isame( 1 ) = uplo.EQ.uplos
2314 isame( 2 ) = ns.EQ.n
2315 isame( 3 ) = als.EQ.alpha
2316 isame( 4 ) = lde( xs, xx, lx )
2317 isame( 5 ) = incxs.EQ.incx
2318 isame( 6 ) = lde( ys, yy, ly )
2319 isame( 7 ) = incys.EQ.incy
2321 isame( 8 ) = lde( as, aa, laa )
2323 isame( 8 ) = lderes( sname( 8: 9 ), uplo, n, n,
2326 IF( .NOT.packed )
THEN
2327 isame( 9 ) = ldas.EQ.lda
2334 same = same.AND.isame( i )
2335 IF( .NOT.isame( i ) )
2336 $
WRITE( nout, fmt = 9998 )i
2353 z( i, 1 ) = x( n - i + 1 )
2362 z( i, 2 ) = y( n - i + 1 )
2376 CALL dmvch(
'N', lj, 2, alpha, z( jj, 1 ),
2377 $ nmax, w, 1, one, a( jj, j ), 1,
2378 $ yt, g, aa( ja ), eps, err, fatal,
2389 errmax = max( errmax, err )
2412 IF( errmax.LT.thresh )
THEN
2413 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
2414 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
2416 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
2417 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
2422 WRITE( nout, fmt = 9995 )j
2425 WRITE( nout, fmt = 9996 )sname
2427 WRITE( nout, fmt = 9993 )nc, sname, cuplo, n, alpha, incx,
2429 ELSE IF( packed )
THEN
2430 WRITE( nout, fmt = 9994 )nc, sname, cuplo, n, alpha, incx, incy
2436 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
2437 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
2438 $
'RATIO ', f8.2,
' - SUSPECT *******' )
2439 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
2440 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
2441 $
'RATIO ', f8.2,
' - SUSPECT *******' )
2442 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
2443 $
' (', i6,
' CALL',
'S)' )
2444 10000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
2445 $
' (', i6,
' CALL',
'S)' )
2446 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2447 $
'ANGED INCORRECTLY *******' )
2448 9997
FORMAT(
' ',a12,
' COMPLETED THE COMPUTATIONAL TESTS (', i6,
' C',
2449 $
'ALLS)', /
' ******* BUT WITH MAXIMUM TEST RATIO', f8.2,
2450 $
' - SUSPECT *******' )
2451 9996
FORMAT(
' ******* ',a12,
' FAILED ON CALL NUMBER:' )
2452 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2453 9994
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', i3,
',', f4.1,
', X,',
2454 $ i2,
', Y,', i2,
', AP) .' )
2455 9993
FORMAT( 1x, i6,
': ',a12,
'(', a14,
',', i3,
',', f4.1,
', X,',
2456 $ i2,
', Y,', i2,
', A,', i3,
') .' )
2457 9992
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2463 SUBROUTINE dmake( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL,
2464 $ ku, reset, transl )
2480 DOUBLE PRECISION ZERO, ONE
2481 parameter ( zero = 0.0d0, one = 1.0d0 )
2482 DOUBLE PRECISION ROGUE
2483 parameter ( rogue = -1.0d10 )
2485 DOUBLE PRECISION TRANSL
2486 INTEGER KL, KU, LDA, M, N, NMAX
2488 CHARACTER*1 DIAG, UPLO
2491 DOUBLE PRECISION A( nmax, * ), AA( * )
2493 INTEGER I, I1, I2, I3, IBEG, IEND, IOFF, J, KK
2494 LOGICAL GEN, LOWER, SYM, TRI, UNIT, UPPER
2496 DOUBLE PRECISION DBEG
2501 gen =
TYPE( 1: 1 ).EQ.
'g'
2502 sym =
TYPE( 1: 1 ).EQ.
's'
2503 tri =
TYPE( 1: 1 ).EQ.
't'
2504 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2505 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2506 unit = tri.AND.diag.EQ.
'U'
2512 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2514 IF( ( i.LE.j.AND.j - i.LE.ku ).OR.
2515 $ ( i.GE.j.AND.i - j.LE.kl ) )
THEN
2516 a( i, j ) = dbeg( reset ) + transl
2522 a( j, i ) = a( i, j )
2530 $ a( j, j ) = a( j, j ) + one
2537 IF( type.EQ.
'ge' )
THEN
2540 aa( i + ( j - 1 )*lda ) = a( i, j )
2542 DO 40 i = m + 1, lda
2543 aa( i + ( j - 1 )*lda ) = rogue
2546 ELSE IF( type.EQ.
'gb' )
THEN
2548 DO 60 i1 = 1, ku + 1 - j
2549 aa( i1 + ( j - 1 )*lda ) = rogue
2551 DO 70 i2 = i1, min( kl + ku + 1, ku + 1 + m - j )
2552 aa( i2 + ( j - 1 )*lda ) = a( i2 + j - ku - 1, j )
2555 aa( i3 + ( j - 1 )*lda ) = rogue
2558 ELSE IF( type.EQ.
'sy'.OR.type.EQ.
'tr' )
THEN
2575 DO 100 i = 1, ibeg - 1
2576 aa( i + ( j - 1 )*lda ) = rogue
2578 DO 110 i = ibeg, iend
2579 aa( i + ( j - 1 )*lda ) = a( i, j )
2581 DO 120 i = iend + 1, lda
2582 aa( i + ( j - 1 )*lda ) = rogue
2585 ELSE IF( type.EQ.
'sb'.OR.type.EQ.
'tb' )
THEN
2589 ibeg = max( 1, kl + 2 - j )
2602 iend = min( kl + 1, 1 + m - j )
2604 DO 140 i = 1, ibeg - 1
2605 aa( i + ( j - 1 )*lda ) = rogue
2607 DO 150 i = ibeg, iend
2608 aa( i + ( j - 1 )*lda ) = a( i + j - kk, j )
2610 DO 160 i = iend + 1, lda
2611 aa( i + ( j - 1 )*lda ) = rogue
2614 ELSE IF( type.EQ.
'sp'.OR.type.EQ.
'tp' )
THEN
2624 DO 180 i = ibeg, iend
2626 aa( ioff ) = a( i, j )
2629 $ aa( ioff ) = rogue
2639 SUBROUTINE dmvch( TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y,
2640 $ incy, yt, g, yy, eps, err, fatal, nout, mv )
2651 DOUBLE PRECISION ZERO, ONE
2652 parameter ( zero = 0.0d0, one = 1.0d0 )
2654 DOUBLE PRECISION ALPHA, BETA, EPS, ERR
2655 INTEGER INCX, INCY, M, N, NMAX, NOUT
2659 DOUBLE PRECISION A( nmax, * ), G( * ), X( * ), Y( * ), YT( * ),
2662 DOUBLE PRECISION ERRI
2663 INTEGER I, INCXL, INCYL, IY, J, JX, KX, KY, ML, NL
2666 INTRINSIC abs, max, sqrt
2668 tran = trans.EQ.
'T'.OR.trans.EQ.
'C'
2701 yt( iy ) = yt( iy ) + a( j, i )*x( jx )
2702 g( iy ) = g( iy ) + abs( a( j, i )*x( jx ) )
2707 yt( iy ) = yt( iy ) + a( i, j )*x( jx )
2708 g( iy ) = g( iy ) + abs( a( i, j )*x( jx ) )
2712 yt( iy ) = alpha*yt( iy ) + beta*y( iy )
2713 g( iy ) = abs( alpha )*g( iy ) + abs( beta*y( iy ) )
2721 erri = abs( yt( i ) - yy( 1 + ( i - 1 )*abs( incy ) ) )/eps
2722 IF( g( i ).NE.zero )
2723 $ erri = erri/g( i )
2724 err = max( err, erri )
2725 IF( err*sqrt( eps ).GE.one )
2734 WRITE( nout, fmt = 9999 )
2737 WRITE( nout, fmt = 9998 )i, yt( i ),
2738 $ yy( 1 + ( i - 1 )*abs( incy ) )
2740 WRITE( nout, fmt = 9998 )i,
2741 $ yy( 1 + ( i - 1 )*abs( incy ) ), yt(i)
2748 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
2749 $
'F ACCURATE *******', /
' EXPECTED RESULT COMPU',
2751 9998
FORMAT( 1x, i7, 2g18.6 )
2756 LOGICAL FUNCTION lde( RI, RJ, LR )
2769 DOUBLE PRECISION RI( * ), RJ( * )
2774 IF( ri( i ).NE.rj( i ) )
2786 LOGICAL FUNCTION lderes( TYPE, UPLO, M, N, AA, AS, LDA )
2803 DOUBLE PRECISION AA( lda, * ), AS( lda, * )
2805 INTEGER I, IBEG, IEND, J
2809 IF( type.EQ.
'ge' )
THEN
2811 DO 10 i = m + 1, lda
2812 IF( aa( i, j ).NE.as( i, j ) )
2816 ELSE IF( type.EQ.
'sy' )
THEN
2825 DO 30 i = 1, ibeg - 1
2826 IF( aa( i, j ).NE.as( i, j ) )
2829 DO 40 i = iend + 1, lda
2830 IF( aa( i, j ).NE.as( i, j ) )
2846 DOUBLE PRECISION FUNCTION dbeg( RESET )
2881 i = i - 1000*( i/1000 )
2886 dbeg = dble( i - 500 )/1001.0d0
2892 DOUBLE PRECISION FUNCTION ddiff( X, Y )
2900 DOUBLE PRECISION X, Y
subroutine dchk4(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 dchk3(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 dchk1(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 dmake(TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL, KU, RESET, TRANSL)
logical function lde(RI, RJ, LR)
double precision function ddiff(X, Y)
subroutine dchk5(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 dger(M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
DGER
subroutine dchk2(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 dmvch(TRANS, M, N, ALPHA, A, NMAX, X, INCX, BETA, Y, INCY, YT, G, YY, EPS, ERR, FATAL, NOUT, MV)
double precision function dbeg(RESET)
subroutine dchk6(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)
logical function lderes(TYPE, UPLO, M, N, AA, AS, LDA)