LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 real function scsum1 ( integer N, complex, dimension( * ) CX, integer INCX )

SCSUM1 forms the 1-norm of the complex vector using the true absolute value.

Purpose:
``` SCSUM1 takes the sum of the absolute values of a complex
vector and returns a single precision result.

Based on SCASUM from the Level 1 BLAS.
The change is to use the 'genuine' absolute value.```
Parameters
 [in] N ``` N is INTEGER The number of elements in the vector CX.``` [in] CX ``` CX is COMPLEX array, dimension (N) The vector whose elements will be summed.``` [in] INCX ``` INCX is INTEGER The spacing between successive values of CX. INCX > 0.```
Date
September 2012
Contributors:
Nick Higham for use with CLACON.

Definition at line 83 of file scsum1.f.

83 *
84 * -- LAPACK auxiliary routine (version 3.4.2) --
85 * -- LAPACK is a software package provided by Univ. of Tennessee, --
86 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
87 * September 2012
88 *
89 * .. Scalar Arguments ..
90  INTEGER incx, n
91 * ..
92 * .. Array Arguments ..
93  COMPLEX cx( * )
94 * ..
95 *
96 * =====================================================================
97 *
98 * .. Local Scalars ..
99  INTEGER i, nincx
100  REAL stemp
101 * ..
102 * .. Intrinsic Functions ..
103  INTRINSIC abs
104 * ..
105 * .. Executable Statements ..
106 *
107  scsum1 = 0.0e0
108  stemp = 0.0e0
109  IF( n.LE.0 )
110  \$ RETURN
111  IF( incx.EQ.1 )
112  \$ GO TO 20
113 *
114 * CODE FOR INCREMENT NOT EQUAL TO 1
115 *
116  nincx = n*incx
117  DO 10 i = 1, nincx, incx
118 *
119 * NEXT LINE MODIFIED.
120 *
121  stemp = stemp + abs( cx( i ) )
122  10 CONTINUE
123  scsum1 = stemp
124  RETURN
125 *
126 * CODE FOR INCREMENT EQUAL TO 1
127 *
128  20 CONTINUE
129  DO 30 i = 1, n
130 *
131 * NEXT LINE MODIFIED.
132 *
133  stemp = stemp + abs( cx( i ) )
134  30 CONTINUE
135  scsum1 = stemp
136  RETURN
137 *
138 * End of SCSUM1
139 *
real function scsum1(N, CX, INCX)
SCSUM1 forms the 1-norm of the complex vector using the true absolute value.
Definition: scsum1.f:83