|
kusano |
2b45e8 |
PROGRAM ZCBLAT1
|
|
kusano |
2b45e8 |
* Test program for the COMPLEX*16 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 |
DOUBLE PRECISION 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.765625D-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_ZDOTC'/
|
|
kusano |
2b45e8 |
DATA L(2)/'CBLAS_ZDOTU'/
|
|
kusano |
2b45e8 |
DATA L(3)/'CBLAS_ZAXPY'/
|
|
kusano |
2b45e8 |
DATA L(4)/'CBLAS_ZCOPY'/
|
|
kusano |
2b45e8 |
DATA L(5)/'CBLAS_ZSWAP'/
|
|
kusano |
2b45e8 |
DATA L(6)/'CBLAS_DZNRM2'/
|
|
kusano |
2b45e8 |
DATA L(7)/'CBLAS_DZASUM'/
|
|
kusano |
2b45e8 |
DATA L(8)/'CBLAS_ZSCAL'/
|
|
kusano |
2b45e8 |
DATA L(9)/'CBLAS_ZDSCAL'/
|
|
kusano |
2b45e8 |
DATA L(10)/'CBLAS_IZAMAX'/
|
|
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 |
DOUBLE PRECISION 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*16 CA
|
|
kusano |
2b45e8 |
DOUBLE PRECISION SA
|
|
kusano |
2b45e8 |
INTEGER I, J, LEN, NP1
|
|
kusano |
2b45e8 |
* .. Local Arrays ..
|
|
kusano |
2b45e8 |
COMPLEX*16 CTRUE5(8,5,2), CTRUE6(8,5,2), CV(8,5,2), CX(8),
|
|
kusano |
2b45e8 |
+ MWPCS(5), MWPCT(5)
|
|
kusano |
2b45e8 |
DOUBLE PRECISION STRUE2(5), STRUE4(5)
|
|
kusano |
2b45e8 |
INTEGER ITRUE3(5)
|
|
kusano |
2b45e8 |
* .. External Functions ..
|
|
kusano |
2b45e8 |
DOUBLE PRECISION DZASUMTEST, DZNRM2TEST
|
|
kusano |
2b45e8 |
INTEGER IZAMAXTEST
|
|
kusano |
2b45e8 |
EXTERNAL DZASUMTEST, DZNRM2TEST, IZAMAXTEST
|
|
kusano |
2b45e8 |
* .. External Subroutines ..
|
|
kusano |
2b45e8 |
EXTERNAL ZSCALTEST, ZDSCALTEST, 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.3D0, (0.4D0,-0.7D0)/
|
|
kusano |
2b45e8 |
DATA ((CV(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0),
|
|
kusano |
2b45e8 |
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
|
|
kusano |
2b45e8 |
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
|
|
kusano |
2b45e8 |
+ (1.0D0,2.0D0), (0.3D0,-0.4D0), (3.0D0,4.0D0),
|
|
kusano |
2b45e8 |
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
|
|
kusano |
2b45e8 |
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
|
|
kusano |
2b45e8 |
+ (0.1D0,-0.3D0), (0.5D0,-0.1D0), (5.0D0,6.0D0),
|
|
kusano |
2b45e8 |
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),
|
|
kusano |
2b45e8 |
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (0.1D0,0.1D0),
|
|
kusano |
2b45e8 |
+ (-0.6D0,0.1D0), (0.1D0,-0.3D0), (7.0D0,8.0D0),
|
|
kusano |
2b45e8 |
+ (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0),
|
|
kusano |
2b45e8 |
+ (7.0D0,8.0D0), (0.3D0,0.1D0), (0.1D0,0.4D0),
|
|
kusano |
2b45e8 |
+ (0.4D0,0.1D0), (0.1D0,0.2D0), (2.0D0,3.0D0),
|
|
kusano |
2b45e8 |
+ (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0)/
|
|
kusano |
2b45e8 |
DATA ((CV(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0),
|
|
kusano |
2b45e8 |
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (4.0D0,5.0D0), (0.3D0,-0.4D0), (6.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (0.1D0,-0.3D0), (8.0D0,9.0D0), (0.5D0,-0.1D0),
|
|
kusano |
2b45e8 |
+ (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (2.0D0,5.0D0), (2.0D0,5.0D0), (0.1D0,0.1D0),
|
|
kusano |
2b45e8 |
+ (3.0D0,6.0D0), (-0.6D0,0.1D0), (4.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (0.1D0,-0.3D0), (7.0D0,2.0D0), (7.0D0,2.0D0),
|
|
kusano |
2b45e8 |
+ (7.0D0,2.0D0), (0.3D0,0.1D0), (5.0D0,8.0D0),
|
|
kusano |
2b45e8 |
+ (0.1D0,0.4D0), (6.0D0,9.0D0), (0.4D0,0.1D0),
|
|
kusano |
2b45e8 |
+ (8.0D0,3.0D0), (0.1D0,0.2D0), (9.0D0,4.0D0)/
|
|
kusano |
2b45e8 |
DATA STRUE2/0.0D0, 0.5D0, 0.6D0, 0.7D0, 0.7D0/
|
|
kusano |
2b45e8 |
DATA STRUE4/0.0D0, 0.7D0, 1.0D0, 1.3D0, 1.7D0/
|
|
kusano |
2b45e8 |
DATA ((CTRUE5(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0),
|
|
kusano |
2b45e8 |
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
|
|
kusano |
2b45e8 |
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
|
|
kusano |
2b45e8 |
+ (1.0D0,2.0D0), (-0.16D0,-0.37D0), (3.0D0,4.0D0),
|
|
kusano |
2b45e8 |
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
|
|
kusano |
2b45e8 |
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
|
|
kusano |
2b45e8 |
+ (-0.17D0,-0.19D0), (0.13D0,-0.39D0),
|
|
kusano |
2b45e8 |
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),
|
|
kusano |
2b45e8 |
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),
|
|
kusano |
2b45e8 |
+ (0.11D0,-0.03D0), (-0.17D0,0.46D0),
|
|
kusano |
2b45e8 |
+ (-0.17D0,-0.19D0), (7.0D0,8.0D0), (7.0D0,8.0D0),
|
|
kusano |
2b45e8 |
+ (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0),
|
|
kusano |
2b45e8 |
+ (0.19D0,-0.17D0), (0.32D0,0.09D0),
|
|
kusano |
2b45e8 |
+ (0.23D0,-0.24D0), (0.18D0,0.01D0),
|
|
kusano |
2b45e8 |
+ (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0),
|
|
kusano |
2b45e8 |
+ (2.0D0,3.0D0)/
|
|
kusano |
2b45e8 |
DATA ((CTRUE5(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0),
|
|
kusano |
2b45e8 |
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (4.0D0,5.0D0), (-0.16D0,-0.37D0), (6.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (-0.17D0,-0.19D0), (8.0D0,9.0D0),
|
|
kusano |
2b45e8 |
+ (0.13D0,-0.39D0), (2.0D0,5.0D0), (2.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (0.11D0,-0.03D0), (3.0D0,6.0D0),
|
|
kusano |
2b45e8 |
+ (-0.17D0,0.46D0), (4.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (-0.17D0,-0.19D0), (7.0D0,2.0D0), (7.0D0,2.0D0),
|
|
kusano |
2b45e8 |
+ (7.0D0,2.0D0), (0.19D0,-0.17D0), (5.0D0,8.0D0),
|
|
kusano |
2b45e8 |
+ (0.32D0,0.09D0), (6.0D0,9.0D0),
|
|
kusano |
2b45e8 |
+ (0.23D0,-0.24D0), (8.0D0,3.0D0),
|
|
kusano |
2b45e8 |
+ (0.18D0,0.01D0), (9.0D0,4.0D0)/
|
|
kusano |
2b45e8 |
DATA ((CTRUE6(I,J,1),I=1,8),J=1,5)/(0.1D0,0.1D0),
|
|
kusano |
2b45e8 |
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
|
|
kusano |
2b45e8 |
+ (1.0D0,2.0D0), (1.0D0,2.0D0), (1.0D0,2.0D0),
|
|
kusano |
2b45e8 |
+ (1.0D0,2.0D0), (0.09D0,-0.12D0), (3.0D0,4.0D0),
|
|
kusano |
2b45e8 |
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
|
|
kusano |
2b45e8 |
+ (3.0D0,4.0D0), (3.0D0,4.0D0), (3.0D0,4.0D0),
|
|
kusano |
2b45e8 |
+ (0.03D0,-0.09D0), (0.15D0,-0.03D0),
|
|
kusano |
2b45e8 |
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),
|
|
kusano |
2b45e8 |
+ (5.0D0,6.0D0), (5.0D0,6.0D0), (5.0D0,6.0D0),
|
|
kusano |
2b45e8 |
+ (0.03D0,0.03D0), (-0.18D0,0.03D0),
|
|
kusano |
2b45e8 |
+ (0.03D0,-0.09D0), (7.0D0,8.0D0), (7.0D0,8.0D0),
|
|
kusano |
2b45e8 |
+ (7.0D0,8.0D0), (7.0D0,8.0D0), (7.0D0,8.0D0),
|
|
kusano |
2b45e8 |
+ (0.09D0,0.03D0), (0.03D0,0.12D0),
|
|
kusano |
2b45e8 |
+ (0.12D0,0.03D0), (0.03D0,0.06D0), (2.0D0,3.0D0),
|
|
kusano |
2b45e8 |
+ (2.0D0,3.0D0), (2.0D0,3.0D0), (2.0D0,3.0D0)/
|
|
kusano |
2b45e8 |
DATA ((CTRUE6(I,J,2),I=1,8),J=1,5)/(0.1D0,0.1D0),
|
|
kusano |
2b45e8 |
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (4.0D0,5.0D0), (4.0D0,5.0D0), (4.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (4.0D0,5.0D0), (0.09D0,-0.12D0), (6.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (6.0D0,7.0D0), (6.0D0,7.0D0), (6.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (0.03D0,-0.09D0), (8.0D0,9.0D0),
|
|
kusano |
2b45e8 |
+ (0.15D0,-0.03D0), (2.0D0,5.0D0), (2.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (2.0D0,5.0D0), (2.0D0,5.0D0), (2.0D0,5.0D0),
|
|
kusano |
2b45e8 |
+ (0.03D0,0.03D0), (3.0D0,6.0D0),
|
|
kusano |
2b45e8 |
+ (-0.18D0,0.03D0), (4.0D0,7.0D0),
|
|
kusano |
2b45e8 |
+ (0.03D0,-0.09D0), (7.0D0,2.0D0), (7.0D0,2.0D0),
|
|
kusano |
2b45e8 |
+ (7.0D0,2.0D0), (0.09D0,0.03D0), (5.0D0,8.0D0),
|
|
kusano |
2b45e8 |
+ (0.03D0,0.12D0), (6.0D0,9.0D0), (0.12D0,0.03D0),
|
|
kusano |
2b45e8 |
+ (8.0D0,3.0D0), (0.03D0,0.06D0), (9.0D0,4.0D0)/
|
|
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 |
* .. DZNRM2TEST ..
|
|
kusano |
2b45e8 |
CALL STEST1(DZNRM2TEST(N,CX,INCX),STRUE2(NP1),
|
|
kusano |
2b45e8 |
+ STRUE2(NP1),SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.7) THEN
|
|
kusano |
2b45e8 |
* .. DZASUMTEST ..
|
|
kusano |
2b45e8 |
CALL STEST1(DZASUMTEST(N,CX,INCX),STRUE4(NP1),
|
|
kusano |
2b45e8 |
+ STRUE4(NP1),SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.8) THEN
|
|
kusano |
2b45e8 |
* .. ZSCALTEST ..
|
|
kusano |
2b45e8 |
CALL ZSCALTEST(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 |
* .. ZDSCALTEST ..
|
|
kusano |
2b45e8 |
CALL ZDSCALTEST(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 |
* .. IZAMAXTEST ..
|
|
kusano |
2b45e8 |
CALL ITEST1(IZAMAXTEST(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 |
* ZSCALTEST
|
|
kusano |
2b45e8 |
* Add a test for alpha equal to zero.
|
|
kusano |
2b45e8 |
CA = (0.0D0,0.0D0)
|
|
kusano |
2b45e8 |
DO 80 I = 1, 5
|
|
kusano |
2b45e8 |
MWPCT(I) = (0.0D0,0.0D0)
|
|
kusano |
2b45e8 |
MWPCS(I) = (1.0D0,1.0D0)
|
|
kusano |
2b45e8 |
80 CONTINUE
|
|
kusano |
2b45e8 |
CALL ZSCALTEST(5,CA,CX,INCX)
|
|
kusano |
2b45e8 |
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.9) THEN
|
|
kusano |
2b45e8 |
* ZDSCALTEST
|
|
kusano |
2b45e8 |
* Add a test for alpha equal to zero.
|
|
kusano |
2b45e8 |
SA = 0.0D0
|
|
kusano |
2b45e8 |
DO 100 I = 1, 5
|
|
kusano |
2b45e8 |
MWPCT(I) = (0.0D0,0.0D0)
|
|
kusano |
2b45e8 |
MWPCS(I) = (1.0D0,1.0D0)
|
|
kusano |
2b45e8 |
100 CONTINUE
|
|
kusano |
2b45e8 |
CALL ZDSCALTEST(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.0D0
|
|
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 ZDSCALTEST(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.0D0
|
|
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 ZDSCALTEST(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 |
DOUBLE PRECISION 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*16 CA,ZTEMP
|
|
kusano |
2b45e8 |
INTEGER I, J, KI, KN, KSIZE, LENX, LENY, MX, MY
|
|
kusano |
2b45e8 |
* .. Local Arrays ..
|
|
kusano |
2b45e8 |
COMPLEX*16 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 ZDOTCTEST, ZDOTUTEST
|
|
kusano |
2b45e8 |
* .. External Subroutines ..
|
|
kusano |
2b45e8 |
EXTERNAL ZAXPYTEST, ZCOPYTEST, ZSWAPTEST, 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.4D0,-0.7D0)/
|
|
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.7D0,-0.8D0), (-0.4D0,-0.7D0),
|
|
kusano |
2b45e8 |
+ (-0.1D0,-0.9D0), (0.2D0,-0.8D0),
|
|
kusano |
2b45e8 |
+ (-0.9D0,-0.4D0), (0.1D0,0.4D0), (-0.6D0,0.6D0)/
|
|
kusano |
2b45e8 |
DATA CY1/(0.6D0,-0.6D0), (-0.9D0,0.5D0),
|
|
kusano |
2b45e8 |
+ (0.7D0,-0.6D0), (0.1D0,-0.5D0), (-0.1D0,-0.2D0),
|
|
kusano |
2b45e8 |
+ (-0.5D0,-0.3D0), (0.8D0,-0.7D0)/
|
|
kusano |
2b45e8 |
DATA ((CT8(I,J,1),I=1,7),J=1,4)/(0.6D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.32D0,-1.41D0),
|
|
kusano |
2b45e8 |
+ (-1.55D0,0.5D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.32D0,-1.41D0), (-1.55D0,0.5D0),
|
|
kusano |
2b45e8 |
+ (0.03D0,-0.89D0), (-0.38D0,-0.96D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/
|
|
kusano |
2b45e8 |
DATA ((CT8(I,J,2),I=1,7),J=1,4)/(0.6D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (-0.07D0,-0.89D0),
|
|
kusano |
2b45e8 |
+ (-0.9D0,0.5D0), (0.42D0,-1.41D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.78D0,0.06D0), (-0.9D0,0.5D0),
|
|
kusano |
2b45e8 |
+ (0.06D0,-0.13D0), (0.1D0,-0.5D0),
|
|
kusano |
2b45e8 |
+ (-0.77D0,-0.49D0), (-0.5D0,-0.3D0),
|
|
kusano |
2b45e8 |
+ (0.52D0,-1.51D0)/
|
|
kusano |
2b45e8 |
DATA ((CT8(I,J,3),I=1,7),J=1,4)/(0.6D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (-0.07D0,-0.89D0),
|
|
kusano |
2b45e8 |
+ (-1.18D0,-0.31D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.78D0,0.06D0), (-1.54D0,0.97D0),
|
|
kusano |
2b45e8 |
+ (0.03D0,-0.89D0), (-0.18D0,-1.31D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/
|
|
kusano |
2b45e8 |
DATA ((CT8(I,J,4),I=1,7),J=1,4)/(0.6D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.32D0,-1.41D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.32D0,-1.41D0), (-0.9D0,0.5D0),
|
|
kusano |
2b45e8 |
+ (0.05D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.32D0,-1.41D0),
|
|
kusano |
2b45e8 |
+ (-0.9D0,0.5D0), (0.05D0,-0.6D0), (0.1D0,-0.5D0),
|
|
kusano |
2b45e8 |
+ (-0.77D0,-0.49D0), (-0.5D0,-0.3D0),
|
|
kusano |
2b45e8 |
+ (0.32D0,-1.16D0)/
|
|
kusano |
2b45e8 |
DATA CT7/(0.0D0,0.0D0), (-0.06D0,-0.90D0),
|
|
kusano |
2b45e8 |
+ (0.65D0,-0.47D0), (-0.34D0,-1.22D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (-0.06D0,-0.90D0),
|
|
kusano |
2b45e8 |
+ (-0.59D0,-1.46D0), (-1.04D0,-0.04D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (-0.06D0,-0.90D0),
|
|
kusano |
2b45e8 |
+ (-0.83D0,0.59D0), (0.07D0,-0.37D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (-0.06D0,-0.90D0),
|
|
kusano |
2b45e8 |
+ (-0.76D0,-1.15D0), (-1.33D0,-1.82D0)/
|
|
kusano |
2b45e8 |
DATA CT6/(0.0D0,0.0D0), (0.90D0,0.06D0),
|
|
kusano |
2b45e8 |
+ (0.91D0,-0.77D0), (1.80D0,-0.10D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.90D0,0.06D0), (1.45D0,0.74D0),
|
|
kusano |
2b45e8 |
+ (0.20D0,0.90D0), (0.0D0,0.0D0), (0.90D0,0.06D0),
|
|
kusano |
2b45e8 |
+ (-0.55D0,0.23D0), (0.83D0,-0.39D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.90D0,0.06D0), (1.04D0,0.79D0),
|
|
kusano |
2b45e8 |
+ (1.95D0,1.22D0)/
|
|
kusano |
2b45e8 |
DATA ((CT10X(I,J,1),I=1,7),J=1,4)/(0.7D0,-0.8D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.6D0,-0.6D0), (-0.9D0,0.5D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.6D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (-0.9D0,0.5D0), (0.7D0,-0.6D0), (0.1D0,-0.5D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/
|
|
kusano |
2b45e8 |
DATA ((CT10X(I,J,2),I=1,7),J=1,4)/(0.7D0,-0.8D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.7D0,-0.6D0), (-0.4D0,-0.7D0),
|
|
kusano |
2b45e8 |
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.8D0,-0.7D0),
|
|
kusano |
2b45e8 |
+ (-0.4D0,-0.7D0), (-0.1D0,-0.2D0),
|
|
kusano |
2b45e8 |
+ (0.2D0,-0.8D0), (0.7D0,-0.6D0), (0.1D0,0.4D0),
|
|
kusano |
2b45e8 |
+ (0.6D0,-0.6D0)/
|
|
kusano |
2b45e8 |
DATA ((CT10X(I,J,3),I=1,7),J=1,4)/(0.7D0,-0.8D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (-0.9D0,0.5D0), (-0.4D0,-0.7D0),
|
|
kusano |
2b45e8 |
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.1D0,-0.5D0),
|
|
kusano |
2b45e8 |
+ (-0.4D0,-0.7D0), (0.7D0,-0.6D0), (0.2D0,-0.8D0),
|
|
kusano |
2b45e8 |
+ (-0.9D0,0.5D0), (0.1D0,0.4D0), (0.6D0,-0.6D0)/
|
|
kusano |
2b45e8 |
DATA ((CT10X(I,J,4),I=1,7),J=1,4)/(0.7D0,-0.8D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.6D0,-0.6D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.6D0,-0.6D0), (0.7D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.6D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (0.7D0,-0.6D0), (-0.1D0,-0.2D0), (0.8D0,-0.7D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0)/
|
|
kusano |
2b45e8 |
DATA ((CT10Y(I,J,1),I=1,7),J=1,4)/(0.6D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.7D0,-0.8D0), (-0.4D0,-0.7D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.7D0,-0.8D0),
|
|
kusano |
2b45e8 |
+ (-0.4D0,-0.7D0), (-0.1D0,-0.9D0),
|
|
kusano |
2b45e8 |
+ (0.2D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0)/
|
|
kusano |
2b45e8 |
DATA ((CT10Y(I,J,2),I=1,7),J=1,4)/(0.6D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (-0.1D0,-0.9D0), (-0.9D0,0.5D0),
|
|
kusano |
2b45e8 |
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (-0.6D0,0.6D0),
|
|
kusano |
2b45e8 |
+ (-0.9D0,0.5D0), (-0.9D0,-0.4D0), (0.1D0,-0.5D0),
|
|
kusano |
2b45e8 |
+ (-0.1D0,-0.9D0), (-0.5D0,-0.3D0),
|
|
kusano |
2b45e8 |
+ (0.7D0,-0.8D0)/
|
|
kusano |
2b45e8 |
DATA ((CT10Y(I,J,3),I=1,7),J=1,4)/(0.6D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (-0.1D0,-0.9D0), (0.7D0,-0.8D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (-0.6D0,0.6D0),
|
|
kusano |
2b45e8 |
+ (-0.9D0,-0.4D0), (-0.1D0,-0.9D0),
|
|
kusano |
2b45e8 |
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0)/
|
|
kusano |
2b45e8 |
DATA ((CT10Y(I,J,4),I=1,7),J=1,4)/(0.6D0,-0.6D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.7D0,-0.8D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.7D0,-0.8D0), (-0.9D0,0.5D0),
|
|
kusano |
2b45e8 |
+ (-0.4D0,-0.7D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.7D0,-0.8D0),
|
|
kusano |
2b45e8 |
+ (-0.9D0,0.5D0), (-0.4D0,-0.7D0), (0.1D0,-0.5D0),
|
|
kusano |
2b45e8 |
+ (-0.1D0,-0.9D0), (-0.5D0,-0.3D0),
|
|
kusano |
2b45e8 |
+ (0.2D0,-0.8D0)/
|
|
kusano |
2b45e8 |
DATA CSIZE1/(0.0D0,0.0D0), (0.9D0,0.9D0),
|
|
kusano |
2b45e8 |
+ (1.63D0,1.73D0), (2.90D0,2.78D0)/
|
|
kusano |
2b45e8 |
DATA CSIZE3/(0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (1.17D0,1.17D0),
|
|
kusano |
2b45e8 |
+ (1.17D0,1.17D0), (1.17D0,1.17D0),
|
|
kusano |
2b45e8 |
+ (1.17D0,1.17D0), (1.17D0,1.17D0),
|
|
kusano |
2b45e8 |
+ (1.17D0,1.17D0), (1.17D0,1.17D0)/
|
|
kusano |
2b45e8 |
DATA CSIZE2/(0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (0.0D0,0.0D0),
|
|
kusano |
2b45e8 |
+ (0.0D0,0.0D0), (0.0D0,0.0D0), (1.54D0,1.54D0),
|
|
kusano |
2b45e8 |
+ (1.54D0,1.54D0), (1.54D0,1.54D0),
|
|
kusano |
2b45e8 |
+ (1.54D0,1.54D0), (1.54D0,1.54D0),
|
|
kusano |
2b45e8 |
+ (1.54D0,1.54D0), (1.54D0,1.54D0)/
|
|
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 |
* .. ZDOTCTEST ..
|
|
kusano |
2b45e8 |
CALL ZDOTCTEST(N,CX,INCX,CY,INCY,ZTEMP)
|
|
kusano |
2b45e8 |
CDOT(1) = ZTEMP
|
|
kusano |
2b45e8 |
CALL CTEST(1,CDOT,CT6(KN,KI),CSIZE1(KN),SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.2) THEN
|
|
kusano |
2b45e8 |
* .. ZDOTUTEST ..
|
|
kusano |
2b45e8 |
CALL ZDOTUTEST(N,CX,INCX,CY,INCY,ZTEMP)
|
|
kusano |
2b45e8 |
CDOT(1) = ZTEMP
|
|
kusano |
2b45e8 |
CALL CTEST(1,CDOT,CT7(KN,KI),CSIZE1(KN),SFAC)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.3) THEN
|
|
kusano |
2b45e8 |
* .. ZAXPYTEST ..
|
|
kusano |
2b45e8 |
CALL ZAXPYTEST(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 |
* .. ZCOPYTEST ..
|
|
kusano |
2b45e8 |
CALL ZCOPYTEST(N,CX,INCX,CY,INCY)
|
|
kusano |
2b45e8 |
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0)
|
|
kusano |
2b45e8 |
ELSE IF (ICASE.EQ.5) THEN
|
|
kusano |
2b45e8 |
* .. ZSWAPTEST ..
|
|
kusano |
2b45e8 |
CALL ZSWAPTEST(N,CX,INCX,CY,INCY)
|
|
kusano |
2b45e8 |
CALL CTEST(LENX,CX,CT10X(1,KN,KI),CSIZE3,1.0D0)
|
|
kusano |
2b45e8 |
CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0)
|
|
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 |
DOUBLE PRECISION SFAC
|
|
kusano |
2b45e8 |
INTEGER LEN
|
|
kusano |
2b45e8 |
* .. Array Arguments ..
|
|
kusano |
2b45e8 |
DOUBLE PRECISION 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 |
DOUBLE PRECISION SD
|
|
kusano |
2b45e8 |
INTEGER I
|
|
kusano |
2b45e8 |
* .. External Functions ..
|
|
kusano |
2b45e8 |
DOUBLE PRECISION 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.0D0)
|
|
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,2D36.8,2D12.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 |
DOUBLE PRECISION SCOMP1, SFAC, STRUE1
|
|
kusano |
2b45e8 |
* .. Array Arguments ..
|
|
kusano |
2b45e8 |
DOUBLE PRECISION SSIZE(*)
|
|
kusano |
2b45e8 |
* .. Local Arrays ..
|
|
kusano |
2b45e8 |
DOUBLE PRECISION 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 |
DOUBLE PRECISION 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 |
DOUBLE PRECISION 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 |
DOUBLE PRECISION SFAC
|
|
kusano |
2b45e8 |
INTEGER LEN
|
|
kusano |
2b45e8 |
* .. Array Arguments ..
|
|
kusano |
2b45e8 |
COMPLEX*16 CCOMP(LEN), CSIZE(LEN), CTRUE(LEN)
|
|
kusano |
2b45e8 |
* .. Local Scalars ..
|
|
kusano |
2b45e8 |
INTEGER I
|
|
kusano |
2b45e8 |
* .. Local Arrays ..
|
|
kusano |
2b45e8 |
DOUBLE PRECISION SCOMP(20), SSIZE(20), STRUE(20)
|
|
kusano |
2b45e8 |
* .. External Subroutines ..
|
|
kusano |
2b45e8 |
EXTERNAL STEST
|
|
kusano |
2b45e8 |
* .. Intrinsic Functions ..
|
|
kusano |
2b45e8 |
INTRINSIC DIMAG, DBLE
|
|
kusano |
2b45e8 |
* .. Executable Statements ..
|
|
kusano |
2b45e8 |
DO 20 I = 1, LEN
|
|
kusano |
2b45e8 |
SCOMP(2*I-1) = DBLE(CCOMP(I))
|
|
kusano |
2b45e8 |
SCOMP(2*I) = DIMAG(CCOMP(I))
|
|
kusano |
2b45e8 |
STRUE(2*I-1) = DBLE(CTRUE(I))
|
|
kusano |
2b45e8 |
STRUE(2*I) = DIMAG(CTRUE(I))
|
|
kusano |
2b45e8 |
SSIZE(2*I-1) = DBLE(CSIZE(I))
|
|
kusano |
2b45e8 |
SSIZE(2*I) = DIMAG(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
|