Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vec — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SYSCALLS/VEC - vector arithmetic routines             1985/04/30


Include files:

     C:          /sys/ins/vec.ins.c
     Fortran:    /sys/ins/vec.ins.ftn
     Pascal:     /sys/ins/vec.ins.pas

All calls come in single and double precision floating point, and in
16- and 32-bit integer versions with the exception of VEC_$SP_DP,
VEC_$SP_DP_I, VEC_$DP_SP, and VEC_$DP_SP_I.

In single-precision versions, all floating-point parameters
are single precision;  in double-precision versions, all floating-point
parameters are double precision.  In integer routines, all vectors
and matrices are of the appropriate integer size.  Indices and
vector lengths are 4 byte integers everywhere.

Routine names come in 4 "flavors" depending on the data type.
Single-precision routines have a simple name.  Double precision
routines add a 'd' after the 'vec_$' prefix.  32-bit integer
routines add an 'i' after the 'vec_$' prefix.  16-bit integer
routines add an 'i' after the 'vec_$' prefix and '16' at the
end of the name (but preceding the '_i' suffix for incremental
routines).  For example:

   VEC_$ADD_CONSTANT - single precision floating point
   VEC_$DADD_CONSTANT - double precision floating point
   VEC_$IADD_CONSTANT - 32-bit integer
   VEC_$IADD_CONSTANT16 - 16-bit integer

   VEC_$DADD_CONSTANT_I - double precision floating point, incremental
   VEC_$IADD_CONSTANT16_I - 16-bit integer, incremental
           .
           .               (etc.)
           .


Procedures and Functions:


    VEC_$[D,I]ADD_CONSTANT[16] (start_vec, length, constant, result_vec)
        Adds a constant to a vector.

    VEC_$[D,I]ADD_CONSTANT[16]_I (start_vec, inc1, length, constant,
                                  result_vec, inc2)
        Adds a constant to a vector, stepping through the vector
        by increments.

    VEC_$[D,I]ADD_VECTOR[16] (start_vec, add_vec, length, result_vec)
        Adds two vectors.

    VEC_$[D,I]ADD_VECTOR[16]_I(start_vec, inc1, add_vec, inc2, length,
                               result_vec, inc3)
        Adds two vectors, stepping through them by increments.

    VEC_$[D,I]COPY[16] (start_vec, result_vec, length)
        Copies elements from one vector to another.

    VEC_$[D,I]COPY[16]_I (vec1, inc1, vec2, inc2, length)
        Copies elements from one vector to another, stepping through
        the vectors by increments.

    result = VEC_$[D,I]DOT[16] (vec1, vec2, length)
        Calculates the dot product of two vectors.

    result = VEC_$[D,I]DOT[16]_I (vec1, inc1, vec2, inc2, length)
        Calculates the dot product of two vectors, stepping through the
        vectors by increments.

    VEC_$DP_SP (dp_vec, sp_vec, length)
        Copies a double precision vector to a single precision vector.

    VEC_$DP_SP_I (dp_vec, inc1, sp_vec, inc2, length)
        Copies a double precision vector to a single precision
        vector, stepping through the vectors incrementally.

    VEC_$[D,I]INIT[16] (vector, length, constant)
        Initializes a vector with a constant.

    VEC_$[D,I]MAT_MULT[16] (matrix1, matrix2, out_matrix)
        Multiplies two 4 x 4 matrices, returning the result in a 4 x 4
        matrix.

    VEC_$[D,I]MAT_MULTN[16] (matrix1, matrix2, m, n, s, out_matrix)
        Multiplies two variably-dimensioned matrices, returning the result
        in a third matrix.

    VEC_$[D,I]MAX[16] (start_vec, length, result, result_loc)
        Finds the element with the greatest maximum absolute value in a
        vector and returns its value and location.

    VEC_$[D,I]MAX[16]_I (start_vec, inc, length, result, result_loc)
        Searches a vector for the maximum absolute value, stepping
        through the vector by increments greater than 1.

    VEC_$[D,I]MULT_ADD[16] (add_vec, mult_vec, length, constant, result_vec)
        Multiplies a vector by a constant and adds the result to a
        second vector.

    VEC_$[D,I]MULT_ADD[16]_I (add_vec, inc1, mult_vec, inc2,
                              length, constant, result_vec, inc3)
        Multiplies a vector by a constant and adds the result to a
        second vector, stepping through both vectors and the
        result by increments.

    VEC_$[D,I]MULT_CONSTANT[16] (mult_vec, length, constant, result_vec)
        Multiplies a vector by a scalar constant and returns
        the result in a second vector.

    VEC_$[D,I]MULT_CONSTANT[16]_I (mult_vec, inc1, length, constant,
                                   result_vec, inc2)
        Multiplies a vector by a scalar constant, returns the result
        in a second vector, and steps through the vectors by increments.

    VEC_$[D,I]POSTMULT[16] (matrix, col_vec, result_vec)
        Postmultiplies a 4x4 matrix by a 4x1 column vector, returning the
        result in a second vector.

    VEC_$[D,I]POSTMULTN[16] (matrix, col_vec, m, n, result_vec)
        Postmultiplies a variably-dimensioned matrix by an n x 1 vector,
        returning the result in a second vector.

    VEC_$[D,I]PREMULT[16] (row_vec, matrix, result_vec)
        Premultiplies a 4 x 4 matrix by a 1 x 4 row vector, returning the
        result in a second vector.

    VEC_$[D,I]PREMULTN[16] (row_vec, matrix, m, n, result_vec)
        Premultiplies a variably-dimensioned matrix by a 1 x n row vector,
        returning the result in a second vector.

    VEC_$SP_DP (sp_vec, dp_vec, length)
        Copies a single precision vector to a double precision vector.

    VEC_$SP_DP_I (sp_vec, inc1, dp_vec, inc2, length)
        Copies a single precision vector to a double precision
        vector, stepping through the vectors incrementally.

    VEC_$[D,I]SUB[16] (start_vec, sub_vec, length, result_vec)
        Subtracts one vector from another.

    VEC_$[D,I]SUB[16]_I (start_vec, inc1, sub_vec, inc2, length,
                         result_vec, inc3)
        Subtracts one vector from another, stepping through the vectors
        by increments.

    sum = VEC_$[D,I]SUM[16] (vec, length)
        Sums the elements of a vector.

    sum = VEC_$[D,I]SUM[16]_I (vec, inc, length)
        Sums the elements of a vector, stepping through the vector by
        increments.

    VEC_$[D,I]SWAP[16] (vec1, vec2, length)
        Swaps the elements of two vectors.

    VEC_$[D,I]SWAP[16]_I (vec1, inc1, vec2, inc2, length)
        Swaps the elements of two vectors, stepping through the
        vectors by increments.

    VEC_$[D,I]ZERO[16] (vector, length)
        Zeros a vector.

    VEC_$[D,I]ZERO[16]_I (vector, inc, length)
        Zeros a vector by increments.

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