NAME
out_prd - compute outer product
out_div - compute outer quotient
PROTOTYPES
unitptr out_prd(int n1, int n2, unitptr dest)
unitptr out_div( int n1, int n2, unitptr dest)
ARGUMENTS
- int n1
- dimensionality of input vector 1
- int n2
- dimensionality of input vector 2
- unitptr dest
- host unit
RETURN VALUE:
- unitptr u:
- pointer to newly created unit
INTERFACE OF CREATED UNIT:
- X_in[n1]:
- (input field 0) first input vector
- Y_in[n2]:
- (input field 1) second input vector
- X_out[n1*n2]:
- (output field 0) outer product/quotient
of input vectors
EXECUTION:
The unit out_prd computes the outer product according to
X_out[i+j*n1] = X_in[i]*Y_in[j], i=0..n1-1, j=0..n2-1
The unit out_div computes the outer quotient according to
X_out[i+j*n1] = X_in[i]/Y_in[j], i=0..n1-1, j=0..n2-1
DESCRIPTION:
Creates a unit with two input fields of n1 and n2 pins, and
one output field of n1*n2 pins. The created unit becomes a
subunit of unit dest and computes the outer product of its
two inputs. For n2=1, the unit may be used to multiply a
vector X_in by the scalar value Y_in[0].
If one or both of n1,n2 are specified as negative integers,
the corresponding input field(s) and the output field will
be created as packed.
FILE:
nst_math
FILE
/local/homes/rhaschke/nst7/man/../o.linx86//../foldersrc/nst_vector.c