HP MLIB User's Guide Vol. 2 7th Ed.
Chapter 12 VMATH 839
Unpack (scatter) a contiguous vector to a vector with specified indexing vsUnpackI, vsUnpackV, vsUnpackM,
vdUnpackI, vdUnpackV, vdUnpackM
Name vsUnpackI, vsUnpackV, vsUnpackM, vdUnpackI, vdUnpackV, vdUnpackM
Unpack (scatter) a contiguous vector to a vector with specified indexing
Purpose vsUnpackI and vdUnpackI unpack a contiguous vector of n elements in array a
into a vector with increment incy in array y:
y[i*incy] = a[i], for i = 0 to n-1
vsUnpackV and vdUnpackV unpack a contiguous vector of n elements in array
a into a vector, with index vector in array iy, in array y:
y[iy[i]] = a[i], for i = 0 to n-1
vsUnpackM and vdUnpackM unpack a contiguous vector of elements in array a
into a vector, specified by the mask vector of n elements in array my, into a
contiguous vector in array y:
initialize j = 0
if (m[i]) then y[j] = a[i] and j = j+1, for i = 0 to n-1
Usage VMATH:
#include <vmath.h>
void vsUnpackI (int n, const float a[ ], float y [ ], int incy) ;
void vsUnpackV (int n, const float a[ ], float y [ ], const int iy[ ] );
void vsUnpackM (int n, const float a[ ], float y [ ], const int my[ ] );
void vdUnpackI (int n, const double a[ ], double y [ ], int incy) ;
void vdUnpackV (int n, const double a[ ], double y [ ], const int iy[ ] );
void vdUnpackM (int n, const double a[ ], double y [ ], const int my[ ] );
VMATH8:
#include <vmath8.h>
void vsUnpackI (long long n, const float a[ ], float y [ ], long long incy) ;
void vsUnpackV (long long n, const float a[ ], float y [ ], const int iy[ ] );
void vsUnpackM (long long n, const float a[ ], float y [ ], const int my[ ] );
void vdUnpackI (long long n, const double a[ ], double y [ ], long long
incy ) ;
void vdUnpackV (long long n, const double a[ ], double y [ ], const long
long iy[ ] );
void vdUnpackM (long long n, const double a[ ], double y [ ], const long
long my[ ] );
Input n Number of elements to be calculated.
a Array containing the vector to be unpacked. Length of
a is at least n for vsUnpackI, vdUnpackI, vsUnpackV,
and vdUnpackV; and the number of non-zero elements