函数语法:
XASUM( N, X, INCX)
功能:
ASUM 是 BLAS 中 第1层函数。ASUM函数计算一个向量中所有元素绝对值的累加和( Calculating summary of element absolute value of a vector).
参数:
输入值:
int N, the number of entries in the vector.
X[*], the vector to be examined.
int incX, the increment between successive entries of X.
incX must not be negative.
返回值:
the sum of the absolute values of X.
Fortran语言版DASUM
源代码:
DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
* .. Scalar Arguments ..
INTEGER INCX,N
* ..
* .. Array Arguments ..
DOUBLE PRECISION DX(*)
* ..
*
* Purpose
* =======
*
* takes the sum of the absolute values.
* jack dongarra, linpack, 3/11/78.
* modified 3/93 to return if incx .le. 0.
* modified 12/3/93, array(1) declarations changed to array(*)
*
*
* .. Local Scalars ..
DOUBLE PRECISION DTEMP
INTEGER I,M,MP1,NINCX
* ..
*