simdpp::mul_lo(integer)

From libsimdpp-docs
< int
template<unsigned N, class E1, class E2>
Ret<N, _DETAIL_> mul_lo( Vec1<N,E1> a, Vec2<N,E2> b );

Multiplies two vectors with integer values and returns the lower part of the result. The implementation behaves as if the following set of overloads is provided:

Ret Vec1 Vec2
int16 int16 int16
uint16 uint16 int16
uint16 int16 uint16
uint16 uint16 uint16
int32 int32 int32
uint32 uint32 int32
uint32 int32 uint32
uint32 uint32 uint32

The return type is a vector expression.

Scalar arguments[edit]

Several additional overloads are provided to implement implicit conversions from scalar types. Values of the following types are accepted as the first or the second argument: int32_t, int64_t, uint32_t, uint64_t. Each element of the expanded vector contains bitwise representation of the source value, with the highest bits discarded if the source data is too large.

The return type is a vector expression. The vector type is the same as the vector argument except that masks are unmasked to respective non-mask vector types.

Parameters[edit]

a, b - integer vectors

Return value[edit]

A vector expression evaluating to a * b.

Equivalent operation[edit]

r0 = a0 * b0
...
rN = aN * bN

See also[edit]

performs multiplication, returns higher half of the result
(function template)
computes the product of all elements in the vector
(function template)
performs multiplication, extends element width
(function template)