3
double dzsum1_(int *n, doublecomplex *cx, int *incx)
5
/* -- LAPACK auxiliary routine (version 2.0) --
6
Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
7
Courant Institute, Argonne National Lab, and Rice University
13
DZSUM1 takes the sum of the absolute values of a complex
14
vector and returns a double precision result.
16
Based on DZASUM from the Level 1 BLAS.
17
The change is to use the 'genuine' absolute value.
19
Contributed by Nick Higham for use with ZLACON.
25
The number of elements in the vector CX.
27
CX (input) COMPLEX*16 array, dimension (N)
28
The vector whose elements will be summed.
31
The spacing between successive values of CX. INCX > 0.
33
=====================================================================
36
/* Builtin functions */
37
double z_abs(doublecomplex *);
44
#define CX(I) cx[(I)-1]
54
/* CODE FOR INCREMENT NOT EQUAL TO 1 */
57
for (i = 1; *incx < 0 ? i >= nincx : i <= nincx; i += *incx) {
59
/* NEXT LINE MODIFIED. */
61
stemp += z_abs(&CX(i));
67
/* CODE FOR INCREMENT EQUAL TO 1 */
70
for (i = 1; i <= *n; ++i) {
72
/* NEXT LINE MODIFIED. */
74
stemp += z_abs(&CX(i));