Contents

# Vector Arguments in VM

Vector arguments of classic VM mathematical functions are passed in one-dimensional arrays with unit vector increment. It means that a vector of length
n
is passed contiguously in an array
a
whose values are defined as
a[0], a[1], ..., a[
n
-1]
.
Strided VM mathematical functions allow using positive increments for all input and output vector arguments.
To accommodate for arrays with other increments, or more complicated indexing, VM contains auxiliary Pack/Unpack functions that gather the array elements into a contiguous vector and then scatter them after the computation is complete.
Generally, if the vector elements are stored in a one-dimensional array
a
as
a[m0], a[m1], ..., a[mn-1]
and need to be regrouped into an array
y
as
y[k0], y[k1], ..., y[kn-1],
.
VM Pack/Unpack functions can use one of the following indexing methods:

## Positive Increment Indexing

kj = incy * j, mj = inca * j, j = 0 ,..., n-1
.
Constraint:
incy > 0
and
inca > 0
.
For example, setting incy = 1 specifies gathering array elements into a contiguous vector.
This method is similar to that used in BLAS, with the exception that negative and zero increments are not permitted.

## Index Vector Indexing

.
kj = iy[j], mj = ia[j], j = 0 ,..., n-1
.
where ia and iy are arrays of length
n
that contain index vectors for the input and output arrays
a
and
y
, respectively.

Indices
kj
,
mj
are such that:
.
my[kj]
0, ma[mj]
0 , j = 0,..., n-1
.
where
ma
and
my
are arrays that contain mask vectors for the input and output arrays
a
and
y
, respectively.

#### 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