What does the _mm_set_epi8
do?
I'm reading the documentation but I can't understand it, what is r0..r15?
_mm_set_epi8
is just a convenience macro which initialises a 128 bit SSE __m128i
vector to a specified set of values (16 x 8 bit values in this case), e.g.
__m128i v = _mm_set_epi8(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
will set v
to the 128 bit value: 0x000102030405060708090a0b0c0d0e0f
.
There are other similar macros for different vector element types, e.g. _mm_set_epi16
, _mm_set_epi32
, _mm_set_ps
, etc.
(Note: the documentation you linked to in your question is not very good, but r0..r15 apparently just refer to the individual 8 bit fields within the returned vector).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With