21 January 2020 08:59:48 AM SUPER_BLAS1_C_TEST: C version Single precision complex arithmetic, Test the SUPER_BLAS library. TEST03 CAXPY 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 CCOPY 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 CCOPY ( 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 CCOPY ( 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 CCOPY ( 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 CCOPY ( 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 CDOTC 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 CDOTC(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) TEST09 CSCAL 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 CSCAL ( 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 CSCAL ( 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 ICAMAX 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 SCASUM 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 ) SCASUM ( NX, X, 1 ) = 27.000000 SCASUM ( NX/2, X, 2 ) = 12.000000 SCASUM ( 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 ) SCASUM ( MA, A[1,2], 1 ) = 25.000000 SCASUM ( NA, A[2,1], MA ) = 17.000000 TEST17 SCNRM2 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_C_TEST: Normal end of execution. 21 January 2020 08:59:48 AM