3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
11 * DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
13 * .. Scalar Arguments ..
16 * .. Array Arguments ..
17 * DOUBLE PRECISION DX(*)
26 *> DASUM takes the sum of the absolute values.
32 *> \author Univ. of Tennessee
33 *> \author Univ. of California Berkeley
34 *> \author Univ. of Colorado Denver
37 *> \date November 2011
39 *> \ingroup double_blas_level1
41 *> \par Further Details:
42 * =====================
46 *> jack dongarra, linpack, 3/11/78.
47 *> modified 3/93 to return if incx .le. 0.
48 *> modified 12/3/93, array(1) declarations changed to array(*)
51 * =====================================================================
52 DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
54 * -- Reference BLAS level1 routine (version 3.4.0) --
55 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
56 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
59 * .. Scalar Arguments ..
62 * .. Array Arguments ..
63 DOUBLE PRECISION DX(*)
66 * =====================================================================
69 DOUBLE PRECISION DTEMP
72 * .. Intrinsic Functions ..
77 IF (N.LE.0 .OR. INCX.LE.0) RETURN
79 * code for increment equal to 1
87 DTEMP = DTEMP + DABS(DX(I))
96 DTEMP = DTEMP + DABS(DX(I)) + DABS(DX(I+1)) +
97 $ DABS(DX(I+2)) + DABS(DX(I+3)) +
98 $ DABS(DX(I+4)) + DABS(DX(I+5))
102 * code for increment not equal to 1
106 DTEMP = DTEMP + DABS(DX(I))