# Unpack

Copies elements of a vector with unit increment to an array with specified indexing.

## Syntax

Fortran:

call vsunpacki( n, a, y, incy )

call vsunpackv( n, a, y, iy )

call vsunpackm( n, a, y, my )

call vdunpacki( n, a, y, incy )

call vdunpackv( n, a, y, iy )

call vdunpackm( n, a, y, my )

C:

vsUnpackI( n, a, y, incy );

vsUnpackV( n, a, y, iy );

vsUnpackM( n, a, y, my );

vdUnpackI( n, a, y, incy );

vdUnpackV( n, a, y, iy );

vdUnpackM( n, a, y, my );

## Input Parameters

Name | Type | Description
--- | --- | ---
n | FORTRAN: INTEGER, INTENT(IN). C: int. | Specifies the number of elements to be calculated.
a | FORTRAN: REAL, INTENT(IN) for vsunpacki, vsunpackv, vsunpackm DOUBLE PRECISION, INTENT(IN) for vdunpacki, vdunpackv, vdunpackm. C: const float* for vsUnpackI, vsUnpackV, vsUnpackM const double* for vdUnpackI, vdUnpackV, vdUnpackM | FORTRAN: Array, DIMENSION at least n. Specifies the input vector a. C: Specifies the pointer to an array of size at least n that contains the input vector a.
incy | FORTRAN: INTEGER, INTENT(IN) for vsunpacki, vdunpacki. C: int for vsUnpackI, vdUnpackI. | Specifies the increment for the elements of y.
iy | FORTRAN: INTEGER, INTENT(IN) for vsunpackv, vdunpackv. C: const int* for vsUnpackV, vdUnpackV. | FORTRAN: Array, DIMENSION at least n. Specifies the index vector for the elements of y. C: Specifies the pointer to an array of size at least n that contains the index vector for the elements of a.
my | FORTRAN: INTEGER, INTENT(IN) for vsunpackm, vdunpackm. C: const int* for vsUnpackM, vdUnpackM. | FORTRAN: Array, DIMENSION at least n, Specifies the mask vector for the elements of y. C: Specifies the pointer to an array of size at least n that contains the mask vector for the elements of a.

## Output Parameters

Name | Type | Description
--- | --- | ---
y | FORTRAN: REAL for vsunpacki, vsunpackv, vsunpackm DOUBLE PRECISION for vdunpacki, vdunpackv, vdunpackm. C: float* for vsUnpackI, vsUnpackV, vsUnpackM double* for vdUnpackI, vdUnpackV, vdUnpackM | FORTRAN: Array, DIMENSION at least `(1 + (n-1)*incy)` for vsunpacki, at least `max( n,max(iy[j]) ),j=0,..., n-1`, for vsunpackv, at least n for vsunpackm/vdunpackm C: Specifies the pointer to an array that contains the output vector y. Size of the array must be: at least `(1 + (n-1)*incy)` for vsUnPackI, at least `max( n,max(ia[j]) ),j=0,..., n-1`, for vsUnPackV,at least n for vsUnPackM.

Parent topic: VML Pack/Unpack Functions