Function dot_product_m128
pub fn dot_product_m128<const IMM: i32>(a: m128, b: m128) -> m128
Available on crate feature
dep_safe_arch
only.Expand description
Performs a dot product of two m128
registers.
The output details are determined by a control mask:
-
For each lane, you can multiply that lane from
a
andb
or you can take a default of 0.0 -
Bits 4 through 7 determine if we should mul lanes 0 through 3.
-
This forms four temporary
f32
values which are summed to a singlef32
. -
For each output lane, you can have the sum in that lane or 0.0.
-
Bits 0 through 3 determines if the
sum
is in lanes 0 through 3. -
Intrinsic:
_mm_dp_ps
-
Assembly:
dpps xmm, xmm, imm8