Developer Reference for Intel® oneAPI Math Kernel Library for C
?sum1
Forms the 1-norm of the complex vector using the true absolute value.
Syntax
floatscsum1 ( constMKL_INTn , constMKL_Complex8cx , constMKL_INTincx )
doubledzsum1 ( constMKL_INTn , constMKL_Complex16cx , constMKL_INTincx )
Include Files
mkl.h
Description
Given a complex vector cx , scsum1 / dzsum1 functions take the sum of the absolute values of vector elements and return a single/double precision result, respectively. These functions are based on scasum (Computes the sum of magnitudes of the vector elements.) / dzasum (Computes the sum of magnitudes of the vector elements.) from Level 1 BLAS, but use the true absolute value and were designed for use with clacon (Estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products.) clacon / zlacon (Estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products.) zlacon .
Input Parameters
n
Specifies the number of elements in the vector cx .
- cx
-
COMPLEX for scsum1 DOUBLE COMPLEX for dzsum1 Array, size at least (1+(n-1)*abs(incx)) . Contains the input vector whose elements will be summed.
incx
Specifies the spacing between successive elements of cx ( incx > 0).
Output Parameters
- res
-
REAL for scsum1 DOUBLE PRECISION for dzsum1 Sum of absolute values.
Return Values
Sum of absolute values.