|
kusano |
2b45e8 |
PROGRAM CCBLAT1
|
|
kusano |
2b45e8 |
* Test program for the COMPLEX Level 1 CBLAS.
|
|
kusano |
2b45e8 |
* Based upon the original CBLAS test routine together with:
|
|
kusano |
2b45e8 |
* F06GAF Example Program Text
|
|
kusano |
2b45e8 |
* .. Parameters ..
|
|
kusano |
2b45e8 |
INTEGER NOUT
|
|
kusano |
2b45e8 |
PARAMETER (NOUT=6)
|
|
kusano |
2b45e8 |
* .. Scalars in Common ..
|
|
kusano |
2b45e8 |
INTEGER ICASE, INCX, INCY, MODE, N
|
|
kusano |
2b45e8 |
LOGICAL PASS
|
|
kusano |
2b45e8 |
* .. Local Scalars ..
|
|
kusano |
2b45e8 |
REAL SFAC
|
|
kusano |
2b45e8 |
INTEGER IC
|
|
kusano |
2b45e8 |
* .. External Subroutines ..
|
|
kusano |
2b45e8 |
EXTERNAL CHECK1, CHECK2, HEADER
|
|
kusano |
2b45e8 |
* .. Common blocks ..
|
|
kusano |
2b45e8 |
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
|
|
kusano |
2b45e8 |
* .. Data statements ..
|
|
kusano |
2b45e8 |
DATA SFAC/9.765625E-4/
|
|
kusano |
2b45e8 |
* .. Executable Statements ..
|
|
kusano |
2b45e8 |
WRITE (NOUT,99999)
|
|
kusano |
2b45e8 |
DO 20 IC = 1, 10
|
|
kusano |
2b45e8 |
ICASE = IC
|
|
kusano |
2b45e8 |
CALL HEADER
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* Initialize PASS, INCX, INCY, and MODE for a new case.
|
|
kusano |
2b45e8 |
* The value 9999 for INCX, INCY or MODE will appear in the
|
|
kusano |
2b45e8 |
* detailed output, if any, for cases that do not involve
|
|
kusano |
2b45e8 |
* these parameters.
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
PASS = .TRUE.
|
|
kusano |
2b45e8 |
INCX = 9999
|
|
kusano |
2b45e8 |
INCY = 9999
|
|
kusano |
2b45e8 |
MODE = 9999
|
|
kusano |
2b45e8 |
IF (ICASE.LE.5) THEN
|
|
kusano |
2b45e8 |
CALL CHECK2(SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.GE.6) THEN
|
|
kusano |
2b45e8 |
CALL CHECK1(SFAC)
|
|
kusano |
2b45e8 |
END IF
|
|
kusano |
2b45e8 |
* -- Print
|
|
kusano |
2b45e8 |
IF (PASS) WRITE (NOUT,99998)
|
|
kusano |
2b45e8 |
20 CONTINUE
|
|
kusano |
2b45e8 |
STOP
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
99999 FORMAT (' Complex CBLAS Test Program Results',/1X)
|
|
kusano |
2b45e8 |
99998 FORMAT (' ----- PASS -----')
|
|
kusano |
2b45e8 |
END
|
|
kusano |
2b45e8 |
SUBROUTINE HEADER
|
|
kusano |
2b45e8 |
* .. Parameters ..
|
|
kusano |
2b45e8 |
INTEGER NOUT
|
|
kusano |
2b45e8 |
PARAMETER (NOUT=6)
|
|
kusano |
2b45e8 |
* .. Scalars in Common ..
|
|
kusano |
2b45e8 |
INTEGER ICASE, INCX, INCY, MODE, N
|
|
kusano |
2b45e8 |
LOGICAL PASS
|
|
kusano |
2b45e8 |
* .. Local Arrays ..
|
|
kusano |
2b45e8 |
CHARACTER*15 L(10)
|
|
kusano |
2b45e8 |
* .. Common blocks ..
|
|
kusano |
2b45e8 |
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
|
|
kusano |
2b45e8 |
* .. Data statements ..
|
|
kusano |
2b45e8 |
DATA L(1)/'CBLAS_CDOTC'/
|
|
kusano |
2b45e8 |
DATA L(2)/'CBLAS_CDOTU'/
|
|
kusano |
2b45e8 |
DATA L(3)/'CBLAS_CAXPY'/
|
|
kusano |
2b45e8 |
DATA L(4)/'CBLAS_CCOPY'/
|
|
kusano |
2b45e8 |
DATA L(5)/'CBLAS_CSWAP'/
|
|
kusano |
2b45e8 |
DATA L(6)/'CBLAS_SCNRM2'/
|
|
kusano |
2b45e8 |
DATA L(7)/'CBLAS_SCASUM'/
|
|
kusano |
2b45e8 |
DATA L(8)/'CBLAS_CSCAL'/
|
|
kusano |
2b45e8 |
DATA L(9)/'CBLAS_CSSCAL'/
|
|
kusano |
2b45e8 |
DATA L(10)/'CBLAS_ICAMAX'/
|
|
kusano |
2b45e8 |
* .. Executable Statements ..
|
|
kusano |
2b45e8 |
WRITE (NOUT,99999) ICASE, L(ICASE)
|
|
kusano |
2b45e8 |
RETURN
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
99999 FORMAT (/' Test of subprogram number',I3,9X,A15)
|
|
kusano |
2b45e8 |
END
|
|
kusano |
2b45e8 |
SUBROUTINE CHECK1(SFAC)
|
|
kusano |
2b45e8 |
* .. Parameters ..
|
|
kusano |
2b45e8 |
INTEGER NOUT
|
|
kusano |
2b45e8 |
PARAMETER (NOUT=6)
|
|
kusano |
2b45e8 |
* .. Scalar Arguments ..
|
|
kusano |
2b45e8 |
REAL SFAC
|
|
kusano |
2b45e8 |
* .. Scalars in Common ..
|
|
kusano |
2b45e8 |
INTEGER ICASE, INCX, INCY, MODE, N
|
|
kusano |
2b45e8 |
LOGICAL PASS
|
|
kusano |
2b45e8 |
* .. Local Scalars ..
|
|
kusano |
2b45e8 |
COMPLEX CA
|
|
kusano |
2b45e8 |
REAL SA
|
|
kusano |
2b45e8 |
INTEGER I, J, LEN, NP1
|
|
kusano |
2b45e8 |
* .. Local Arrays ..
|
|
kusano |
2b45e8 |
COMPLEX CTRUE5(8,5,2), CTRUE6(8,5,2), CV(8,5,2), CX(8),
|
|
kusano |
2b45e8 |
+ MWPCS(5), MWPCT(5)
|
|
kusano |
2b45e8 |
REAL STRUE2(5), STRUE4(5)
|
|
kusano |
2b45e8 |
INTEGER ITRUE3(5)
|
|
kusano |
2b45e8 |
* .. External Functions ..
|
|
kusano |
2b45e8 |
REAL SCASUMTEST, SCNRM2TEST
|
|
kusano |
2b45e8 |
INTEGER ICAMAXTEST
|
|
kusano |
2b45e8 |
EXTERNAL SCASUMTEST, SCNRM2TEST, ICAMAXTEST
|
|
kusano |
2b45e8 |
* .. External Subroutines ..
|
|
kusano |
2b45e8 |
EXTERNAL CSCAL, CSSCALTEST, CTEST, ITEST1, STEST1
|
|
kusano |
2b45e8 |
* .. Intrinsic Functions ..
|
|
kusano |
2b45e8 |
INTRINSIC MAX
|
|
kusano |
2b45e8 |
* .. Common blocks ..
|
|
kusano |
2b45e8 |
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
|
|
kusano |
2b45e8 |
* .. Data statements ..
|
|
kusano |
2b45e8 |
DATA SA, CA/0.3E0, (0.4E0,-0.7E0)/
|
|
kusano |
2b45e8 |
DATA ((CV(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0),
|
|
kusano |
2b45e8 |
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
|
|
kusano |
2b45e8 |
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
|
|
kusano |
2b45e8 |
+ (1.0E0,2.0E0), (0.3E0,-0.4E0), (3.0E0,4.0E0),
|
|
kusano |
2b45e8 |
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
|
|
kusano |
2b45e8 |
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
|
|
kusano |
2b45e8 |
+ (0.1E0,-0.3E0), (0.5E0,-0.1E0), (5.0E0,6.0E0),
|
|
kusano |
2b45e8 |
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),
|
|
kusano |
2b45e8 |
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (0.1E0,0.1E0),
|
|
kusano |
2b45e8 |
+ (-0.6E0,0.1E0), (0.1E0,-0.3E0), (7.0E0,8.0E0),
|
|
kusano |
2b45e8 |
+ (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0),
|
|
kusano |
2b45e8 |
+ (7.0E0,8.0E0), (0.3E0,0.1E0), (0.1E0,0.4E0),
|
|
kusano |
2b45e8 |
+ (0.4E0,0.1E0), (0.1E0,0.2E0), (2.0E0,3.0E0),
|
|
kusano |
2b45e8 |
+ (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0)/
|
|
kusano |
2b45e8 |
DATA ((CV(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0),
|
|
kusano |
2b45e8 |
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (4.0E0,5.0E0), (0.3E0,-0.4E0), (6.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (0.1E0,-0.3E0), (8.0E0,9.0E0), (0.5E0,-0.1E0),
|
|
kusano |
2b45e8 |
+ (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (2.0E0,5.0E0), (2.0E0,5.0E0), (0.1E0,0.1E0),
|
|
kusano |
2b45e8 |
+ (3.0E0,6.0E0), (-0.6E0,0.1E0), (4.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (0.1E0,-0.3E0), (7.0E0,2.0E0), (7.0E0,2.0E0),
|
|
kusano |
2b45e8 |
+ (7.0E0,2.0E0), (0.3E0,0.1E0), (5.0E0,8.0E0),
|
|
kusano |
2b45e8 |
+ (0.1E0,0.4E0), (6.0E0,9.0E0), (0.4E0,0.1E0),
|
|
kusano |
2b45e8 |
+ (8.0E0,3.0E0), (0.1E0,0.2E0), (9.0E0,4.0E0)/
|
|
kusano |
2b45e8 |
DATA STRUE2/0.0E0, 0.5E0, 0.6E0, 0.7E0, 0.7E0/
|
|
kusano |
2b45e8 |
DATA STRUE4/0.0E0, 0.7E0, 1.0E0, 1.3E0, 1.7E0/
|
|
kusano |
2b45e8 |
DATA ((CTRUE5(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0),
|
|
kusano |
2b45e8 |
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
|
|
kusano |
2b45e8 |
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
|
|
kusano |
2b45e8 |
+ (1.0E0,2.0E0), (-0.16E0,-0.37E0), (3.0E0,4.0E0),
|
|
kusano |
2b45e8 |
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
|
|
kusano |
2b45e8 |
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
|
|
kusano |
2b45e8 |
+ (-0.17E0,-0.19E0), (0.13E0,-0.39E0),
|
|
kusano |
2b45e8 |
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),
|
|
kusano |
2b45e8 |
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),
|
|
kusano |
2b45e8 |
+ (0.11E0,-0.03E0), (-0.17E0,0.46E0),
|
|
kusano |
2b45e8 |
+ (-0.17E0,-0.19E0), (7.0E0,8.0E0), (7.0E0,8.0E0),
|
|
kusano |
2b45e8 |
+ (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0),
|
|
kusano |
2b45e8 |
+ (0.19E0,-0.17E0), (0.32E0,0.09E0),
|
|
kusano |
2b45e8 |
+ (0.23E0,-0.24E0), (0.18E0,0.01E0),
|
|
kusano |
2b45e8 |
+ (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0),
|
|
kusano |
2b45e8 |
+ (2.0E0,3.0E0)/
|
|
kusano |
2b45e8 |
DATA ((CTRUE5(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0),
|
|
kusano |
2b45e8 |
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (4.0E0,5.0E0), (-0.16E0,-0.37E0), (6.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (-0.17E0,-0.19E0), (8.0E0,9.0E0),
|
|
kusano |
2b45e8 |
+ (0.13E0,-0.39E0), (2.0E0,5.0E0), (2.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (0.11E0,-0.03E0), (3.0E0,6.0E0),
|
|
kusano |
2b45e8 |
+ (-0.17E0,0.46E0), (4.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (-0.17E0,-0.19E0), (7.0E0,2.0E0), (7.0E0,2.0E0),
|
|
kusano |
2b45e8 |
+ (7.0E0,2.0E0), (0.19E0,-0.17E0), (5.0E0,8.0E0),
|
|
kusano |
2b45e8 |
+ (0.32E0,0.09E0), (6.0E0,9.0E0),
|
|
kusano |
2b45e8 |
+ (0.23E0,-0.24E0), (8.0E0,3.0E0),
|
|
kusano |
2b45e8 |
+ (0.18E0,0.01E0), (9.0E0,4.0E0)/
|
|
kusano |
2b45e8 |
DATA ((CTRUE6(I,J,1),I=1,8),J=1,5)/(0.1E0,0.1E0),
|
|
kusano |
2b45e8 |
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
|
|
kusano |
2b45e8 |
+ (1.0E0,2.0E0), (1.0E0,2.0E0), (1.0E0,2.0E0),
|
|
kusano |
2b45e8 |
+ (1.0E0,2.0E0), (0.09E0,-0.12E0), (3.0E0,4.0E0),
|
|
kusano |
2b45e8 |
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
|
|
kusano |
2b45e8 |
+ (3.0E0,4.0E0), (3.0E0,4.0E0), (3.0E0,4.0E0),
|
|
kusano |
2b45e8 |
+ (0.03E0,-0.09E0), (0.15E0,-0.03E0),
|
|
kusano |
2b45e8 |
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),
|
|
kusano |
2b45e8 |
+ (5.0E0,6.0E0), (5.0E0,6.0E0), (5.0E0,6.0E0),
|
|
kusano |
2b45e8 |
+ (0.03E0,0.03E0), (-0.18E0,0.03E0),
|
|
kusano |
2b45e8 |
+ (0.03E0,-0.09E0), (7.0E0,8.0E0), (7.0E0,8.0E0),
|
|
kusano |
2b45e8 |
+ (7.0E0,8.0E0), (7.0E0,8.0E0), (7.0E0,8.0E0),
|
|
kusano |
2b45e8 |
+ (0.09E0,0.03E0), (0.03E0,0.12E0),
|
|
kusano |
2b45e8 |
+ (0.12E0,0.03E0), (0.03E0,0.06E0), (2.0E0,3.0E0),
|
|
kusano |
2b45e8 |
+ (2.0E0,3.0E0), (2.0E0,3.0E0), (2.0E0,3.0E0)/
|
|
kusano |
2b45e8 |
DATA ((CTRUE6(I,J,2),I=1,8),J=1,5)/(0.1E0,0.1E0),
|
|
kusano |
2b45e8 |
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (4.0E0,5.0E0), (4.0E0,5.0E0), (4.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (4.0E0,5.0E0), (0.09E0,-0.12E0), (6.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (6.0E0,7.0E0), (6.0E0,7.0E0), (6.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (0.03E0,-0.09E0), (8.0E0,9.0E0),
|
|
kusano |
2b45e8 |
+ (0.15E0,-0.03E0), (2.0E0,5.0E0), (2.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (2.0E0,5.0E0), (2.0E0,5.0E0), (2.0E0,5.0E0),
|
|
kusano |
2b45e8 |
+ (0.03E0,0.03E0), (3.0E0,6.0E0),
|
|
kusano |
2b45e8 |
+ (-0.18E0,0.03E0), (4.0E0,7.0E0),
|
|
kusano |
2b45e8 |
+ (0.03E0,-0.09E0), (7.0E0,2.0E0), (7.0E0,2.0E0),
|
|
kusano |
2b45e8 |
+ (7.0E0,2.0E0), (0.09E0,0.03E0), (5.0E0,8.0E0),
|
|
kusano |
2b45e8 |
+ (0.03E0,0.12E0), (6.0E0,9.0E0), (0.12E0,0.03E0),
|
|
kusano |
2b45e8 |
+ (8.0E0,3.0E0), (0.03E0,0.06E0), (9.0E0,4.0E0)/
|
|
kusano |
2b45e8 |
DATA ITRUE3/0, 1, 2, 2, 2/
|
|
kusano |
2b45e8 |
* .. Executable Statements ..
|
|
kusano |
2b45e8 |
DO 60 INCX = 1, 2
|
|
kusano |
2b45e8 |
DO 40 NP1 = 1, 5
|
|
kusano |
2b45e8 |
N = NP1 - 1
|
|
kusano |
2b45e8 |
LEN = 2*MAX(N,1)
|
|
kusano |
2b45e8 |
* .. Set vector arguments ..
|
|
kusano |
2b45e8 |
DO 20 I = 1, LEN
|
|
kusano |
2b45e8 |
CX(I) = CV(I,NP1,INCX)
|
|
kusano |
2b45e8 |
20 CONTINUE
|
|
kusano |
2b45e8 |
IF (ICASE.EQ.6) THEN
|
|
kusano |
2b45e8 |
* .. SCNRM2TEST ..
|
|
kusano |
2b45e8 |
CALL STEST1(SCNRM2TEST(N,CX,INCX),STRUE2(NP1),
|
|
kusano |
2b45e8 |
+ STRUE2(NP1), SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.7) THEN
|
|
kusano |
2b45e8 |
* .. SCASUMTEST ..
|
|
kusano |
2b45e8 |
CALL STEST1(SCASUMTEST(N,CX,INCX),STRUE4(NP1),
|
|
kusano |
2b45e8 |
+ STRUE4(NP1),SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.8) THEN
|
|
kusano |
2b45e8 |
* .. CSCAL ..
|
|
kusano |
2b45e8 |
CALL CSCAL(N,CA,CX,INCX)
|
|
kusano |
2b45e8 |
CALL CTEST(LEN,CX,CTRUE5(1,NP1,INCX),CTRUE5(1,NP1,INCX),
|
|
kusano |
2b45e8 |
+ SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.9) THEN
|
|
kusano |
2b45e8 |
* .. CSSCALTEST ..
|
|
kusano |
2b45e8 |
CALL CSSCALTEST(N,SA,CX,INCX)
|
|
kusano |
2b45e8 |
CALL CTEST(LEN,CX,CTRUE6(1,NP1,INCX),CTRUE6(1,NP1,INCX),
|
|
kusano |
2b45e8 |
+ SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.10) THEN
|
|
kusano |
2b45e8 |
* .. ICAMAXTEST ..
|
|
kusano |
2b45e8 |
CALL ITEST1(ICAMAXTEST(N,CX,INCX),ITRUE3(NP1))
|
|
kusano |
2b45e8 |
ELSE
|
|
kusano |
2b45e8 |
WRITE (NOUT,*) ' Shouldn''t be here in CHECK1'
|
|
kusano |
2b45e8 |
STOP
|
|
kusano |
2b45e8 |
END IF
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
40 CONTINUE
|
|
kusano |
2b45e8 |
60 CONTINUE
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
INCX = 1
|
|
kusano |
2b45e8 |
IF (ICASE.EQ.8) THEN
|
|
kusano |
2b45e8 |
* CSCAL
|
|
kusano |
2b45e8 |
* Add a test for alpha equal to zero.
|
|
kusano |
2b45e8 |
CA = (0.0E0,0.0E0)
|
|
kusano |
2b45e8 |
DO 80 I = 1, 5
|
|
kusano |
2b45e8 |
MWPCT(I) = (0.0E0,0.0E0)
|
|
kusano |
2b45e8 |
MWPCS(I) = (1.0E0,1.0E0)
|
|
kusano |
2b45e8 |
80 CONTINUE
|
|
kusano |
2b45e8 |
CALL CSCAL(5,CA,CX,INCX)
|
|
kusano |
2b45e8 |
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.9) THEN
|
|
kusano |
2b45e8 |
* CSSCALTEST
|
|
kusano |
2b45e8 |
* Add a test for alpha equal to zero.
|
|
kusano |
2b45e8 |
SA = 0.0E0
|
|
kusano |
2b45e8 |
DO 100 I = 1, 5
|
|
kusano |
2b45e8 |
MWPCT(I) = (0.0E0,0.0E0)
|
|
kusano |
2b45e8 |
MWPCS(I) = (1.0E0,1.0E0)
|
|
kusano |
2b45e8 |
100 CONTINUE
|
|
kusano |
2b45e8 |
CALL CSSCALTEST(5,SA,CX,INCX)
|
|
kusano |
2b45e8 |
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
|
|
kusano |
2b45e8 |
* Add a test for alpha equal to one.
|
|
kusano |
2b45e8 |
SA = 1.0E0
|
|
kusano |
2b45e8 |
DO 120 I = 1, 5
|
|
kusano |
2b45e8 |
MWPCT(I) = CX(I)
|
|
kusano |
2b45e8 |
MWPCS(I) = CX(I)
|
|
kusano |
2b45e8 |
120 CONTINUE
|
|
kusano |
2b45e8 |
CALL CSSCALTEST(5,SA,CX,INCX)
|
|
kusano |
2b45e8 |
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
|
|
kusano |
2b45e8 |
* Add a test for alpha equal to minus one.
|
|
kusano |
2b45e8 |
SA = -1.0E0
|
|
kusano |
2b45e8 |
DO 140 I = 1, 5
|
|
kusano |
2b45e8 |
MWPCT(I) = -CX(I)
|
|
kusano |
2b45e8 |
MWPCS(I) = -CX(I)
|
|
kusano |
2b45e8 |
140 CONTINUE
|
|
kusano |
2b45e8 |
CALL CSSCALTEST(5,SA,CX,INCX)
|
|
kusano |
2b45e8 |
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
|
|
kusano |
2b45e8 |
END IF
|
|
kusano |
2b45e8 |
RETURN
|
|
kusano |
2b45e8 |
END
|
|
kusano |
2b45e8 |
SUBROUTINE CHECK2(SFAC)
|
|
kusano |
2b45e8 |
* .. Parameters ..
|
|
kusano |
2b45e8 |
INTEGER NOUT
|
|
kusano |
2b45e8 |
PARAMETER (NOUT=6)
|
|
kusano |
2b45e8 |
* .. Scalar Arguments ..
|
|
kusano |
2b45e8 |
REAL SFAC
|
|
kusano |
2b45e8 |
* .. Scalars in Common ..
|
|
kusano |
2b45e8 |
INTEGER ICASE, INCX, INCY, MODE, N
|
|
kusano |
2b45e8 |
LOGICAL PASS
|
|
kusano |
2b45e8 |
* .. Local Scalars ..
|
|
kusano |
2b45e8 |
COMPLEX CA,CTEMP
|
|
kusano |
2b45e8 |
INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY
|
|
kusano |
2b45e8 |
* .. Local Arrays ..
|
|
kusano |
2b45e8 |
COMPLEX CDOT(1), CSIZE1(4), CSIZE2(7,2), CSIZE3(14),
|
|
kusano |
2b45e8 |
+ CT10X(7,4,4), CT10Y(7,4,4), CT6(4,4), CT7(4,4),
|
|
kusano |
2b45e8 |
+ CT8(7,4,4), CX(7), CX1(7), CY(7), CY1(7)
|
|
kusano |
2b45e8 |
INTEGER INCXS(4), INCYS(4), LENS(4,2), NS(4)
|
|
kusano |
2b45e8 |
* .. External Functions ..
|
|
kusano |
2b45e8 |
EXTERNAL CDOTCTEST, CDOTUTEST
|
|
kusano |
2b45e8 |
* .. External Subroutines ..
|
|
kusano |
2b45e8 |
EXTERNAL CAXPYTEST, CCOPYTEST, CSWAPTEST, CTEST
|
|
kusano |
2b45e8 |
* .. Intrinsic Functions ..
|
|
kusano |
2b45e8 |
INTRINSIC ABS, MIN
|
|
kusano |
2b45e8 |
* .. Common blocks ..
|
|
kusano |
2b45e8 |
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
|
|
kusano |
2b45e8 |
* .. Data statements ..
|
|
kusano |
2b45e8 |
DATA CA/(0.4E0,-0.7E0)/
|
|
kusano |
2b45e8 |
DATA INCXS/1, 2, -2, -1/
|
|
kusano |
2b45e8 |
DATA INCYS/1, -2, 1, -2/
|
|
kusano |
2b45e8 |
DATA LENS/1, 1, 2, 4, 1, 1, 3, 7/
|
|
kusano |
2b45e8 |
DATA NS/0, 1, 2, 4/
|
|
kusano |
2b45e8 |
DATA CX1/(0.7E0,-0.8E0), (-0.4E0,-0.7E0),
|
|
kusano |
2b45e8 |
+ (-0.1E0,-0.9E0), (0.2E0,-0.8E0),
|
|
kusano |
2b45e8 |
+ (-0.9E0,-0.4E0), (0.1E0,0.4E0), (-0.6E0,0.6E0)/
|
|
kusano |
2b45e8 |
DATA CY1/(0.6E0,-0.6E0), (-0.9E0,0.5E0),
|
|
kusano |
2b45e8 |
+ (0.7E0,-0.6E0), (0.1E0,-0.5E0), (-0.1E0,-0.2E0),
|
|
kusano |
2b45e8 |
+ (-0.5E0,-0.3E0), (0.8E0,-0.7E0)/
|
|
kusano |
2b45e8 |
DATA ((CT8(I,J,1),I=1,7),J=1,4)/(0.6E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.32E0,-1.41E0),
|
|
kusano |
2b45e8 |
+ (-1.55E0,0.5E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.32E0,-1.41E0), (-1.55E0,0.5E0),
|
|
kusano |
2b45e8 |
+ (0.03E0,-0.89E0), (-0.38E0,-0.96E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/
|
|
kusano |
2b45e8 |
DATA ((CT8(I,J,2),I=1,7),J=1,4)/(0.6E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (-0.07E0,-0.89E0),
|
|
kusano |
2b45e8 |
+ (-0.9E0,0.5E0), (0.42E0,-1.41E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.78E0,0.06E0), (-0.9E0,0.5E0),
|
|
kusano |
2b45e8 |
+ (0.06E0,-0.13E0), (0.1E0,-0.5E0),
|
|
kusano |
2b45e8 |
+ (-0.77E0,-0.49E0), (-0.5E0,-0.3E0),
|
|
kusano |
2b45e8 |
+ (0.52E0,-1.51E0)/
|
|
kusano |
2b45e8 |
DATA ((CT8(I,J,3),I=1,7),J=1,4)/(0.6E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (-0.07E0,-0.89E0),
|
|
kusano |
2b45e8 |
+ (-1.18E0,-0.31E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.78E0,0.06E0), (-1.54E0,0.97E0),
|
|
kusano |
2b45e8 |
+ (0.03E0,-0.89E0), (-0.18E0,-1.31E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/
|
|
kusano |
2b45e8 |
DATA ((CT8(I,J,4),I=1,7),J=1,4)/(0.6E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.32E0,-1.41E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.32E0,-1.41E0), (-0.9E0,0.5E0),
|
|
kusano |
2b45e8 |
+ (0.05E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.32E0,-1.41E0),
|
|
kusano |
2b45e8 |
+ (-0.9E0,0.5E0), (0.05E0,-0.6E0), (0.1E0,-0.5E0),
|
|
kusano |
2b45e8 |
+ (-0.77E0,-0.49E0), (-0.5E0,-0.3E0),
|
|
kusano |
2b45e8 |
+ (0.32E0,-1.16E0)/
|
|
kusano |
2b45e8 |
DATA CT7/(0.0E0,0.0E0), (-0.06E0,-0.90E0),
|
|
kusano |
2b45e8 |
+ (0.65E0,-0.47E0), (-0.34E0,-1.22E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (-0.06E0,-0.90E0),
|
|
kusano |
2b45e8 |
+ (-0.59E0,-1.46E0), (-1.04E0,-0.04E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (-0.06E0,-0.90E0),
|
|
kusano |
2b45e8 |
+ (-0.83E0,0.59E0), (0.07E0,-0.37E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (-0.06E0,-0.90E0),
|
|
kusano |
2b45e8 |
+ (-0.76E0,-1.15E0), (-1.33E0,-1.82E0)/
|
|
kusano |
2b45e8 |
DATA CT6/(0.0E0,0.0E0), (0.90E0,0.06E0),
|
|
kusano |
2b45e8 |
+ (0.91E0,-0.77E0), (1.80E0,-0.10E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.90E0,0.06E0), (1.45E0,0.74E0),
|
|
kusano |
2b45e8 |
+ (0.20E0,0.90E0), (0.0E0,0.0E0), (0.90E0,0.06E0),
|
|
kusano |
2b45e8 |
+ (-0.55E0,0.23E0), (0.83E0,-0.39E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.90E0,0.06E0), (1.04E0,0.79E0),
|
|
kusano |
2b45e8 |
+ (1.95E0,1.22E0)/
|
|
kusano |
2b45e8 |
DATA ((CT10X(I,J,1),I=1,7),J=1,4)/(0.7E0,-0.8E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.6E0,-0.6E0), (-0.9E0,0.5E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.6E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (-0.9E0,0.5E0), (0.7E0,-0.6E0), (0.1E0,-0.5E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/
|
|
kusano |
2b45e8 |
DATA ((CT10X(I,J,2),I=1,7),J=1,4)/(0.7E0,-0.8E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.7E0,-0.6E0), (-0.4E0,-0.7E0),
|
|
kusano |
2b45e8 |
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.8E0,-0.7E0),
|
|
kusano |
2b45e8 |
+ (-0.4E0,-0.7E0), (-0.1E0,-0.2E0),
|
|
kusano |
2b45e8 |
+ (0.2E0,-0.8E0), (0.7E0,-0.6E0), (0.1E0,0.4E0),
|
|
kusano |
2b45e8 |
+ (0.6E0,-0.6E0)/
|
|
kusano |
2b45e8 |
DATA ((CT10X(I,J,3),I=1,7),J=1,4)/(0.7E0,-0.8E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (-0.9E0,0.5E0), (-0.4E0,-0.7E0),
|
|
kusano |
2b45e8 |
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.1E0,-0.5E0),
|
|
kusano |
2b45e8 |
+ (-0.4E0,-0.7E0), (0.7E0,-0.6E0), (0.2E0,-0.8E0),
|
|
kusano |
2b45e8 |
+ (-0.9E0,0.5E0), (0.1E0,0.4E0), (0.6E0,-0.6E0)/
|
|
kusano |
2b45e8 |
DATA ((CT10X(I,J,4),I=1,7),J=1,4)/(0.7E0,-0.8E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.6E0,-0.6E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.6E0,-0.6E0), (0.7E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.6E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (0.7E0,-0.6E0), (-0.1E0,-0.2E0), (0.8E0,-0.7E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0)/
|
|
kusano |
2b45e8 |
DATA ((CT10Y(I,J,1),I=1,7),J=1,4)/(0.6E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.7E0,-0.8E0), (-0.4E0,-0.7E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.7E0,-0.8E0),
|
|
kusano |
2b45e8 |
+ (-0.4E0,-0.7E0), (-0.1E0,-0.9E0),
|
|
kusano |
2b45e8 |
+ (0.2E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0)/
|
|
kusano |
2b45e8 |
DATA ((CT10Y(I,J,2),I=1,7),J=1,4)/(0.6E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (-0.1E0,-0.9E0), (-0.9E0,0.5E0),
|
|
kusano |
2b45e8 |
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (-0.6E0,0.6E0),
|
|
kusano |
2b45e8 |
+ (-0.9E0,0.5E0), (-0.9E0,-0.4E0), (0.1E0,-0.5E0),
|
|
kusano |
2b45e8 |
+ (-0.1E0,-0.9E0), (-0.5E0,-0.3E0),
|
|
kusano |
2b45e8 |
+ (0.7E0,-0.8E0)/
|
|
kusano |
2b45e8 |
DATA ((CT10Y(I,J,3),I=1,7),J=1,4)/(0.6E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (-0.1E0,-0.9E0), (0.7E0,-0.8E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (-0.6E0,0.6E0),
|
|
kusano |
2b45e8 |
+ (-0.9E0,-0.4E0), (-0.1E0,-0.9E0),
|
|
kusano |
2b45e8 |
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0)/
|
|
kusano |
2b45e8 |
DATA ((CT10Y(I,J,4),I=1,7),J=1,4)/(0.6E0,-0.6E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.7E0,-0.8E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.7E0,-0.8E0), (-0.9E0,0.5E0),
|
|
kusano |
2b45e8 |
+ (-0.4E0,-0.7E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.7E0,-0.8E0),
|
|
kusano |
2b45e8 |
+ (-0.9E0,0.5E0), (-0.4E0,-0.7E0), (0.1E0,-0.5E0),
|
|
kusano |
2b45e8 |
+ (-0.1E0,-0.9E0), (-0.5E0,-0.3E0),
|
|
kusano |
2b45e8 |
+ (0.2E0,-0.8E0)/
|
|
kusano |
2b45e8 |
DATA CSIZE1/(0.0E0,0.0E0), (0.9E0,0.9E0),
|
|
kusano |
2b45e8 |
+ (1.63E0,1.73E0), (2.90E0,2.78E0)/
|
|
kusano |
2b45e8 |
DATA CSIZE3/(0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (1.17E0,1.17E0),
|
|
kusano |
2b45e8 |
+ (1.17E0,1.17E0), (1.17E0,1.17E0),
|
|
kusano |
2b45e8 |
+ (1.17E0,1.17E0), (1.17E0,1.17E0),
|
|
kusano |
2b45e8 |
+ (1.17E0,1.17E0), (1.17E0,1.17E0)/
|
|
kusano |
2b45e8 |
DATA CSIZE2/(0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (0.0E0,0.0E0),
|
|
kusano |
2b45e8 |
+ (0.0E0,0.0E0), (0.0E0,0.0E0), (1.54E0,1.54E0),
|
|
kusano |
2b45e8 |
+ (1.54E0,1.54E0), (1.54E0,1.54E0),
|
|
kusano |
2b45e8 |
+ (1.54E0,1.54E0), (1.54E0,1.54E0),
|
|
kusano |
2b45e8 |
+ (1.54E0,1.54E0), (1.54E0,1.54E0)/
|
|
kusano |
2b45e8 |
* .. Executable Statements ..
|
|
kusano |
2b45e8 |
DO 60 KI = 1, 4
|
|
kusano |
2b45e8 |
INCX = INCXS(KI)
|
|
kusano |
2b45e8 |
INCY = INCYS(KI)
|
|
kusano |
2b45e8 |
MX = ABS(INCX)
|
|
kusano |
2b45e8 |
MY = ABS(INCY)
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
DO 40 KN = 1, 4
|
|
kusano |
2b45e8 |
N = NS(KN)
|
|
kusano |
2b45e8 |
KSIZE = MIN(2,KN)
|
|
kusano |
2b45e8 |
LENX = LENS(KN,MX)
|
|
kusano |
2b45e8 |
LENY = LENS(KN,MY)
|
|
kusano |
2b45e8 |
* .. initialize all argument arrays ..
|
|
kusano |
2b45e8 |
DO 20 I = 1, 7
|
|
kusano |
2b45e8 |
CX(I) = CX1(I)
|
|
kusano |
2b45e8 |
CY(I) = CY1(I)
|
|
kusano |
2b45e8 |
20 CONTINUE
|
|
kusano |
2b45e8 |
IF (ICASE.EQ.1) THEN
|
|
kusano |
2b45e8 |
* .. CDOTCTEST ..
|
|
kusano |
2b45e8 |
CALL CDOTCTEST(N,CX,INCX,CY,INCY,CTEMP)
|
|
kusano |
2b45e8 |
CDOT(1) = CTEMP
|
|
kusano |
2b45e8 |
CALL CTEST(1,CDOT,CT6(KN,KI),CSIZE1(KN),SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.2) THEN
|
|
kusano |
2b45e8 |
* .. CDOTUTEST ..
|
|
kusano |
2b45e8 |
CALL CDOTUTEST(N,CX,INCX,CY,INCY,CTEMP)
|
|
kusano |
2b45e8 |
CDOT(1) = CTEMP
|
|
kusano |
2b45e8 |
CALL CTEST(1,CDOT,CT7(KN,KI),CSIZE1(KN),SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.3) THEN
|
|
kusano |
2b45e8 |
* .. CAXPYTEST ..
|
|
kusano |
2b45e8 |
CALL CAXPYTEST(N,CA,CX,INCX,CY,INCY)
|
|
kusano |
2b45e8 |
CALL CTEST(LENY,CY,CT8(1,KN,KI),CSIZE2(1,KSIZE),SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.4) THEN
|
|
kusano |
2b45e8 |
* .. CCOPYTEST ..
|
|
kusano |
2b45e8 |
CALL CCOPYTEST(N,CX,INCX,CY,INCY)
|
|
kusano |
2b45e8 |
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0E0)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.5) THEN
|
|
kusano |
2b45e8 |
* .. CSWAPTEST ..
|
|
kusano |
2b45e8 |
CALL CSWAPTEST(N,CX,INCX,CY,INCY)
|
|
kusano |
2b45e8 |
CALL CTEST(LENX,CX,CT10X(1,KN,KI),CSIZE3,1.0E0)
|
|
kusano |
2b45e8 |
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0E0)
|
|
kusano |
2b45e8 |
ELSE
|
|
kusano |
2b45e8 |
WRITE (NOUT,*) ' Shouldn''t be here in CHECK2'
|
|
kusano |
2b45e8 |
STOP
|
|
kusano |
2b45e8 |
END IF
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
40 CONTINUE
|
|
kusano |
2b45e8 |
60 CONTINUE
|
|
kusano |
2b45e8 |
RETURN
|
|
kusano |
2b45e8 |
END
|
|
kusano |
2b45e8 |
SUBROUTINE STEST(LEN,SCOMP,STRUE,SSIZE,SFAC)
|
|
kusano |
2b45e8 |
* ********************************* STEST **************************
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO
|
|
kusano |
2b45e8 |
* SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
|
|
kusano |
2b45e8 |
* NEGLIGIBLE.
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* C. L. LAWSON, JPL, 1974 DEC 10
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* .. Parameters ..
|
|
kusano |
2b45e8 |
INTEGER NOUT
|
|
kusano |
2b45e8 |
PARAMETER (NOUT=6)
|
|
kusano |
2b45e8 |
* .. Scalar Arguments ..
|
|
kusano |
2b45e8 |
REAL SFAC
|
|
kusano |
2b45e8 |
INTEGER LEN
|
|
kusano |
2b45e8 |
* .. Array Arguments ..
|
|
kusano |
2b45e8 |
REAL SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
|
|
kusano |
2b45e8 |
* .. Scalars in Common ..
|
|
kusano |
2b45e8 |
INTEGER ICASE, INCX, INCY, MODE, N
|
|
kusano |
2b45e8 |
LOGICAL PASS
|
|
kusano |
2b45e8 |
* .. Local Scalars ..
|
|
kusano |
2b45e8 |
REAL SD
|
|
kusano |
2b45e8 |
INTEGER I
|
|
kusano |
2b45e8 |
* .. External Functions ..
|
|
kusano |
2b45e8 |
REAL SDIFF
|
|
kusano |
2b45e8 |
EXTERNAL SDIFF
|
|
kusano |
2b45e8 |
* .. Intrinsic Functions ..
|
|
kusano |
2b45e8 |
INTRINSIC ABS
|
|
kusano |
2b45e8 |
* .. Common blocks ..
|
|
kusano |
2b45e8 |
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
|
|
kusano |
2b45e8 |
* .. Executable Statements ..
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
DO 40 I = 1, LEN
|
|
kusano |
2b45e8 |
SD = SCOMP(I) - STRUE(I)
|
|
kusano |
2b45e8 |
IF (SDIFF(ABS(SSIZE(I))+ABS(SFAC*SD),ABS(SSIZE(I))).EQ.0.0E0)
|
|
kusano |
2b45e8 |
+ GO TO 40
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* HERE SCOMP(I) IS NOT CLOSE TO STRUE(I).
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
IF ( .NOT. PASS) GO TO 20
|
|
kusano |
2b45e8 |
* PRINT FAIL MESSAGE AND HEADER.
|
|
kusano |
2b45e8 |
PASS = .FALSE.
|
|
kusano |
2b45e8 |
WRITE (NOUT,99999)
|
|
kusano |
2b45e8 |
WRITE (NOUT,99998)
|
|
kusano |
2b45e8 |
20 WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, I, SCOMP(I),
|
|
kusano |
2b45e8 |
+ STRUE(I), SD, SSIZE(I)
|
|
kusano |
2b45e8 |
40 CONTINUE
|
|
kusano |
2b45e8 |
RETURN
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
99999 FORMAT (' FAIL')
|
|
kusano |
2b45e8 |
99998 FORMAT (/' CASE N INCX INCY MODE I ',
|
|
kusano |
2b45e8 |
+ ' COMP(I) TRUE(I) DIFFERENCE',
|
|
kusano |
2b45e8 |
+ ' SIZE(I)',/1X)
|
|
kusano |
2b45e8 |
99997 FORMAT (1X,I4,I3,3I5,I3,2E36.8,2E12.4)
|
|
kusano |
2b45e8 |
END
|
|
kusano |
2b45e8 |
SUBROUTINE STEST1(SCOMP1,STRUE1,SSIZE,SFAC)
|
|
kusano |
2b45e8 |
* ************************* STEST1 *****************************
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* THIS IS AN INTERFACE SUBROUTINE TO ACCOMODATE THE FORTRAN
|
|
kusano |
2b45e8 |
* REQUIREMENT THAT WHEN A DUMMY ARGUMENT IS AN ARRAY, THE
|
|
kusano |
2b45e8 |
* ACTUAL ARGUMENT MUST ALSO BE AN ARRAY OR AN ARRAY ELEMENT.
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* C.L. LAWSON, JPL, 1978 DEC 6
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* .. Scalar Arguments ..
|
|
kusano |
2b45e8 |
REAL SCOMP1, SFAC, STRUE1
|
|
kusano |
2b45e8 |
* .. Array Arguments ..
|
|
kusano |
2b45e8 |
REAL SSIZE(*)
|
|
kusano |
2b45e8 |
* .. Local Arrays ..
|
|
kusano |
2b45e8 |
REAL SCOMP(1), STRUE(1)
|
|
kusano |
2b45e8 |
* .. External Subroutines ..
|
|
kusano |
2b45e8 |
EXTERNAL STEST
|
|
kusano |
2b45e8 |
* .. Executable Statements ..
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
SCOMP(1) = SCOMP1
|
|
kusano |
2b45e8 |
STRUE(1) = STRUE1
|
|
kusano |
2b45e8 |
CALL STEST(1,SCOMP,STRUE,SSIZE,SFAC)
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
RETURN
|
|
kusano |
2b45e8 |
END
|
|
kusano |
2b45e8 |
REAL FUNCTION SDIFF(SA,SB)
|
|
kusano |
2b45e8 |
* ********************************* SDIFF **************************
|
|
kusano |
2b45e8 |
* COMPUTES DIFFERENCE OF TWO NUMBERS. C. L. LAWSON, JPL 1974 FEB 15
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* .. Scalar Arguments ..
|
|
kusano |
2b45e8 |
REAL SA, SB
|
|
kusano |
2b45e8 |
* .. Executable Statements ..
|
|
kusano |
2b45e8 |
SDIFF = SA - SB
|
|
kusano |
2b45e8 |
RETURN
|
|
kusano |
2b45e8 |
END
|
|
kusano |
2b45e8 |
SUBROUTINE CTEST(LEN,CCOMP,CTRUE,CSIZE,SFAC)
|
|
kusano |
2b45e8 |
* **************************** CTEST *****************************
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* C.L. LAWSON, JPL, 1978 DEC 6
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* .. Scalar Arguments ..
|
|
kusano |
2b45e8 |
REAL SFAC
|
|
kusano |
2b45e8 |
INTEGER LEN
|
|
kusano |
2b45e8 |
* .. Array Arguments ..
|
|
kusano |
2b45e8 |
COMPLEX CCOMP(LEN), CSIZE(LEN), CTRUE(LEN)
|
|
kusano |
2b45e8 |
* .. Local Scalars ..
|
|
kusano |
2b45e8 |
INTEGER I
|
|
kusano |
2b45e8 |
* .. Local Arrays ..
|
|
kusano |
2b45e8 |
REAL SCOMP(20), SSIZE(20), STRUE(20)
|
|
kusano |
2b45e8 |
* .. External Subroutines ..
|
|
kusano |
2b45e8 |
EXTERNAL STEST
|
|
kusano |
2b45e8 |
* .. Intrinsic Functions ..
|
|
kusano |
2b45e8 |
INTRINSIC AIMAG, REAL
|
|
kusano |
2b45e8 |
* .. Executable Statements ..
|
|
kusano |
2b45e8 |
DO 20 I = 1, LEN
|
|
kusano |
2b45e8 |
SCOMP(2*I-1) = REAL(CCOMP(I))
|
|
kusano |
2b45e8 |
SCOMP(2*I) = AIMAG(CCOMP(I))
|
|
kusano |
2b45e8 |
STRUE(2*I-1) = REAL(CTRUE(I))
|
|
kusano |
2b45e8 |
STRUE(2*I) = AIMAG(CTRUE(I))
|
|
kusano |
2b45e8 |
SSIZE(2*I-1) = REAL(CSIZE(I))
|
|
kusano |
2b45e8 |
SSIZE(2*I) = AIMAG(CSIZE(I))
|
|
kusano |
2b45e8 |
20 CONTINUE
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
CALL STEST(2*LEN,SCOMP,STRUE,SSIZE,SFAC)
|
|
kusano |
2b45e8 |
RETURN
|
|
kusano |
2b45e8 |
END
|
|
kusano |
2b45e8 |
SUBROUTINE ITEST1(ICOMP,ITRUE)
|
|
kusano |
2b45e8 |
* ********************************* ITEST1 *************************
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* THIS SUBROUTINE COMPARES THE VARIABLES ICOMP AND ITRUE FOR
|
|
kusano |
2b45e8 |
* EQUALITY.
|
|
kusano |
2b45e8 |
* C. L. LAWSON, JPL, 1974 DEC 10
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* .. Parameters ..
|
|
kusano |
2b45e8 |
INTEGER NOUT
|
|
kusano |
2b45e8 |
PARAMETER (NOUT=6)
|
|
kusano |
2b45e8 |
* .. Scalar Arguments ..
|
|
kusano |
2b45e8 |
INTEGER ICOMP, ITRUE
|
|
kusano |
2b45e8 |
* .. Scalars in Common ..
|
|
kusano |
2b45e8 |
INTEGER ICASE, INCX, INCY, MODE, N
|
|
kusano |
2b45e8 |
LOGICAL PASS
|
|
kusano |
2b45e8 |
* .. Local Scalars ..
|
|
kusano |
2b45e8 |
INTEGER ID
|
|
kusano |
2b45e8 |
* .. Common blocks ..
|
|
kusano |
2b45e8 |
COMMON /COMBLA/ICASE, N, INCX, INCY, MODE, PASS
|
|
kusano |
2b45e8 |
* .. Executable Statements ..
|
|
kusano |
2b45e8 |
IF (ICOMP.EQ.ITRUE) GO TO 40
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* HERE ICOMP IS NOT EQUAL TO ITRUE.
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
IF ( .NOT. PASS) GO TO 20
|
|
kusano |
2b45e8 |
* PRINT FAIL MESSAGE AND HEADER.
|
|
kusano |
2b45e8 |
PASS = .FALSE.
|
|
kusano |
2b45e8 |
WRITE (NOUT,99999)
|
|
kusano |
2b45e8 |
WRITE (NOUT,99998)
|
|
kusano |
2b45e8 |
20 ID = ICOMP - ITRUE
|
|
kusano |
2b45e8 |
WRITE (NOUT,99997) ICASE, N, INCX, INCY, MODE, ICOMP, ITRUE, ID
|
|
kusano |
2b45e8 |
40 CONTINUE
|
|
kusano |
2b45e8 |
RETURN
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
99999 FORMAT (' FAIL')
|
|
kusano |
2b45e8 |
99998 FORMAT (/' CASE N INCX INCY MODE ',
|
|
kusano |
2b45e8 |
+ ' COMP TRUE DIFFERENCE',
|
|
kusano |
2b45e8 |
+ /1X)
|
|
kusano |
2b45e8 |
99997 FORMAT (1X,I4,I3,3I5,2I36,I12)
|
|
kusano |
2b45e8 |
END
|