21 January 2020 08:59:48 AM SUPER_BLAS1_Z_TEST: Z version Double precision complex arithmetic, Test the SUPER_BLAS library. TEST03 ZAXPY adds a multiple of one complex vector to another. X = 0 2.000000 -1.000000 1 -4.000000 -2.000000 2 3.000000 1.000000 3 2.000000 2.000000 4 -1.000000 -1.000000 Y = 0 -1.000000 0.000000 1 0.000000 -3.000000 2 4.000000 0.000000 3 -3.000000 4.000000 4 -2.000000 0.000000 The scalar multiplier is: 0.500000 -1.000000 A * X + Y = 0 -1.000000 -2.500000 1 -4.000000 0.000000 2 6.500000 -2.500000 3 0.000000 3.000000 4 -3.500000 0.500000 TEST04 ZCOPY copies one complex vector into another. X = 0 10.000000 1.000000 1 20.000000 2.000000 2 30.000000 3.000000 3 40.000000 4.000000 4 50.000000 5.000000 5 60.000000 6.000000 6 70.000000 7.000000 7 80.000000 8.000000 8 90.000000 9.000000 9 100.000000 10.000000 Y = 0 20.000000 2.000000 1 40.000000 4.000000 2 60.000000 6.000000 3 80.000000 8.000000 4 100.000000 10.000000 5 120.000000 12.000000 6 140.000000 14.000000 7 160.000000 16.000000 8 180.000000 18.000000 9 200.000000 20.000000 A = 10.000000 1.000000 10.000000 2.000000 10.000000 3.000000 10.000000 4.000000 10.000000 5.000000 20.000000 1.000000 20.000000 2.000000 20.000000 3.000000 20.000000 4.000000 20.000000 5.000000 30.000000 1.000000 30.000000 2.000000 30.000000 3.000000 30.000000 4.000000 30.000000 5.000000 40.000000 1.000000 40.000000 2.000000 40.000000 3.000000 40.000000 4.000000 40.000000 5.000000 50.000000 1.000000 50.000000 2.000000 50.000000 3.000000 50.000000 4.000000 50.000000 5.000000 ZCOPY ( 5, X, 1, Y, 1 ) 0 10.000000 1.000000 1 20.000000 2.000000 2 30.000000 3.000000 3 40.000000 4.000000 4 50.000000 5.000000 5 120.000000 12.000000 6 140.000000 14.000000 7 160.000000 16.000000 8 180.000000 18.000000 9 200.000000 20.000000 ZCOPY ( 3, X, 2, Y, 3 ) 0 10.000000 1.000000 1 40.000000 4.000000 2 60.000000 6.000000 3 30.000000 3.000000 4 100.000000 10.000000 5 120.000000 12.000000 6 50.000000 5.000000 7 160.000000 16.000000 8 180.000000 18.000000 9 200.000000 20.000000 ZCOPY ( 5, X, 1, A, 1 ) A = 10.000000 1.000000 10.000000 2.000000 10.000000 3.000000 10.000000 4.000000 10.000000 5.000000 20.000000 2.000000 20.000000 2.000000 20.000000 3.000000 20.000000 4.000000 20.000000 5.000000 30.000000 3.000000 30.000000 2.000000 30.000000 3.000000 30.000000 4.000000 30.000000 5.000000 40.000000 4.000000 40.000000 2.000000 40.000000 3.000000 40.000000 4.000000 40.000000 5.000000 50.000000 5.000000 50.000000 2.000000 50.000000 3.000000 50.000000 4.000000 50.000000 5.000000 ZCOPY ( 5, X, 2, A, 5 ) A = 10.000000 1.000000 30.000000 3.000000 50.000000 5.000000 70.000000 7.000000 90.000000 9.000000 20.000000 1.000000 20.000000 2.000000 20.000000 3.000000 20.000000 4.000000 20.000000 5.000000 30.000000 1.000000 30.000000 2.000000 30.000000 3.000000 30.000000 4.000000 30.000000 5.000000 40.000000 1.000000 40.000000 2.000000 40.000000 3.000000 40.000000 4.000000 40.000000 5.000000 50.000000 1.000000 50.000000 2.000000 50.000000 3.000000 50.000000 4.000000 50.000000 5.000000 TEST05 ZDOTC computes the conjugated dot product of two complex vectors. X = 0 2.000000 -1.000000 1 -4.000000 -2.000000 2 3.000000 1.000000 3 2.000000 2.000000 4 -1.000000 -1.000000 The square of the norm of X, computed as ZDOTC(X,X) = (45.000000, 0.000000) Y = 0 -1.000000 0.000000 1 0.000000 -3.000000 2 4.000000 0.000000 3 -3.000000 4.000000 4 -2.000000 0.000000 The dot product X.Y* is (20.000000, 19.000000) TEST08 ZSCAL multiplies a complex scalar times a vector. X = 0 10.000000 1.000000 1 20.000000 2.000000 2 30.000000 3.000000 3 40.000000 4.000000 4 50.000000 5.000000 5 60.000000 6.000000 ZSCAL ( N, (5.000000, 0.000000), X, 1 ) 0 50.000000 5.000000 1 100.000000 10.000000 2 150.000000 15.000000 3 200.000000 20.000000 4 250.000000 25.000000 5 300.000000 30.000000 ZSCAL ( 3, (-2.000000, 1.000000), X, 2 ) 0 -21.000000 8.000000 1 20.000000 2.000000 2 -63.000000 24.000000 3 40.000000 4.000000 4 -105.000000 40.000000 5 60.000000 6.000000 TEST15 IZAMAX returns the index of the entry of maximum magnitude in a complex vector. The entries and CABS1 magnitudes: 0 2.000000 -1.000000 3.000000 1 -4.000000 -2.000000 6.000000 2 3.000000 1.000000 4.000000 3 2.000000 2.000000 4.000000 4 -1.000000 -1.000000 2.000000 The index of maximum magnitude = 2 Note that this is a 1-based index. Note that the L1 norm is used. TEST16 DZASUM adds the absolute values of elements of a complex vector. X = 0 ( 2.0 -1.0 ) 1 ( -4.0 -2.0 ) 2 ( 3.0 1.0 ) 3 ( 2.0 2.0 ) 4 ( -1.0 -1.0 ) 5 ( -1.0 0.0 ) 6 ( 0.0 -3.0 ) 7 ( 4.0 0.0 ) DZASUM ( NX, X, 1 ) = 27.000000 DZASUM ( NX/2, X, 2 ) = 12.000000 DZASUM ( 2, X, NX/2 ) = 5.000000 Demonstrate with a matrix A: ( -3.0 4.0 ) ( -1.0 1.0 ) ( 0.0 -2.0 ) ( -1.0 2.0 ) ( 2.0 0.0 ) ( 0.0 5.0 ) ( 1.0 3.0 ) ( 2.0 -4.0 ) ( 3.0 -4.0 ) ( -4.0 -2.0 ) ( -3.0 3.0 ) ( 0.0 -1.0 ) ( 2.0 0.0 ) ( -4.0 1.0 ) ( -3.0 3.0 ) ( 0.0 -1.0 ) ( 2.0 -1.0 ) ( -4.0 -3.0 ) ( -1.0 -2.0 ) ( -2.0 4.0 ) DZASUM ( MA, A[1,2], 1 ) = 25.000000 DZASUM ( NA, A[2,1], MA ) = 17.000000 TEST17 DZNRM2 returns the Euclidean norm of a complex vector. The vector X: 0 2.000000 -1.000000 1 -4.000000 -2.000000 2 3.000000 1.000000 3 2.000000 2.000000 4 -1.000000 -1.000000 The L2 norm of X is 6.708204 SUPER_BLAS1_Z_TEST: Normal end of execution. 21 January 2020 08:59:48 AM