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)
684 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
685 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
686 $
'RATIO ', f8.2,
' - SUSPECT *******' )
687 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
688 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
689 $
'RATIO ', f8.2,
' - SUSPECT *******' )
690 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
691 $
' (', i6,
' CALL',
'S)' )
692 10000
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 *',
subroutine smake(TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL, KU, RESET, TRANSL)
logical function lse(RI, RJ, LR)
subroutine sprcn1(NOUT, NC, SNAME, IORDER, TRANSA, TRANSB, M, N, K, ALPHA, LDA, LDB, BETA, LDC)
logical function lseres(TYPE, UPLO, M, N, AA, AS, LDA)
subroutine smmch(TRANSA, TRANSB, M, N, KK, ALPHA, A, LDA, B, LDB, BETA, C, LDC, CT, G, CC, LDCC, EPS, ERR, FATAL, NOUT, MV)