VSIPL++ provides a number of operations that operate on the elements of views (Vector, Matrix, or Tensor objects) independently.
Two types of assignment operators are supported: assignment of a view to another view of the same size and dimensionality (that is, assignment of a Vector to a Vector, a Matrix to a Matrix, or a Tensor to a Tensor), and assignment of a scalar value to a view.
A = B
B to
the corresponding elements of A.A = b
b to all of
the elements of A.Note that the assignment operator always produces a copy of the values being assigned; it does not produce a reference to the same data. To create a view referencing data in an existing view, create a subview instead (see section 2.4.6).
Other assignment operators are also supported for both types of assignment. For the case of assigning a view to another view, these operators are:
A += B
B to the elements of
A.A -= B
B from the
elements of A.A *= B
A by the
elements of B.A /= B
A by the elements
of B.A &= B
A
andB to the elements of
A.A |= B
A
andB to the elements of
A.A ^= B
A and
B to the elements of A.The assignment operators for assigning a scalar value to a view are
equivalent. Here, A += b adds the value of
b to each element of A, and the other
assignment operators are defined analogously for the scalar-valued
case.