Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vec(A) — Apollo Domain/OS SR10.3.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VEC_$INTRO                        Domain/OS                         VEC_$INTRO


NAME
     intro - the Vector Library

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/vec.h>

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/vec.ins.pas';

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/vec.ins.ftn'

DESCRIPTION
     The Vector Library performs floating-point and integer vector matrix
     arithmetic.

     Most of the vector calls have four versions: single-precision floating-
     point, double-precision floating-point, 16-bit integer, and 32-bit
     integer.  The names of all single-precision vector calls begin with the
     simple prefix vec_$.  Double-precision calls begin with the prefix
     vec_$d.  The 16-bit integer calls begin with the prefix vec_$i and add a
     suffix of 16.  The 32-bit integer calls begin with the prefix vec_$i, but
     lack the 16 suffix.  For example, vec_$dot and vec_$ddot are single- and
     double-precision versions of dot (scalar) product calls.  Vec_$idot and
     vec_$idot16 are the 32-bit and 16-bit integer versions, respectively.

     Each variant of a routine takes similar arguments that differ from the
     arguments of the other variants only in the types of their operands.  For
     the double-precision calls, all floating-point parameters are double-
     precision; for the single-precision calls, all floating-point parameters
     must be single precision; for the integer procedures and functions, the
     parameters and returned values are integers, etc.

     In addition, many of the vector calls have an additional four versions;
     these versions have names terminating in _i, meaning that they are
     "incremental" calls.  These calls take additional "stride" arguments,
     specifying the increments through which the call should step through the
     argument vectors.  They are mainly useful for operations on vectors in
     matrixes that are not stored contiguously in memory.

     The following is a list of the vec_$ calls.  Nearly all of the following
     calls have four or eight versions, and only the single precision floating
     point version with no stride is listed.  The other versions have prefixes
     or suffixes added to their names as previously descibed.  For instance,
     vec_$add_constant adds a scalar to a single-precision vector, and there
     are three other versions: vec_$dadd_constant which adds a scalar to a
     double-precision vector, vec_$iadd_constant which adds a scalar to a 32-
     bit integer vector, and vec_$iadd_constant16 which adds a scalar to a
     16-bit integer vector.  The precision converting calls (vec_$dp_sp,
     vec_$dp_sp_i, vec_$sp_dp, and vec_$sp_dp_i) come in only one version for
     obvious reasons.
        vec_$abs                  take the absolute value of the elements
                                  in a single-precision vector
        vec_$add_add_vector       add three single-precision vectors
        vec_$add_constant         add a scalar to a vector
        vec_$add_mult             add one single-precision vector to a
                                  scalar, multiply by vector
        vec_$add_mult_constant    add two single-precision vectors,
                                  multiply by a scalar
        vec_$add_mult_vector      add two single-precision vectors,
                                  multiply by a third
        vec_$add_vector           add two vectors
        vec_$amax                 find the maximum absolute value in a
                                  single-precision vector
        vec_$amin                 find the minimum absolute value in a
                                  single-precision vector
        vec_$asum                 sum the absolute value of the elements
                                  of a single-precision vector
        vec_$copy                 copy a vector
        vec_$copy_i               copy a vector from one matrix to another
        vec_$dot                  return the dot product of two vectors
        vec_$dp_sp                copy a double-precision vector to a
                                  single-precision vector
        vec_$gather               translate a vector out of scattered form
        vec_$init                 initialize a vector
        vec_$mat_mult             multiply two 4x4 matrixes
        vec_$mat_multn            multiply two matrixes
        vec_$max                  find the maximum absolute value in a
                                  vector
        vec_$mult_add             scale and add one vector to another
        vec_$mult_add_constant    multiply two single-precision vectors,
                                  add a scalar
        vec_$mult_add_vector      multiply two single-precision vectors,
                                  add a third
        vec_$mult_constant        multiply a vector by a scalar
        vec_$mult_mult_vector     multiply three single-precision vectors
        vec_$mult_rsub_constant   multiply two single-precision vectors,
                                  negate the result, add a scalar
        vec_$mult_rsub_vector     multiply two single-precision vectors,
                                  negate the result, add a vector
        vec_$mult_sub             multiply a scalar by a single-precision
                                  vector, subtract a vector
        vec_$mult_sub_vector      multiply two single-precision vectors,
                                  subtract a third
        vec_$neg                  take the negative of a single-precision
                                  vector
        vec_$norm                 squared norm (sum the squares of the
                                  elements) a single-precision vector
        vec_$mult_vector          multiply two single-precision vectors
        vec_$postmult             multiply a vector by a 4x4 matrix
        vec_$postmultn            multiply a vector by a matrix
        vec_$premult              multiply a vector by a 4x4 matrix
        vec_$premultn             multiply a vector by a matrix
        vec_$rec1                 calculate first-order linear recurrence
                                  of single-precision vector
        vec_$rec1c                calculate first-order linear recurrence
                                  of single-precision vector with constant
                                  coefficient
        vec_$rec1cr               function returning first-order linear
                                  recurrence of single-precision vector
                                  with constant coefficient
        vec_$rec1n                calculate first-order linear recurrence
                                  of single-precision vector with
                                  coefficient 1
        vec_$rec1r                function returning first-order linear
                                  recurrence of single-precision vector
        vec_$rec2                 calculate second-order linear recurrence
                                  of single-precision vector
        vec_$rec2c                calculate second-order linear recurrence
                                  of single-precision vector with constant
                                  coefficients
        vec_$rec3                 calculate third-order linear recurrence
                                  of single-precision vector
        vec_$rec3c                calculate third-order linear recurrence
                                  of single-precision vector with constant
                                  coefficients
        vec_$rmax                 find the maximum value in a single-
                                  precision vector
        vec_$rmin                 find the minimum value in a single-
                                  precision vector
        vec_$scatter              translate a vector into scattered form
        vec_$sp_dp                copy a single-precision vector to a
                                  double-precision vector
        vec_$sub                  subtract vectors
        vec_$sub_add_vector       add two single-precision vectors,
                                  subtract a third
        vec_$sub_constant         subtract a single-precision vector from
                                  a scalar
        vec_$sub_mult             subtract one single-precision vector
                                  from a scalar, multiply result by a
                                  vector
        vec_$sub_mult_constant    subtract two single-precision vectors,
                                  multiply by a scalar
        vec_$sub_mult_vector      subtract two single-precision vectors,
                                  multiply by a third
        vec_$sub_vector           subtract two single-precision vectors
        vec_$sum                  sum the elements of a vector
        vec_$swap                 swap two vectors
        vec_$zero                 zero a vector

NOTES
     When using any of the vector calls, make sure that the indexes you pass
     are valid.  In the interest of performance, these calls do not check
     index values for validity.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026