NAME
sum_vec - create unit that adds two vectors
dif_vec - create unit that subtracts two vectors
mul_vec - create unit that multiplies two vectors
PROTOTYPES
unitptr sum_vec(int n, unitptr dest)
unitptr dif_vec(int n, unitptr dest)
unitptr mul_vec(int n, unitptr dest)
ARGUMENTS
- int n
- input vector dimension
- unitptr dest
- host unit
RETURN VALUE:
- unitptr u:
- pointer to newly created unit
INTERFACE OF CREATED UNIT:
- X_in[n]:
- (input field 0) first input vector
- Y_in[n]:
- (input field 1) second input vector
- X_out[n]:
- (output field 0) output vector
EXECUTION OF CREATED UNIT:
- X_out=X_in+Y_in
- for sum_vec
- X_out=X_in-Y_in
- for dif_vec
- X_out=X_in*Y_in
- for mul_vec
DESCRIPTION:
Both routines create a unit with two input fields and one
output field of n pins each. The created unit becomes a
subunit of unit dest. The indicated operations are carried
out on pairs of corresponding vector components.
If n is specified as a negative integer, all fields
are created as packed fields with ABS(n) pins.
FILE:
nst_math
FILE
/homes/jontrup/nst5/man/../o.sol2//../nstsrc/nst_misc.c