47 parameter( nin = 5, nout = 6 )
49 parameter( nsubs = 6 )
51 parameter( zero = 0.0, half = 0.5, one = 1.0 )
53 parameter( nmax = 65 )
54 INTEGER nidmax, nalmax, nbemax
55 parameter( nidmax = 9, nalmax = 7, nbemax = 7 )
58 INTEGER i, isnum, j, n, nalf, nbet, nidim, ntra,
60 LOGICAL fatal, ltestt, rewi, same, sfatal, trace,
61 $ tsterr, corder, rorder
62 CHARACTER*1 transa, transb
66 REAL aa( nmax*nmax ), ab( nmax, 2*nmax ),
67 $ alf( nalmax ), as( nmax*nmax ),
68 $ bb( nmax*nmax ), bet( nbemax ),
69 $ bs( nmax*nmax ), c( nmax, nmax ),
70 $ cc( nmax*nmax ), cs( nmax*nmax ), ct( nmax ),
71 $ g( nmax ), w( 2*nmax )
72 INTEGER idim( nidmax )
73 LOGICAL ltest( nsubs )
74 CHARACTER*12 snames( nsubs )
89 COMMON /infoc/infot, noutc, ok
92 DATA snames/
'cblas_sgemm ',
'cblas_ssymm ',
93 $
'cblas_strmm ',
'cblas_strsm ',
'cblas_ssyrk ',
100 READ( nin, fmt = * )snaps
101 READ( nin, fmt = * )ntra
105 OPEN( ntra, file = snaps )
108 READ( nin, fmt = * )rewi
109 rewi = rewi.AND.trace
111 READ( nin, fmt = * )sfatal
113 READ( nin, fmt = * )tsterr
115 READ( nin, fmt = * )layout
117 READ( nin, fmt = * )thresh
122 READ( nin, fmt = * )nidim
123 IF( nidim.LT.1.OR.nidim.GT.nidmax )
THEN
124 WRITE( nout, fmt = 9997 )
'N', nidmax
127 READ( nin, fmt = * )( idim( i ), i = 1, nidim )
129 IF( idim( i ).LT.0.OR.idim( i ).GT.nmax )
THEN
130 WRITE( nout, fmt = 9996 )nmax
135 READ( nin, fmt = * )nalf
136 IF( nalf.LT.1.OR.nalf.GT.nalmax )
THEN
137 WRITE( nout, fmt = 9997 )
'ALPHA', nalmax
140 READ( nin, fmt = * )( alf( i ), i = 1, nalf )
142 READ( nin, fmt = * )nbet
143 IF( nbet.LT.1.OR.nbet.GT.nbemax )
THEN
144 WRITE( nout, fmt = 9997 )
'BETA', nbemax
147 READ( nin, fmt = * )( bet( i ), i = 1, nbet )
151 WRITE( nout, fmt = 9995 )
152 WRITE( nout, fmt = 9994 )( idim( i ), i = 1, nidim )
153 WRITE( nout, fmt = 9993 )( alf( i ), i = 1, nalf )
154 WRITE( nout, fmt = 9992 )( bet( i ), i = 1, nbet )
155 IF( .NOT.tsterr )
THEN
156 WRITE( nout, fmt = * )
157 WRITE( nout, fmt = 9984 )
159 WRITE( nout, fmt = * )
160 WRITE( nout, fmt = 9999 )thresh
161 WRITE( nout, fmt = * )
165 IF (layout.EQ.2)
THEN
168 WRITE( *, fmt = 10002 )
169 ELSE IF (layout.EQ.1)
THEN
171 WRITE( *, fmt = 10001 )
172 ELSE IF (layout.EQ.0)
THEN
174 WRITE( *, fmt = 10000 )
185 30
READ( nin, fmt = 9988,
END = 60 )SNAMET, ltestt
187 IF( snamet.EQ.snames( i ) )
190 WRITE( nout, fmt = 9990 )snamet
192 50 ltest( i ) = ltestt
202 IF(
sdiff( one + eps, one ).EQ.zero )
208 WRITE( nout, fmt = 9998 )eps
215 ab( i, j ) = max( i - j + 1, 0 )
217 ab( j, nmax + 1 ) = j
218 ab( 1, nmax + j ) = j
222 cc( j ) = j*( ( j + 1 )*j )/2 - ( ( j + 1 )*j*( j - 1 ) )/3
228 CALL smmch( transa, transb, n, 1, n, one, ab, nmax,
229 $ ab( 1, nmax + 1 ), nmax, zero, c, nmax, ct, g, cc,
230 $ nmax, eps, err, fatal, nout, .true. )
231 same =
lse( cc, ct, n )
232 IF( .NOT.same.OR.err.NE.zero )
THEN
233 WRITE( nout, fmt = 9989 )transa, transb, same, err
237 CALL smmch( transa, transb, n, 1, n, one, ab, nmax,
238 $ ab( 1, nmax + 1 ), nmax, zero, c, nmax, ct, g, cc,
239 $ nmax, eps, err, fatal, nout, .true. )
240 same =
lse( cc, ct, n )
241 IF( .NOT.same.OR.err.NE.zero )
THEN
242 WRITE( nout, fmt = 9989 )transa, transb, same, err
246 ab( j, nmax + 1 ) = n - j + 1
247 ab( 1, nmax + j ) = n - j + 1
250 cc( n - j + 1 ) = j*( ( j + 1 )*j )/2 -
251 $ ( ( j + 1 )*j*( j - 1 ) )/3
255 CALL smmch( transa, transb, n, 1, n, one, ab, nmax,
256 $ ab( 1, nmax + 1 ), nmax, zero, c, nmax, ct, g, cc,
257 $ nmax, eps, err, fatal, nout, .true. )
258 same =
lse( cc, ct, n )
259 IF( .NOT.same.OR.err.NE.zero )
THEN
260 WRITE( nout, fmt = 9989 )transa, transb, same, err
264 CALL smmch( transa, transb, n, 1, n, one, ab, nmax,
265 $ ab( 1, nmax + 1 ), nmax, zero, c, nmax, ct, g, cc,
266 $ nmax, eps, err, fatal, nout, .true. )
267 same =
lse( cc, ct, n )
268 IF( .NOT.same.OR.err.NE.zero )
THEN
269 WRITE( nout, fmt = 9989 )transa, transb, same, err
275 DO 200 isnum = 1, nsubs
276 WRITE( nout, fmt = * )
277 IF( .NOT.ltest( isnum ) )
THEN
279 WRITE( nout, fmt = 9987 )snames( isnum )
281 srnamt = snames( isnum )
284 CALL cs3chke( snames( isnum ) )
285 WRITE( nout, fmt = * )
291 GO TO ( 140, 150, 160, 160, 170, 180 )isnum
294 CALL schk1( snames( isnum ), eps, thresh, nout, ntra, trace,
295 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
296 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
300 CALL schk1( snames( isnum ), eps, thresh, nout, ntra, trace,
301 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
302 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
308 CALL schk2( snames( isnum ), eps, thresh, nout, ntra, trace,
309 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
310 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
314 CALL schk2( snames( isnum ), eps, thresh, nout, ntra, trace,
315 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
316 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
322 CALL schk3( snames( isnum ), eps, thresh, nout, ntra, trace,
323 $ rewi, fatal, nidim, idim, nalf, alf, nmax, ab,
324 $ aa, as, ab( 1, nmax + 1 ), bb, bs, ct, g, c,
328 CALL schk3( snames( isnum ), eps, thresh, nout, ntra, trace,
329 $ rewi, fatal, nidim, idim, nalf, alf, nmax, ab,
330 $ aa, as, ab( 1, nmax + 1 ), bb, bs, ct, g, c,
336 CALL schk4( snames( isnum ), eps, thresh, nout, ntra, trace,
337 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
338 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
342 CALL schk4( snames( isnum ), eps, thresh, nout, ntra, trace,
343 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
344 $ nmax, ab, aa, as, ab( 1, nmax + 1 ), bb, bs, c,
350 CALL schk5( snames( isnum ), eps, thresh, nout, ntra, trace,
351 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
352 $ nmax, ab, aa, as, bb, bs, c, cc, cs, ct, g, w,
356 CALL schk5( snames( isnum ), eps, thresh, nout, ntra, trace,
357 $ rewi, fatal, nidim, idim, nalf, alf, nbet, bet,
358 $ nmax, ab, aa, as, bb, bs, c, cc, cs, ct, g, w,
363 190
IF( fatal.AND.sfatal )
367 WRITE( nout, fmt = 9986 )
371 WRITE( nout, fmt = 9985 )
375 WRITE( nout, fmt = 9991 )
38310002
FORMAT(
' COLUMN-MAJOR AND ROW-MAJOR DATA LAYOUTS ARE TESTED' )
38410001
FORMAT(
' ROW-MAJOR DATA LAYOUT IS TESTED' )
38510000
FORMAT(
' COLUMN-MAJOR DATA LAYOUT IS TESTED' )
386 9999
FORMAT(
' ROUTINES PASS COMPUTATIONAL TESTS IF TEST RATIO IS LES',
388 9998
FORMAT(
' RELATIVE MACHINE PRECISION IS TAKEN TO BE', 1p, e9.1 )
389 9997
FORMAT(
' NUMBER OF VALUES OF ', a,
' IS LESS THAN 1 OR GREATER ',
391 9996
FORMAT(
' VALUE OF N IS LESS THAN 0 OR GREATER THAN ', i2 )
392 9995
FORMAT(
' TESTS OF THE REAL LEVEL 3 BLAS', //
' THE F',
393 $
'OLLOWING PARAMETER VALUES WILL BE USED:' )
394 9994
FORMAT(
' FOR N ', 9i6 )
395 9993
FORMAT(
' FOR ALPHA ', 7f6.1 )
396 9992
FORMAT(
' FOR BETA ', 7f6.1 )
397 9991
FORMAT(
' AMEND DATA FILE OR INCREASE ARRAY SIZES IN PROGRAM',
398 $ /
' ******* TESTS ABANDONED *******' )
399 9990
FORMAT(
' SUBPROGRAM NAME ', a12,
' NOT RECOGNIZED', /
' ******* ',
400 $
'TESTS ABANDONED *******' )
401 9989
FORMAT(
' ERROR IN SMMCH - IN-LINE DOT PRODUCTS ARE BEING EVALU',
402 $
'ATED WRONGLY.', /
' SMMCH WAS CALLED WITH TRANSA = ', a1,
403 $
' AND TRANSB = ', a1, /
' AND RETURNED SAME = ', l1,
' AND ',
404 $
'ERR = ', f12.3,
'.', /
' THIS MAY BE DUE TO FAULTS IN THE ',
405 $
'ARITHMETIC OR THE COMPILER.', /
' ******* TESTS ABANDONED ',
407 9988
FORMAT( a12,l2 )
408 9987
FORMAT( 1x, a12,
' WAS NOT TESTED' )
409 9986
FORMAT( /
' END OF TESTS' )
410 9985
FORMAT( /
' ******* FATAL ERROR - TESTS ABANDONED *******' )
411 9984
FORMAT(
' ERROR-EXITS WILL NOT BE TESTED' )
416 SUBROUTINE schk1( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
417 $ FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
418 $ A, AA, AS, B, BB, BS, C, CC, CS, CT, G,
433 PARAMETER ( ZERO = 0.0 )
436 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
437 LOGICAL FATAL, REWI, TRACE
440 REAL A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
441 $ as( nmax*nmax ), b( nmax, nmax ),
442 $ bb( nmax*nmax ), bet( nbet ), bs( nmax*nmax ),
443 $ c( nmax, nmax ), cc( nmax*nmax ),
444 $ cs( nmax*nmax ), ct( nmax ), g( nmax )
445 INTEGER IDIM( NIDIM )
447 REAL ALPHA, ALS, BETA, BLS, ERR, ERRMAX
448 INTEGER I, IA, IB, ICA, ICB, IK, IM, IN, K, KS, LAA,
449 $ LBB, LCC, LDA, LDAS, LDB, LDBS, LDC, LDCS, M,
450 $ ma, mb, ms, n, na, nargs, nb, nc, ns
451 LOGICAL NULL, RESET, SAME, TRANA, TRANB
452 CHARACTER*1 TRANAS, TRANBS, TRANSA, TRANSB
467 COMMON /infoc/infot, noutc, ok
490 null = n.LE.0.OR.m.LE.0
496 transa = ich( ica: ica )
497 trana = transa.EQ.
'T'.OR.transa.EQ.
'C'
517 CALL smake(
'GE',
' ',
' ', ma, na, a, nmax, aa, lda,
521 transb = ich( icb: icb )
522 tranb = transb.EQ.
'T'.OR.transb.EQ.
'C'
542 CALL smake(
'GE',
' ',
' ', mb, nb, b, nmax, bb,
553 CALL smake(
'GE',
' ',
' ', m, n, c, nmax,
554 $ cc, ldc, reset, zero )
584 $
CALL sprcn1(ntra, nc, sname, iorder,
585 $ transa, transb, m, n, k, alpha, lda,
589 CALL csgemm( iorder, transa, transb, m, n,
590 $ k, alpha, aa, lda, bb, ldb,
596 WRITE( nout, fmt = 9994 )
603 isame( 1 ) = transa.EQ.tranas
604 isame( 2 ) = transb.EQ.tranbs
608 isame( 6 ) = als.EQ.alpha
609 isame( 7 ) = lse( as, aa, laa )
610 isame( 8 ) = ldas.EQ.lda
611 isame( 9 ) = lse( bs, bb, lbb )
612 isame( 10 ) = ldbs.EQ.ldb
613 isame( 11 ) = bls.EQ.beta
615 isame( 12 ) = lse( cs, cc, lcc )
617 isame( 12 ) = lseres(
'GE',
' ', m, n, cs,
620 isame( 13 ) = ldcs.EQ.ldc
627 same = same.AND.isame( i )
628 IF( .NOT.isame( i ) )
629 $
WRITE( nout, fmt = 9998 )i+1
640 CALL smmch( transa, transb, m, n, k,
641 $ alpha, a, nmax, b, nmax, beta,
642 $ c, nmax, ct, g, cc, ldc, eps,
643 $ err, fatal, nout, .true. )
644 errmax = max( errmax, err )
667 IF( errmax.LT.thresh )
THEN
668 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
669 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
671 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
672 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
677 WRITE( nout, fmt = 9996 )sname
678 CALL sprcn1(nout, nc, sname, iorder, transa, transb,
679 $ m, n, k, alpha, lda, ldb, beta, ldc)
68410003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
685 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
686 $
'RATIO ', f8.2,
' - SUSPECT *******' )
68710002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
688 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
689 $
'RATIO ', f8.2,
' - SUSPECT *******' )
69010001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
691 $
' (', i6,
' CALL',
'S)' )
69210000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
693 $
' (', i6,
' CALL',
'S)' )
694 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
695 $
'ANGED INCORRECTLY *******' )
696 9996
FORMAT(
' ******* ', a12,
' FAILED ON CALL NUMBER:' )
697 9995
FORMAT( 1x, i6,
': ', a12,
'(''', a1,
''',''', a1,
''',',
698 $ 3( i3,
',' ), f4.1,
', A,', i3,
', B,', i3,
',', f4.1,
', ',
700 9994
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
709 SUBROUTINE sprcn1(NOUT, NC, SNAME, IORDER, TRANSA, TRANSB, M, N,
710 $ K, ALPHA, LDA, LDB, BETA, LDC)
711 INTEGER NOUT, NC, IORDER, M, N, K, LDA, LDB, LDC
713 CHARACTER*1 TRANSA, TRANSB
715 CHARACTER*14 CRC, CTA,CTB
717 IF (transa.EQ.
'N')
THEN
718 cta =
' CblasNoTrans'
719 ELSE IF (transa.EQ.
'T')
THEN
722 cta =
'CblasConjTrans'
724 IF (transb.EQ.
'N')
THEN
725 ctb =
' CblasNoTrans'
726 ELSE IF (transb.EQ.
'T')
THEN
729 ctb =
'CblasConjTrans'
732 crc =
' CblasRowMajor'
734 crc =
' CblasColMajor'
736 WRITE(nout, fmt = 9995)nc,sname,crc, cta,ctb
737 WRITE(nout, fmt = 9994)m, n, k, alpha, lda, ldb, beta, ldc
739 9995
FORMAT( 1x, i6,
': ', a12,
'(', a14,
',', a14,
',', a14,
',')
740 9994
FORMAT( 20x, 3( i3,
',' ), f4.1,
', A,', i3,
', B,', i3,
',',
741 $ f4.1,
', ',
'C,', i3,
').' )
744 SUBROUTINE schk2( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
745 $ FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
746 $ A, AA, AS, B, BB, BS, C, CC, CS, CT, G,
761 PARAMETER ( ZERO = 0.0 )
764 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
765 LOGICAL FATAL, REWI, TRACE
768 REAL A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
769 $ AS( NMAX*NMAX ), B( NMAX, NMAX ),
770 $ bb( nmax*nmax ), bet( nbet ), bs( nmax*nmax ),
771 $ c( nmax, nmax ), cc( nmax*nmax ),
772 $ cs( nmax*nmax ), ct( nmax ), g( nmax )
773 INTEGER IDIM( NIDIM )
775 REAL ALPHA, ALS, BETA, BLS, ERR, ERRMAX
776 INTEGER I, IA, IB, ICS, ICU, IM, IN, LAA, LBB, LCC,
777 $ LDA, LDAS, LDB, LDBS, LDC, LDCS, M, MS, N, NA,
779 LOGICAL LEFT, NULL, RESET, SAME
780 CHARACTER*1 SIDE, SIDES, UPLO, UPLOS
781 CHARACTER*2 ICHS, ICHU
795 COMMON /infoc/infot, noutc, ok
797 DATA ichs/
'LR'/, ichu/
'UL'/
818 null = n.LE.0.OR.m.LE.0
831 CALL smake(
'GE',
' ',
' ', m, n, b, nmax, bb, ldb, reset,
835 side = ichs( ics: ics )
853 uplo = ichu( icu: icu )
857 CALL smake(
'SY', uplo,
' ', na, na, a, nmax, aa, lda,
868 CALL smake(
'GE',
' ',
' ', m, n, c, nmax, cc,
898 $
CALL sprcn2(ntra, nc, sname, iorder,
899 $ side, uplo, m, n, alpha, lda, ldb,
903 CALL cssymm( iorder, side, uplo, m, n, alpha,
904 $ aa, lda, bb, ldb, beta, cc, ldc )
909 WRITE( nout, fmt = 9994 )
916 isame( 1 ) = sides.EQ.side
917 isame( 2 ) = uplos.EQ.uplo
920 isame( 5 ) = als.EQ.alpha
921 isame( 6 ) = lse( as, aa, laa )
922 isame( 7 ) = ldas.EQ.lda
923 isame( 8 ) = lse( bs, bb, lbb )
924 isame( 9 ) = ldbs.EQ.ldb
925 isame( 10 ) = bls.EQ.beta
927 isame( 11 ) = lse( cs, cc, lcc )
929 isame( 11 ) = lseres(
'GE',
' ', m, n, cs,
932 isame( 12 ) = ldcs.EQ.ldc
939 same = same.AND.isame( i )
940 IF( .NOT.isame( i ) )
941 $
WRITE( nout, fmt = 9998 )i+1
953 CALL smmch(
'N',
'N', m, n, m, alpha, a,
954 $ nmax, b, nmax, beta, c, nmax,
955 $ ct, g, cc, ldc, eps, err,
956 $ fatal, nout, .true. )
958 CALL smmch(
'N',
'N', m, n, n, alpha, b,
959 $ nmax, a, nmax, beta, c, nmax,
960 $ ct, g, cc, ldc, eps, err,
961 $ fatal, nout, .true. )
963 errmax = max( errmax, err )
984 IF( errmax.LT.thresh )
THEN
985 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
986 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
988 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
989 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
994 WRITE( nout, fmt = 9996 )sname
995 CALL sprcn2(nout, nc, sname, iorder, side, uplo, m, n, alpha, lda,
100110003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1002 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1003 $
'RATIO ', f8.2,
' - SUSPECT *******' )
100410002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1005 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1006 $
'RATIO ', f8.2,
' - SUSPECT *******' )
100710001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1008 $
' (', i6,
' CALL',
'S)' )
100910000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1010 $
' (', i6,
' CALL',
'S)' )
1011 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1012 $
'ANGED INCORRECTLY *******' )
1013 9996
FORMAT(
' ******* ', a12,
' FAILED ON CALL NUMBER:' )
1014 9995
FORMAT( 1x, i6,
': ', a12,
'(', 2(
'''', a1,
''',' ), 2( i3,
',' ),
1015 $ f4.1,
', A,', i3,
', B,', i3,
',', f4.1,
', C,', i3,
') ',
1017 9994
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1024 SUBROUTINE sprcn2(NOUT, NC, SNAME, IORDER, SIDE, UPLO, M, N,
1025 $ ALPHA, LDA, LDB, BETA, LDC)
1026 INTEGER NOUT, NC, IORDER, M, N, LDA, LDB, LDC
1028 CHARACTER*1 SIDE, UPLO
1030 CHARACTER*14 CRC, CS,CU
1032 IF (side.EQ.
'L')
THEN
1037 IF (uplo.EQ.
'U')
THEN
1042 IF (iorder.EQ.1)
THEN
1043 crc =
' CblasRowMajor'
1045 crc =
' CblasColMajor'
1047 WRITE(nout, fmt = 9995)nc,sname,crc, cs,cu
1048 WRITE(nout, fmt = 9994)m, n, alpha, lda, ldb, beta, ldc
1050 9995
FORMAT( 1x, i6,
': ', a12,
'(', a14,
',', a14,
',', a14,
',')
1051 9994
FORMAT( 20x, 2( i3,
',' ), f4.1,
', A,', i3,
', B,', i3,
',',
1052 $ f4.1,
', ',
'C,', i3,
').' )
1055 SUBROUTINE schk3( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1056 $ FATAL, NIDIM, IDIM, NALF, ALF, NMAX, A, AA, AS,
1057 $ B, BB, BS, CT, G, C, IORDER )
1071 PARAMETER ( ZERO = 0.0, one = 1.0 )
1074 INTEGER NALF, NIDIM, NMAX, NOUT, NTRA, IORDER
1075 LOGICAL FATAL, REWI, TRACE
1078 REAL A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
1079 $ AS( NMAX*NMAX ), B( NMAX, NMAX ),
1080 $ bb( nmax*nmax ), bs( nmax*nmax ),
1081 $ c( nmax, nmax ), ct( nmax ), g( nmax )
1082 INTEGER IDIM( NIDIM )
1084 REAL ALPHA, ALS, ERR, ERRMAX
1085 INTEGER I, IA, ICD, ICS, ICT, ICU, IM, IN, J, LAA, LBB,
1086 $ lda, ldas, ldb, ldbs, m, ms, n, na, nargs, nc,
1088 LOGICAL LEFT, NULL, RESET, SAME
1089 CHARACTER*1 DIAG, DIAGS, SIDE, SIDES, TRANAS, TRANSA, UPLO,
1091 CHARACTER*2 ICHD, ICHS, ICHU
1097 EXTERNAL LSE, LSERES
1103 INTEGER INFOT, NOUTC
1106 COMMON /infoc/infot, noutc, ok
1108 DATA ichu/
'UL'/, icht/
'NTC'/, ichd/
'UN'/, ichs/
'LR'/
1122 DO 140 im = 1, nidim
1125 DO 130 in = 1, nidim
1135 null = m.LE.0.OR.n.LE.0
1138 side = ichs( ics: ics )
1155 uplo = ichu( icu: icu )
1158 transa = icht( ict: ict )
1161 diag = ichd( icd: icd )
1168 CALL smake(
'TR', uplo, diag, na, na, a,
1169 $ nmax, aa, lda, reset, zero )
1173 CALL smake(
'GE',
' ',
' ', m, n, b, nmax,
1174 $ bb, ldb, reset, zero )
1199 IF( sname( 10: 11 ).EQ.
'mm' )
THEN
1201 $
CALL sprcn3( ntra, nc, sname, iorder,
1202 $ side, uplo, transa, diag, m, n, alpha,
1206 CALL cstrmm( iorder, side, uplo, transa,
1207 $ diag, m, n, alpha, aa, lda,
1209 ELSE IF( sname( 10: 11 ).EQ.
'sm' )
THEN
1211 $
CALL sprcn3( ntra, nc, sname, iorder,
1212 $ side, uplo, transa, diag, m, n, alpha,
1216 CALL cstrsm( iorder, side, uplo, transa,
1217 $ diag, m, n, alpha, aa, lda,
1224 WRITE( nout, fmt = 9994 )
1231 isame( 1 ) = sides.EQ.side
1232 isame( 2 ) = uplos.EQ.uplo
1233 isame( 3 ) = tranas.EQ.transa
1234 isame( 4 ) = diags.EQ.diag
1235 isame( 5 ) = ms.EQ.m
1236 isame( 6 ) = ns.EQ.n
1237 isame( 7 ) = als.EQ.alpha
1238 isame( 8 ) = lse( as, aa, laa )
1239 isame( 9 ) = ldas.EQ.lda
1241 isame( 10 ) = lse( bs, bb, lbb )
1243 isame( 10 ) = lseres(
'GE',
' ', m, n, bs,
1246 isame( 11 ) = ldbs.EQ.ldb
1253 same = same.AND.isame( i )
1254 IF( .NOT.isame( i ) )
1255 $
WRITE( nout, fmt = 9998 )i+1
1263 IF( sname( 10: 11 ).EQ.
'mm' )
THEN
1268 CALL smmch( transa,
'N', m, n, m,
1269 $ alpha, a, nmax, b, nmax,
1270 $ zero, c, nmax, ct, g,
1271 $ bb, ldb, eps, err,
1272 $ fatal, nout, .true. )
1274 CALL smmch(
'N', transa, m, n, n,
1275 $ alpha, b, nmax, a, nmax,
1276 $ zero, c, nmax, ct, g,
1277 $ bb, ldb, eps, err,
1278 $ fatal, nout, .true. )
1280 ELSE IF( sname( 10: 11 ).EQ.
'sm' )
THEN
1287 c( i, j ) = bb( i + ( j - 1 )*
1289 bb( i + ( j - 1 )*ldb ) = alpha*
1295 CALL smmch( transa,
'N', m, n, m,
1296 $ one, a, nmax, c, nmax,
1297 $ zero, b, nmax, ct, g,
1298 $ bb, ldb, eps, err,
1299 $ fatal, nout, .false. )
1301 CALL smmch(
'N', transa, m, n, n,
1302 $ one, c, nmax, a, nmax,
1303 $ zero, b, nmax, ct, g,
1304 $ bb, ldb, eps, err,
1305 $ fatal, nout, .false. )
1308 errmax = max( errmax, err )
1331 IF( errmax.LT.thresh )
THEN
1332 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
1333 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
1335 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
1336 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
1341 WRITE( nout, fmt = 9996 )sname
1343 $
CALL sprcn3( ntra, nc, sname, iorder, side, uplo, transa, diag,
1344 $ m, n, alpha, lda, ldb)
134910003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1350 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1351 $
'RATIO ', f8.2,
' - SUSPECT *******' )
135210002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1353 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1354 $
'RATIO ', f8.2,
' - SUSPECT *******' )
135510001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1356 $
' (', i6,
' CALL',
'S)' )
135710000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1358 $
' (', i6,
' CALL',
'S)' )
1359 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1360 $
'ANGED INCORRECTLY *******' )
1361 9996
FORMAT(
' ******* ', a12,
' FAILED ON CALL NUMBER:' )
1362 9995
FORMAT( 1x, i6,
': ', a12,
'(', 4(
'''', a1,
''',' ), 2( i3,
',' ),
1363 $ f4.1,
', A,', i3,
', B,', i3,
') .' )
1364 9994
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1371 SUBROUTINE sprcn3(NOUT, NC, SNAME, IORDER, SIDE, UPLO, TRANSA,
1372 $ DIAG, M, N, ALPHA, LDA, LDB)
1373 INTEGER NOUT, NC, IORDER, M, N, LDA, LDB
1375 CHARACTER*1 SIDE, UPLO, TRANSA, DIAG
1377 CHARACTER*14 CRC, CS, CU, CA, CD
1379 IF (SIDE.EQ.
'L')THEN
1384 IF (uplo.EQ.
'U')
THEN
1389 IF (transa.EQ.
'N')
THEN
1390 ca =
' CblasNoTrans'
1391 ELSE IF (transa.EQ.
'T')
THEN
1394 ca =
'CblasConjTrans'
1396 IF (diag.EQ.
'N')
THEN
1397 cd =
' CblasNonUnit'
1401 IF (iorder.EQ.1)
THEN
1402 crc =
'CblasRowMajor'
1404 crc =
'CblasColMajor'
1406 WRITE(nout, fmt = 9995)nc,sname,crc, cs,cu
1407 WRITE(nout, fmt = 9994)ca, cd, m, n, alpha, lda, ldb
1409 9995
FORMAT( 1x, i6,
': ', a12,
'(', a14,
',', a14,
',', a14,
',')
1410 9994
FORMAT( 22x, 2( a14,
',') , 2( i3,
',' ),
1411 $ f4.1,
', A,', i3,
', B,', i3,
').' )
1414 SUBROUTINE schk4( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1415 $ FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
1416 $ A, AA, AS, B, BB, BS, C, CC, CS, CT, G,
1431 PARAMETER ( ZERO = 0.0 )
1434 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
1435 LOGICAL FATAL, REWI, TRACE
1438 REAL A( NMAX, NMAX ), AA( NMAX*NMAX ), ALF( NALF ),
1439 $ AS( NMAX*NMAX ), B( NMAX, NMAX ),
1440 $ BB( NMAX*NMAX ), BET( NBET ), BS( NMAX*NMAX ),
1441 $ C( NMAX, NMAX ), CC( NMAX*NMAX ),
1442 $ CS( NMAX*NMAX ), CT( NMAX ), G( NMAX )
1443 INTEGER IDIM( NIDIM )
1445 REAL ALPHA, ALS, BETA, BETS, ERR, ERRMAX
1446 INTEGER I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, K, KS,
1447 $ laa, lcc, lda, ldas, ldc, ldcs, lj, ma, n, na,
1449 LOGICAL NULL, RESET, SAME, TRAN, UPPER
1450 CHARACTER*1 TRANS, TRANSS, UPLO, UPLOS
1457 EXTERNAL lse, lseres
1463 INTEGER INFOT, NOUTC
1466 COMMON /infoc/infot, noutc, ok
1468 DATA icht/
'NTC'/, ichu/
'UL'/
1476 DO 100 in = 1, nidim
1492 trans = icht( ict: ict )
1493 tran = trans.EQ.
'T'.OR.trans.EQ.
'C'
1512 CALL smake(
'GE',
' ',
' ', ma, na, a, nmax, aa, lda,
1516 uplo = ichu( icu: icu )
1527 CALL smake(
'SY', uplo,
' ', n, n, c, nmax, cc,
1528 $ ldc, reset, zero )
1552 $
CALL sprcn4( ntra, nc, sname, iorder, uplo,
1553 $ trans, n, k, alpha, lda, beta, ldc)
1556 CALL cssyrk( iorder, uplo, trans, n, k, alpha,
1557 $ aa, lda, beta, cc, ldc )
1562 WRITE( nout, fmt = 9993 )
1569 isame( 1 ) = uplos.EQ.uplo
1570 isame( 2 ) = transs.EQ.trans
1571 isame( 3 ) = ns.EQ.n
1572 isame( 4 ) = ks.EQ.k
1573 isame( 5 ) = als.EQ.alpha
1574 isame( 6 ) = lse( as, aa, laa )
1575 isame( 7 ) = ldas.EQ.lda
1576 isame( 8 ) = bets.EQ.beta
1578 isame( 9 ) = lse( cs, cc, lcc )
1580 isame( 9 ) = lseres(
'SY', uplo, n, n, cs,
1583 isame( 10 ) = ldcs.EQ.ldc
1590 same = same.AND.isame( i )
1591 IF( .NOT.isame( i ) )
1592 $
WRITE( nout, fmt = 9998 )i+1
1613 CALL smmch(
'T',
'N', lj, 1, k, alpha,
1615 $ a( 1, j ), nmax, beta,
1616 $ c( jj, j ), nmax, ct, g,
1617 $ cc( jc ), ldc, eps, err,
1618 $ fatal, nout, .true. )
1620 CALL smmch(
'N',
'T', lj, 1, k, alpha,
1622 $ a( j, 1 ), nmax, beta,
1623 $ c( jj, j ), nmax, ct, g,
1624 $ cc( jc ), ldc, eps, err,
1625 $ fatal, nout, .true. )
1632 errmax = max( errmax, err )
1654 IF( errmax.LT.thresh )
THEN
1655 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
1656 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
1658 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
1659 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
1665 $
WRITE( nout, fmt = 9995 )j
1668 WRITE( nout, fmt = 9996 )sname
1669 CALL sprcn4( nout, nc, sname, iorder, uplo, trans, n, k, alpha,
167510003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
1676 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1677 $
'RATIO ', f8.2,
' - SUSPECT *******' )
167810002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
1679 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
1680 $
'RATIO ', f8.2,
' - SUSPECT *******' )
168110001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
1682 $
' (', i6,
' CALL',
'S)' )
168310000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
1684 $
' (', i6,
' CALL',
'S)' )
1685 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
1686 $
'ANGED INCORRECTLY *******' )
1687 9996
FORMAT(
' ******* ', a12,
' FAILED ON CALL NUMBER:' )
1688 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
1689 9994
FORMAT( 1x, i6,
': ', a12,
'(', 2(
'''', a1,
''',' ), 2( i3,
',' ),
1690 $ f4.1,
', A,', i3,
',', f4.1,
', C,', i3,
') .' )
1691 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
1698 SUBROUTINE sprcn4(NOUT, NC, SNAME, IORDER, UPLO, TRANSA,
1699 $ N, K, ALPHA, LDA, BETA, LDC)
1700 INTEGER NOUT, NC, IORDER, N, K, LDA, LDC
1702 CHARACTER*1 UPLO, TRANSA
1704 CHARACTER*14 CRC, CU, CA
1706 IF (uplo.EQ.
'U')
THEN
1711 IF (transa.EQ.
'N')
THEN
1712 ca =
' CblasNoTrans'
1713 ELSE IF (transa.EQ.
'T')
THEN
1716 ca =
'CblasConjTrans'
1718 IF (iorder.EQ.1)
THEN
1719 crc =
' CblasRowMajor'
1721 crc =
' CblasColMajor'
1723 WRITE(nout, fmt = 9995)nc, sname, crc, cu, ca
1724 WRITE(nout, fmt = 9994)n, k, alpha, lda, beta, ldc
1726 9995
FORMAT( 1x, i6,
': ', a12,
'(', 3( a14,
',') )
1727 9994
FORMAT( 20x, 2( i3,
',' ),
1728 $ f4.1,
', A,', i3,
',', f4.1,
', C,', i3,
').' )
1731 SUBROUTINE schk5( SNAME, EPS, THRESH, NOUT, NTRA, TRACE, REWI,
1732 $ FATAL, NIDIM, IDIM, NALF, ALF, NBET, BET, NMAX,
1733 $ AB, AA, AS, BB, BS, C, CC, CS, CT, G, W,
1748 PARAMETER ( ZERO = 0.0 )
1751 INTEGER NALF, NBET, NIDIM, NMAX, NOUT, NTRA, IORDER
1752 LOGICAL FATAL, REWI, TRACE
1755 REAL AA( NMAX*NMAX ), AB( 2*NMAX*NMAX ),
1756 $ ALF( NALF ), AS( NMAX*NMAX ), BB( NMAX*NMAX ),
1757 $ BET( NBET ), BS( NMAX*NMAX ), C( NMAX, NMAX ),
1758 $ CC( NMAX*NMAX ), CS( NMAX*NMAX ), CT( NMAX ),
1759 $ G( NMAX ), W( 2*NMAX )
1760 INTEGER IDIM( NIDIM )
1762 REAL ALPHA, ALS, BETA, BETS, ERR, ERRMAX
1763 INTEGER I, IA, IB, ICT, ICU, IK, IN, J, JC, JJ, JJAB,
1764 $ K, KS, LAA, LBB, LCC, LDA, LDAS, LDB, LDBS,
1765 $ ldc, ldcs, lj, ma, n, na, nargs, nc, ns
1766 LOGICAL NULL, RESET, SAME, TRAN, UPPER
1767 CHARACTER*1 TRANS, TRANSS, UPLO, UPLOS
1774 EXTERNAL LSE, LSERES
1776 EXTERNAL SMAKE, SMMCH, CSSYR2K
1780 INTEGER INFOT, NOUTC
1783 COMMON /INFOC/INFOT, NOUTC, OK
1785 DATA icht/
'NTC'/, ichu/
'UL'/
1793 DO 130 in = 1, nidim
1805 DO 120 ik = 1, nidim
1809 trans = icht( ict: ict )
1810 tran = trans.EQ.
'T'.OR.trans.EQ.
'C'
1830 CALL smake(
'GE',
' ',
' ', ma, na, ab, 2*nmax, aa,
1831 $ lda, reset, zero )
1833 CALL smake(
'GE',
' ',
' ', ma, na, ab, nmax, aa, lda,
1842 CALL smake(
'GE',
' ',
' ', ma, na, ab( k + 1 ),
1843 $ 2*nmax, bb, ldb, reset, zero )
1845 CALL smake(
'GE',
' ',
' ', ma, na, ab( k*nmax + 1 ),
1846 $ nmax, bb, ldb, reset, zero )
1850 uplo = ichu( icu: icu )
1861 CALL smake(
'SY', uplo,
' ', n, n, c, nmax, cc,
1862 $ ldc, reset, zero )
1890 $
CALL sprcn5( ntra, nc, sname, iorder, uplo,
1891 $ trans, n, k, alpha, lda, ldb, beta, ldc)
1894 CALL cssyr2k( iorder, uplo, trans, n, k, alpha,
1895 $ aa, lda, bb, ldb, beta, cc, ldc )
1900 WRITE( nout, fmt = 9993 )
1907 isame( 1 ) = uplos.EQ.uplo
1908 isame( 2 ) = transs.EQ.trans
1909 isame( 3 ) = ns.EQ.n
1910 isame( 4 ) = ks.EQ.k
1911 isame( 5 ) = als.EQ.alpha
1912 isame( 6 ) = lse( as, aa, laa )
1913 isame( 7 ) = ldas.EQ.lda
1914 isame( 8 ) = lse( bs, bb, lbb )
1915 isame( 9 ) = ldbs.EQ.ldb
1916 isame( 10 ) = bets.EQ.beta
1918 isame( 11 ) = lse( cs, cc, lcc )
1920 isame( 11 ) = lseres(
'SY', uplo, n, n, cs,
1923 isame( 12 ) = ldcs.EQ.ldc
1930 same = same.AND.isame( i )
1931 IF( .NOT.isame( i ) )
1932 $
WRITE( nout, fmt = 9998 )i+1
1955 w( i ) = ab( ( j - 1 )*2*nmax + k +
1957 w( k + i ) = ab( ( j - 1 )*2*nmax +
1960 CALL smmch(
'T',
'N', lj, 1, 2*k,
1961 $ alpha, ab( jjab ), 2*nmax,
1963 $ c( jj, j ), nmax, ct, g,
1964 $ cc( jc ), ldc, eps, err,
1965 $ fatal, nout, .true. )
1968 w( i ) = ab( ( k + i - 1 )*nmax +
1970 w( k + i ) = ab( ( i - 1 )*nmax +
1973 CALL smmch(
'N',
'N', lj, 1, 2*k,
1974 $ alpha, ab( jj ), nmax, w,
1975 $ 2*nmax, beta, c( jj, j ),
1976 $ nmax, ct, g, cc( jc ), ldc,
1977 $ eps, err, fatal, nout,
1985 $ jjab = jjab + 2*nmax
1987 errmax = max( errmax, err )
2009 IF( errmax.LT.thresh )
THEN
2010 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10000 )sname, nc
2011 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10001 )sname, nc
2013 IF ( iorder.EQ.0)
WRITE( nout, fmt = 10002 )sname, nc, errmax
2014 IF ( iorder.EQ.1)
WRITE( nout, fmt = 10003 )sname, nc, errmax
2020 $
WRITE( nout, fmt = 9995 )j
2023 WRITE( nout, fmt = 9996 )sname
2024 CALL sprcn5( nout, nc, sname, iorder, uplo, trans, n, k, alpha,
2025 $ lda, ldb, beta, ldc)
203010003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
2031 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
2032 $
'RATIO ', f8.2,
' - SUSPECT *******' )
203310002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
2034 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
2035 $
'RATIO ', f8.2,
' - SUSPECT *******' )
203610001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
2037 $
' (', i6,
' CALL',
'S)' )
203810000
FORMAT(
' ', a12,
' PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS',
2039 $
' (', i6,
' CALL',
'S)' )
2040 9998
FORMAT(
' ******* FATAL ERROR - PARAMETER NUMBER ', i2,
' WAS CH',
2041 $
'ANGED INCORRECTLY *******' )
2042 9996
FORMAT(
' ******* ', a12,
' FAILED ON CALL NUMBER:' )
2043 9995
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2044 9994
FORMAT( 1x, i6,
': ', a12,
'(', 2(
'''', a1,
''',' ), 2( i3,
',' ),
2045 $ f4.1,
', A,', i3,
', B,', i3,
',', f4.1,
', C,', i3,
') ',
2047 9993
FORMAT(
' ******* FATAL ERROR - ERROR-EXIT TAKEN ON VALID CALL *',
2054 SUBROUTINE sprcn5(NOUT, NC, SNAME, IORDER, UPLO, TRANSA,
2055 $ N, K, ALPHA, LDA, LDB, BETA, LDC)
2056 INTEGER NOUT, NC, IORDER, N, K, LDA, LDB, LDC
2058 CHARACTER*1 UPLO, TRANSA
2060 CHARACTER*14 CRC, CU, CA
2062 IF (uplo.EQ.
'U')
THEN
2067 IF (transa.EQ.
'N')
THEN
2068 ca =
' CblasNoTrans'
2069 ELSE IF (transa.EQ.
'T')
THEN
2072 ca =
'CblasConjTrans'
2074 IF (iorder.EQ.1)
THEN
2075 crc =
' CblasRowMajor'
2077 crc =
' CblasColMajor'
2079 WRITE(nout, fmt = 9995)nc, sname, crc, cu, ca
2080 WRITE(nout, fmt = 9994)n, k, alpha, lda, ldb, beta, ldc
2082 9995
FORMAT( 1x, i6,
': ', a12,
'(', 3( a14,
',') )
2083 9994
FORMAT( 20x, 2( i3,
',' ),
2084 $ f4.1,
', A,', i3,
', B', i3,
',', f4.1,
', C,', i3,
').' )
2087 SUBROUTINE smake( TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, RESET,
2106 PARAMETER ( ZERO = 0.0, one = 1.0 )
2108 PARAMETER ( ROGUE = -1.0e10 )
2111 INTEGER LDA, M, N, NMAX
2113 CHARACTER*1 DIAG, UPLO
2116 REAL A( NMAX, * ), AA( * )
2118 INTEGER I, IBEG, IEND, J
2119 LOGICAL GEN, LOWER, SYM, TRI, UNIT, UPPER
2127 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2128 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2129 unit = tri.AND.diag.EQ.
'U'
2135 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2137 a( i, j ) = sbeg( reset ) + transl
2140 IF( n.GT.3.AND.j.EQ.n/2 )
2143 a( j, i ) = a( i, j )
2151 $ a( j, j ) = a( j, j ) + one
2158 IF( type.EQ.
'GE' )
THEN
2161 aa( i + ( j - 1 )*lda ) = a( i, j )
2163 DO 40 i = m + 1, lda
2164 aa( i + ( j - 1 )*lda ) = rogue
2167 ELSE IF( type.EQ.
'SY'.OR.type.EQ.
'TR' )
THEN
2184 DO 60 i = 1, ibeg - 1
2185 aa( i + ( j - 1 )*lda ) = rogue
2187 DO 70 i = ibeg, iend
2188 aa( i + ( j - 1 )*lda ) = a( i, j )
2190 DO 80 i = iend + 1, lda
2191 aa( i + ( j - 1 )*lda ) = rogue
2200 SUBROUTINE smmch( TRANSA, TRANSB, M, N, KK, ALPHA, A, LDA, B, LDB,
2201 $ BETA, C, LDC, CT, G, CC, LDCC, EPS, ERR, FATAL,
2216 parameter( zero = 0.0, one = 1.0 )
2218 REAL ALPHA, BETA, EPS, ERR
2219 INTEGER KK, LDA, LDB, LDC, LDCC, M, N, NOUT
2221 CHARACTER*1 TRANSA, TRANSB
2223 REAL A( LDA, * ), B( LDB, * ), C( LDC, * ),
2224 $ CC( LDCC, * ), CT( * ), G( * )
2228 LOGICAL TRANA, TRANB
2230 INTRINSIC ABS, MAX, SQRT
2232 TRANA = transa.EQ.
'T'.OR.transa.EQ.
'C'
2233 tranb = transb.EQ.
'T'.OR.transb.EQ.
'C'
2245 IF( .NOT.trana.AND..NOT.tranb )
THEN
2248 ct( i ) = ct( i ) + a( i, k )*b( k, j )
2249 g( i ) = g( i ) + abs( a( i, k ) )*abs( b( k, j ) )
2252 ELSE IF( trana.AND..NOT.tranb )
THEN
2255 ct( i ) = ct( i ) + a( k, i )*b( k, j )
2256 g( i ) = g( i ) + abs( a( k, i ) )*abs( b( k, j ) )
2259 ELSE IF( .NOT.trana.AND.tranb )
THEN
2262 ct( i ) = ct( i ) + a( i, k )*b( j, k )
2263 g( i ) = g( i ) + abs( a( i, k ) )*abs( b( j, k ) )
2266 ELSE IF( trana.AND.tranb )
THEN
2269 ct( i ) = ct( i ) + a( k, i )*b( j, k )
2270 g( i ) = g( i ) + abs( a( k, i ) )*abs( b( j, k ) )
2275 ct( i ) = alpha*ct( i ) + beta*c( i, j )
2276 g( i ) = abs( alpha )*g( i ) + abs( beta )*abs( c( i, j ) )
2283 erri = abs( ct( i ) - cc( i, j ) )/eps
2284 IF( g( i ).NE.zero )
2285 $ erri = erri/g( i )
2286 err = max( err, erri )
2287 IF( err*sqrt( eps ).GE.one )
2299 WRITE( nout, fmt = 9999 )
2302 WRITE( nout, fmt = 9998 )i, ct( i ), cc( i, j )
2304 WRITE( nout, fmt = 9998 )i, cc( i, j ), ct( i )
2308 $
WRITE( nout, fmt = 9997 )j
2313 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
2314 $
'F ACCURATE *******', /
' EXPECTED RESULT COMPU',
2316 9998
FORMAT( 1x, i7, 2g18.6 )
2317 9997
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )
2322 LOGICAL FUNCTION lse( RI, RJ, LR )
2337 REAL ri( * ), rj( * )
2342 IF( ri( i ).NE.rj( i ) )
2354 LOGICAL FUNCTION lseres( TYPE, UPLO, M, N, AA, AS, LDA )
2373 REAL aa( lda, * ), as( lda, * )
2375 INTEGER i, ibeg, iend, j
2379 IF( type.EQ.
'GE' )
THEN
2381 DO 10 i = m + 1, lda
2382 IF( aa( i, j ).NE.as( i, j ) )
2386 ELSE IF( type.EQ.
'SY' )
THEN
2395 DO 30 i = 1, ibeg - 1
2396 IF( aa( i, j ).NE.as( i, j ) )
2399 DO 40 i = iend + 1, lda
2400 IF( aa( i, j ).NE.as( i, j ) )
2451 i = i - 1000*( i/1000 )
2456 sbeg = ( i - 500 )/1001.0
subroutine sprcn5(nout, nc, sname, iorder, uplo, transa, n, k, alpha, lda, ldb, beta, ldc)
subroutine sprcn3(nout, nc, sname, iorder, side, uplo, transa, diag, m, n, alpha, lda, ldb)
subroutine sprcn2(nout, nc, sname, iorder, side, uplo, m, n, alpha, lda, ldb, beta, ldc)
subroutine sprcn4(nout, nc, sname, iorder, uplo, transa, n, k, alpha, lda, beta, ldc)
subroutine sprcn1(nout, nc, sname, iorder, transa, transb, m, n, k, alpha, lda, ldb, beta, ldc)
real function sdiff(sa, sb)
subroutine schk3(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 schk4(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 lseres(type, uplo, m, n, aa, as, lda)
subroutine schk2(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 schk1(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 schk5(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)
real function sbeg(reset)
subroutine smake(type, uplo, diag, m, n, a, nmax, aa, lda, kl, ku, reset, transl)
logical function lse(ri, rj, lr)
subroutine smmch(transa, transb, m, n, kk, alpha, a, lda, b, ldb, beta, c, ldc, ct, g, cc, ldcc, eps, err, fatal, nout, mv)