VEC_$IASUM16_I Domain/OS VEC_$IASUM16_I
NAME
vec_$iasum16_i - sum the absolute value of the elements of a 16-bit
integer vector
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/vec.h>
long int vec_$iasum16_i(
short int *vector,
long int &vec_inc,
long int &length)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/vec.ins.pas';
function vec_$iasum16_i(
in vector: univ vec_$integer16_vector;
in vec_inc: integer32;
in length: integer32): integer32;
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/vec.ins.ftn'
parameter (nvec = 10)
integer*2 vector(nvec), sum
integer*4 length, vec_inc
sum = vec_$iasum16_i(vector, vec_inc, length)
DESCRIPTION
Vec_$iasum16_i adds together the absolute value of length elements of the
16-bit integer array vector and returns the sum.
This call, like all vec_$ calls ending in _i, takes a set of extra stride
arguments, one for every vector argument. The stride arguments determine
which elements in the array are actually processed. For instance, if the
stride for a particular array is set to 3, every third element in the
array will be processed by the routine. The stride arguments need not be
identical. If all stride arguments are set to 1, this call behaves
exactly like the version without the _i in its name.
vector
The vector to be summed.
vec_inc
The stride for vector.
length
The number of elements to be operated on; normally the same as the
number of elements in the vector.
NOTES
When vec_$iasum16_i is used to operate on matrixes in C and Pascal, vec-
tor is a row vector; in FORTRAN, it is a column vector.
Vec_$iasum16_i, like all 16-bit integer routines, performs poorly when
compared to the 32-bit integer routines. Its use should be avoided wher-
ever possible, especially on high-performance workstations.
SEE ALSO
vec_$sum, vec_$norm, vec_$dot, vec_$asum, vec_$asum_i, vec_$dasum,
vec_$dasum_i, vec_$iasum, vec_$iasum_i, vec_$iasum16.