# 1.27.0[−][src]Function core::arch::x86_64::_mm_mpsadbw_epu8

    pub unsafe fn _mm_mpsadbw_epu8(a: __m128i, b: __m128i, imm8: i32) -> __m128i

This is supported on x86-64 and target feature `sse4.1` only.

Subtracts 8-bit unsigned integer values and computes the absolute values of the differences to the corresponding bits in the destination. Then sums of the absolute differences are returned according to the bit fields in the immediate operand.

The following algorithm is performed:

ⓘThis example is not tested

    i = imm8[2] * 4
    j = imm8[1:0] * 4
    for k := 0 to 7
        d0 = abs(a[i + k + 0] - b[j + 0])
        d1 = abs(a[i + k + 1] - b[j + 1])
        d2 = abs(a[i + k + 2] - b[j + 2])
        d3 = abs(a[i + k + 3] - b[j + 3])
        r[k] = d0 + d1 + d2 + d3Run

Arguments:

- `a` - A 128-bit vector of type `__m128i`.
- `b` - A 128-bit vector of type `__m128i`.
- `imm8` - An 8-bit immediate operand specifying how the absolute differences are to be calculated
  - Bit `[2]` specify the offset for operand `a`
  - Bits `[1:0]` specify the offset for operand `b`

Returns:

- A `__m128i` vector containing the sums of the sets of absolute differences between both operands.

Intel's documentation

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)