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
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)
2030 10003
FORMAT(
' ', a12,
' COMPLETED THE ROW-MAJOR COMPUTATIONAL ',
2031 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
2032 $
'RATIO ', f8.2,
' - SUSPECT *******' )
2033 10002
FORMAT(
' ', a12,
' COMPLETED THE COLUMN-MAJOR COMPUTATIONAL ',
2034 $
'TESTS (', i6,
' CALLS)', /
' ******* BUT WITH MAXIMUM TEST ',
2035 $
'RATIO ', f8.2,
' - SUSPECT *******' )
2036 10001
FORMAT(
' ', a12,
' PASSED THE ROW-MAJOR COMPUTATIONAL TESTS',
2037 $
' (', i6,
' CALL',
'S)' )
2038 10000
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 *',
subroutine sprcn5(NOUT, NC, SNAME, IORDER, UPLO, TRANSA, N, K, ALPHA, LDA, LDB, BETA, LDC)
subroutine smake(TYPE, UPLO, DIAG, M, N, A, NMAX, AA, LDA, KL, KU, RESET, TRANSL)
logical function lse(RI, RJ, LR)
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)