Intel® C++ Compiler 16.0 User and Reference Guide

Concatenate Intrinsics

These Supplemental Streaming SIMD Extensions 3 (SSSE3) intrinsics are used concatenation. The prototypes for these intrinsics are in tmmintrin.h. You can also use the ia32intrin.h header file for these intrinsics.

_mm_alignr_epi8

extern __m128i _mm_alignr_epi8(__m128i a, __m128i b, int n);

Concatenates a and b, extracts byte-aligned result shifted to the right by n.

Interpreting t1 as 256-bit unsigned integer, a, b, and r as 128-bit unsigned integers:

t1[255:128] = a;
t1[127:0] = b;
t1[255:0] = t1[255:0] >> (8 * n); // unsigned shift
r[127:0] = t1[127:0];

_mm_alignr_pi8

extern __m64 _mm_alignr_pi8(__m64 a, __m64 b, int n);

Concatenates a and b, extracts byte-aligned result shifted to the right by n.

Interpreting t1 as 128-bit unsigned integer, a, b, and r as 64-bit unsigned integers:

t1[127:64] = a;
t1[63:0] = b;
t1[127:0] = t1[127:0] >> (8 * n); // unsigned shift
r[63:0] = t1[63:0];