PLASMA
2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
Main Page
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
dzsum1.f
Go to the documentation of this file.
1
DOUBLE PRECISION
FUNCTION
dzsum1
( N, CX, INCX )
2
*
3
* -- LAPACK auxiliary routine (version 3.2) --
4
* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
5
* November 2006
6
*
7
* .. Scalar Arguments ..
8
INTEGER
incx, n
9
* ..
10
* .. Array Arguments ..
11
COMPLEX*16
cx( * )
12
* ..
13
*
14
* Purpose
15
* =======
16
*
17
* DZSUM1 takes the sum of the absolute values of a complex
18
* vector and returns a double precision result.
19
*
20
* Based on DZASUM from the Level 1 BLAS.
21
* The change is to use the 'genuine' absolute value.
22
*
23
* Contributed by Nick Higham for use with ZLACON.
24
*
25
* Arguments
26
* =========
27
*
28
* N (input) INTEGER
29
* The number of elements in the vector CX.
30
*
31
* CX (input) COMPLEX*16 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
DOUBLE PRECISION
stemp
42
* ..
43
* .. Intrinsic Functions ..
44
INTRINSIC
abs
45
* ..
46
* .. Executable Statements ..
47
*
48
dzsum1
= 0.0d0
49
stemp = 0.0d0
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
dzsum1
= 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
dzsum1
= stemp
77
return
78
*
79
* End of DZSUM1
80
*
81
END
plasma_2.4.5
testing
lin
dzsum1.f
Generated on Mon Jul 9 2012 12:45:04 for PLASMA by
1.8.1