AVX_ALL-Probability/Statistics-YMM#
_mm256_avg_epu8#
- Tech:
AVX_ALL
- Category:
Probability/Statistics
- Header:
immintrin.h
- Searchable:
AVX_ALL-Probability/Statistics-YMM
- Register:
YMM 256 bit
- Return Type:
__m256i
- Param Types:
__m256i a, __m256i b
- Param ETypes:
UI8 a, UI8 b
__m256i _mm256_avg_epu8(__m256i a, __m256i b);
Intel Description
Average packed unsigned 8-bit integers in “a” and “b”, and store the results in “dst”.
Intel Implementation Psudeo-Code
FOR j := 0 to 31
i := j*8
dst[i+7:i] := (a[i+7:i] + b[i+7:i] + 1) >> 1
ENDFOR
dst[MAX:256] := 0
_mm256_avg_epu16#
- Tech:
AVX_ALL
- Category:
Probability/Statistics
- Header:
immintrin.h
- Searchable:
AVX_ALL-Probability/Statistics-YMM
- Register:
YMM 256 bit
- Return Type:
__m256i
- Param Types:
__m256i a, __m256i b
- Param ETypes:
UI16 a, UI16 b
__m256i _mm256_avg_epu16(__m256i a, __m256i b);
Intel Description
Average packed unsigned 16-bit integers in “a” and “b”, and store the results in “dst”.
Intel Implementation Psudeo-Code
FOR j := 0 to 15
i := j*16
dst[i+15:i] := (a[i+15:i] + b[i+15:i] + 1) >> 1
ENDFOR
dst[MAX:256] := 0