Developer Reference

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

v?Add

Performs element by element addition of vector
a
and vector
b
.

Syntax

vsAdd
(
n
,
a
,
b
,
y
)
;
vsAddI(n, a, inca, b, incb, y, incy);
vmsAdd
(
n
,
a
,
b
,
y
,
mode
)
;
vmsAddI(n, a, inca, b, incb, y, incy, mode);
vdAdd
(
n
,
a
,
b
,
y
)
;
vdAddI(n, a, inca, b, incb, y, incy);
vmdAdd
(
n
,
a
,
b
,
y
,
mode
)
;
vmdAddI(n, a, inca, b, incb, y, incy, mode);
vcAdd
(
n
,
a
,
b
,
y
)
;
vcAddI(n, a, inca, b, incb, y, incy);
vmcAdd
(
n
,
a
,
b
,
y
,
mode
)
;
vmcAddI(n, a, inca, b, incb, y, incy, mode);
vzAdd
(
n
,
a
,
b
,
y
)
;
vzAddI(n, a, inca, b, incb, y, incy);
vmzAdd
(
n
,
a
,
b
,
y
,
mode
)
;
vmzAddI(n, a, inca, b, incb, y, incy, mode);
Include Files
  • mkl.h
Input Parameters
Name
Type
Description
n
const MKL_INT
Specifies the number of elements to be calculated.
a
,
b
const float*
for
vsAdd
,
vmsAdd
const double*
for
vdAdd
,
vmdAdd
const MKL_Complex8*
for
vcAdd
,
vmcAdd
const MKL_Complex16*
for
vzAdd
,
vmzAdd
Pointers to arrays that contain the input vectors
a
and
b
.
inca
,
incb
,
incy
const MKL_INT
Specifies increments for the elements of
a
,
b
, and
y
.
mode
const MKL_INT64
Overrides global VM mode setting for this function call. See
vmlSetMode
for possible values and their description.
Output Parameters
Name
Type
Description
y
float*
for
vsAdd
,
vmsAdd
double*
for
vdAdd
,
vmdAdd
MKL_Complex8*
for
vcAdd
,
vmcAdd
MKL_Complex16*
for
vzAdd
,
vmzAdd
Pointer to an array that contains the output vector
y
.
Description
The
v?Add
function performs element by element addition of vector
a
and vector
b
.
Special values for Real Function
v?Add
Argument 1
Argument 2
Result
Exception
+0
+0
+0
 
+0
-0
+0
 
-0
+0
+0
 
-0
-0
-0
 
+
+
+
 
+
-
QNAN
INVALID
-
+
QNAN
INVALID
-
-
-
 
SNAN
any value
QNAN
INVALID
any value
SNAN
QNAN
INVALID
QNAN
non-SNAN
QNAN
 
non-SNAN
QNAN
QNAN
 
Specifications for special values of the complex functions are defined according to the following formula
Add(x1+i*y1,x2+i*y2) = (x1+x2) + i*(y1+y2)
Overflow in a complex function occurs (supported in the
HA
/
LA
accuracy modes only) when all
RE(x)
,
RE(y)
,
IM(x)
,
IM(y)
arguments are finite numbers, but the real or imaginary part of the computed result is so large that it does not fit the target precision. In this case, the function returns
in that part of the result, raises the
OVERFLOW
exception, and sets the VM Error Status to
VML_STATUS_OVERFLOW
(overriding any possible
VML_STATUS_ACCURACYWARNING
status).

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