Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

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.

     Names that ultimately end in _i denote "incremental" calls, which step
     through vector arrays at user-specified increments.  They are mainly use-
     ful for operations on vectors in matrixes that are not stored contigu-
     ously in memory.

     The following is a list of the vec_$ calls.  Nearly all of the following
     calls have four versions, and only the single precision floating point
     version is listed.  The other versions have prefixes or suffixes added to
     their names as previously descibed.  For instance, vec_$add_constant_i
     adds a scalar to a single-precision vector in a matrix, and there are
     three other versions:  vec_$dadd_constant_i which adds a scalar to a
     double-precision vector in a matrix, vec_$iadd_constant_i which adds a
     scalar to a 32-bit integer vector in a matrix, and vec_$iadd_constant16_i
     which adds a scalar to a 16-bit integer vector in a matrix.  The preci-
     sion 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_$add_constant      add a scalar to a vector
          vec_$add_constant_i    add a scalar to a vector in a matrix
          vec_$add_vector        add two vectors
          vec_$add_vector_i      add vectors in two matrixes
          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_$dot_i             return the dot product of two vectors in
                                 matrixes
          vec_$dp_sp             copy a double-precision vector to a
                                 single-precision vector
          vec_$dp_sp_i           copy a vector from a double-precision
                                 matrix into a single-precision matrix
          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_$max_i             find the maximum absolute value in a
                                 vector from a matrix
          vec_$mult_add          scale and add one vector to another
          vec_$mult_add_i        scale and add vectors in matrixes
          vec_$mult_constant     multiply a vector by a scalar
          vec_$mult_constant_i   multiply a vector in a matrix by a
                                 scalar
          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_$sp_dp             copy a single-precision vector to a
                                 double-precision vector
          vec_$sp_dp_i           copy a single-precision vector to a
                                 double-precision vector in matrixes
          vec_$sub               subtract vectors
          vec_$sub_i             subtract vectors in matrixes
          vec_$sum               sum the elements of a vector
          vec_$sum_i             sum the elements of a vector in a matrix
          vec_$swap              swap two vectors
          vec_$swap_i            swap two vectors in a matrix
          vec_$zero              zero a vector
          vec_$zero_i            zero a vector in a matrix

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