Function core::arch::x86_64::_mm_minpos_epu16

1.27.0 · source ·
pub unsafe fn _mm_minpos_epu16(a: __m128i) -> __m128i
Available on (x86 or x86-64) and target feature sse4.1 and x86-64 only.
Expand description

Finds the minimum unsigned 16-bit element in the 128-bit __m128i vector, returning a vector containing its value in its first position, and its index in its second position; all other elements are set to zero.

This intrinsic corresponds to the VPHMINPOSUW / PHMINPOSUW instruction.


  • a - A 128-bit vector of type __m128i.


A 128-bit value where:

  • bits [15:0] - contain the minimum value found in parameter a,
  • bits [18:16] - contain the index of the minimum value
  • remaining bits are set to 0.

Intel’s documentation