In SSE2, you can find the _mm_extract_epi16 and _mm_insert_epi16 in the <emmintrin.h> header.
SSE4.1 adds the _mm_extract_epi8, _mm_extract_epi32, _mm_insert_epi8 and _mm_insert_epi32 to the <smmintrin.h> header.
You can search for any of them to find the exact syntax and semantics, but in general, the extract forms take two arguments: A __m128i and a constant integer representing the index. Insert forms take the value __m128i, a value, and an index.
source share