Arithmetic and mathematical operations may be performed on vectorised arrays of data of any numerical type by invoking appropriate VEC_ routines, using statements such as:
CALL VEC_FUNC
T
![]()
( BAD, N, ARG, RESULT, IERR, NERR, STATUS )or CALL VEC_FUNC
T
![]()
( BAD, N, ARG1, ARG2, RESULT, IERR, NERR, STATUS )
Here, the VEC_ routine takes a vectorised input argument array
(or arrays) with N elements of type
T
and returns a vectorised result array which is also of type
T
, having performed
the arithmetic or mathematical operation specified by
FUNC
on
each array element.
The data type code
T
may be any of those specified in
Table
and
FUNC
may be any of the function
codes specified in Tables
&
.
The number of input argument arrays (1 or 2) appropriate to each function is
also indicated in these latter Tables.
Thus, for example, the subroutine VEC_ADDUW adds two vectorised
unsigned word arrays to produce an array of unsigned word results, while
VEC_SQRTD evaluates the square root of a single vectorised
array of double precision values, returning an array of double
precision results.
PRIMDAT --- Processing of Primitive Numerical Data