_mm_hadd_epi16
Classification
SSE_ALL, Arithmetic, CPUID Test: SSSE3
Header File
Instruction
PHADDW xmm, xmm
Synopsis
_mm_hadd_epi16(__m128i a, __m128i b);
Description
Horizontally add adjacent pairs of 16-bit integers in "a" and "b", and pack the signed 16-bit results in "dst".
Operation
dst[15:0] := a[31:16] + a[15:0]
dst[31:16] := a[63:48] + a[47:32]
dst[47:32] := a[95:80] + a[79:64]
dst[63:48] := a[127:112] + a[111:96]
dst[79:64] := b[31:16] + b[15:0]
dst[95:80] := b[63:48] + b[47:32]
dst[111:96] := b[95:80] + b[79:64]
dst[127:112] := b[127:112] + b[111:96]