<>2 SIMD Instruction set usage

**2.1 Naming rules

2.1.1 Scalar operation and vector operation **
Scalar operation _mm_add_ss _mm_sub_ss _mm_mul_ss _mm_div_ss
Vector operation _mm_add_ps _mm_sub_ps _mm_mul_ps _mm_div_ps
scalar (Scalar) operation : for example __m128 _m_add_ss(__m128 a, __m128 b)

vector (packed) operation : for example __m128 _m_add_ps(__m128 a, __m128 b)

2.1.2 Byte alignment and no byte alignment
Byte alignment required _mm_load_ps _mm_store_ps
No byte alignment required _mm_loadu_ps _mm_storeu_ps

2.1.3 Integer and floating point
integer _mm_add_epi16 _mm_add_epi32
float _mm_add_ps _mm_add_pd

2.1.4 saturated (Saturate) Operation and unsaturated operation
Saturation operation _mm_adds_epi8 _mm_subs_epi8
Unsaturated operation _mm_add_epi8 _mm_sub_epi8
The saturation operation means that it exceeds a certain value “ maximum ” The value of the value is set to “ maximum ”, And below “ minimum value ” The value of is set to “ minimum ”. for example , If an arithmetic operation is performed on an unsigned byte , be “128 +
128” by “256”( hexadecimal 0x100), There is overflow . Normal whole

Technology
Daily Recommendation