LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ dzsum1()

double precision function dzsum1 ( integer  n,
complex*16, dimension( * )  cx,
integer  incx 
)

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

Download DZSUM1 + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 DZSUM1 takes the sum of the absolute values of a complex
 vector and returns a double precision result.

 Based on DZASUM 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*16 array, dimension (N)
          The vector whose elements will be summed.
[in]INCX
          INCX is INTEGER
          The spacing between successive values of CX.  INCX > 0.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Contributors:
Nick Higham for use with ZLACON.

Definition at line 80 of file dzsum1.f.

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