Developer Guide and Reference

Contents

Multiplication Operators

The multiplication operators can only accept and return data types from the
I[s|u]16vec4
or
I[s|u]16vec8
classes, as shown in the following example.
Syntax Usage for Multiplication Operators
Explicitly convert B to
Is16vec4
.
Is16vec4 A,C;
Iu32vec2 B;
C = A * C;
C = A * (Is16vec4)B;
Return nearest common ancestor type,
I16vec4
Is16vec4 A;
Iu16vec4 B;
I16vec4 C;
C = A + B;
The
mul_high
and
mul_add
functions take
Is16vec4
data only.
Is16vec4 A,B,C,D;
C = mul_high(A,B);
D = mul_add(A,B);
Multiplication Operators with Corresponding Intrinsics
Symbols
Syntax Usage
Intrinsic
*
*=
R = A * B
R *= A
_mm_mullo_pi16
_mm_mullo_epi16
mul_high
N/A
R = mul_high(A, B)
_mm_mulhi_pi16
_mm_mulhi_epi16