Developer Reference

  • 0.9
  • 09/09/2020
  • Public Content
Contents

cblas_?asum

Computes the sum of magnitudes of the vector elements.

Syntax

float
cblas_sasum
(
const
MKL_INT
n
,
const
float
*x
,
const
MKL_INT
incx
);
float
cblas_scasum
(
const
MKL_INT
n
,
const
void
*x
,
const
MKL_INT
incx
);
double
cblas_dasum
(
const
MKL_INT
n
,
const
double
*x
,
const
MKL_INT
incx
);
double
cblas_dzasum
(
const
MKL_INT
n
,
const
void
*x
,
const
MKL_INT
incx
);
Include Files
  • mkl.h
Description
The
?asum
routine computes the sum of the magnitudes of elements of a real vector, or the sum of magnitudes of the real and imaginary parts of elements of a complex vector:
res = |Re x
1
| + |Im x
1
| + |Re x
2
| + Im x
2
|+ ... + |Re x
n
| + |Im x
n
|,
where
x
is a vector with
n
elements.
Input Parameters
n
Specifies the number of elements in vector
x
.
x
Array, size at least
(1 + (
n
-1)*abs(
incx
))
.
incx
Specifies the increment for indexing vector
x
.
Output Parameters
res
Contains the sum of magnitudes of real and imaginary parts of all elements of the vector.
Return Values
Contains the sum of magnitudes of real and imaginary parts of all elements of the vector.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804