01:       REAL             FUNCTION SCSUM1( N, CX, INCX )
02: *
03: *  -- LAPACK auxiliary routine (version 3.2) --
04: *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
05: *     November 2006
06: *
07: *     .. Scalar Arguments ..
08:       INTEGER            INCX, N
09: *     ..
10: *     .. Array Arguments ..
11:       COMPLEX            CX( * )
12: *     ..
13: *
14: *  Purpose
15: *  =======
16: *
17: *  SCSUM1 takes the sum of the absolute values of a complex
18: *  vector and returns a single precision result.
19: *
20: *  Based on SCASUM from the Level 1 BLAS.
21: *  The change is to use the 'genuine' absolute value.
22: *
23: *  Contributed by Nick Higham for use with CLACON.
24: *
25: *  Arguments
26: *  =========
27: *
28: *  N       (input) INTEGER
29: *          The number of elements in the vector CX.
30: *
31: *  CX      (input) COMPLEX array, dimension (N)
32: *          The vector whose elements will be summed.
33: *
34: *  INCX    (input) INTEGER
35: *          The spacing between successive values of CX.  INCX > 0.
36: *
37: *  =====================================================================
38: *
39: *     .. Local Scalars ..
40:       INTEGER            I, NINCX
41:       REAL               STEMP
42: *     ..
43: *     .. Intrinsic Functions ..
44:       INTRINSIC          ABS
45: *     ..
46: *     .. Executable Statements ..
47: *
48:       SCSUM1 = 0.0E0
49:       STEMP = 0.0E0
50:       IF( N.LE.0 )
51:      $   RETURN
52:       IF( INCX.EQ.1 )
53:      $   GO TO 20
54: *
55: *     CODE FOR INCREMENT NOT EQUAL TO 1
56: *
57:       NINCX = N*INCX
58:       DO 10 I = 1, NINCX, INCX
59: *
60: *        NEXT LINE MODIFIED.
61: *
62:          STEMP = STEMP + ABS( CX( I ) )
63:    10 CONTINUE
64:       SCSUM1 = STEMP
65:       RETURN
66: *
67: *     CODE FOR INCREMENT EQUAL TO 1
68: *
69:    20 CONTINUE
70:       DO 30 I = 1, N
71: *
72: *        NEXT LINE MODIFIED.
73: *
74:          STEMP = STEMP + ABS( CX( I ) )
75:    30 CONTINUE
76:       SCSUM1 = STEMP
77:       RETURN
78: *
79: *     End of SCSUM1
80: *
81:       END
82: