Initializing the __m128i vector without using SSE instructions is possible, but depends on how the compiler defines __m128i.
For Microsoft Visual Studio, you can define the following macros (it defines __m128i as char [16]):
template <class T> inline char GetChar(T value, size_t index) { return ((char*)&value)[index]; }
For GCC, it will be (it defines __m128i as long long [2]):
So, in your code, the initialization of the __m128i constant will look like this:
const __m128i K8 = _MM_SETR_EPI8(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); const __m128i K16 = _MM_SETR_EPI16(1, 2, 3, 4, 5, 6, 7, 8); const __m128i K32 = _MM_SETR_EPI32(1, 2, 3, 4);