Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vec_imult_constant16(A) — Apollo Domain/OS SR10.4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vec_$dmult_constant

vec_$imult_constant

vec_$imult_constant16_i

vec_$mult_constant

VEC_$IMULT_CONSTANT16             Domain/OS              VEC_$IMULT_CONSTANT16


NAME
     vec_$imult_constant16 - multiply a 16-bit integer vector by a scalar

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

     void vec_$imult_constant16(
          short *mult_vec,
          long int &length,
          short &constant,
          short *result_vec)

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

     procedure vec_$imult_constant16(
          in mult_vec: univ vec_$integer16_vector;
          in length: integer32;
          in constant: integer16;
          out result_vec: univ vec_$integer16_vector);

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

           parameter (nvec = 10)

           integer*2 mult_vec(nvec), result_vec(nvec), constant
           integer*4 length

           call vec_$imult_constant16(mult_vec, length, constant, result_vec)

DESCRIPTION
     Vec_$imult_constant16 multiplies the 16-bit integer array mult_vec by the
     scalar value constant and supplies the result in the array result_vec.

     In C, the resulting operation is

          for (i = 0; i < length; ++i)
               result_vec[i] = constant * start_vec[i];

     In Pascal, the resulting operation is

          for i := 1 to length do
               begin
               result_vec[i] := constant * start_vec[i];
               end

     In FORTRAN, the resulting operation is

           do 10 i = 1, length
               result_vec(i) = constant * mult_vec(i)
       10  continue

     mult_vec
          The vector to multiply by constant.

     length
          The number of elements to multiply.

     constant
          The scalar constant to multiply mult_vec by.

     result_vec
          The vector resulting from multiplying mult_vec by constant.

NOTES
     When vec_$imult_constant16 is used to operate on matrixes in C and Pas-
     cal, mult_vec and result_vec are row vectors; whereas in FORTRAN, they
     are column vectors.

SEE ALSO
     vec_$dmult_constant, vec_$imult_constant, vec_$imult_constant16_i,
     vec_$mult_constant.

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