Skip to content

Commit

Permalink
wasm AltiVec: add u16x8 and u8x16 avgr translations
Browse files Browse the repository at this point in the history
  • Loading branch information
wrv authored and mr-c committed Aug 20, 2024
1 parent 7e65734 commit f9bf637
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions simde/wasm/simd128.h
Original file line number Diff line number Diff line change
Expand Up @@ -5787,6 +5787,8 @@ simde_wasm_u8x16_avgr (simde_v128_t a, simde_v128_t b) {
r_.sse_m128i = _mm_avg_epu8(a_.sse_m128i, b_.sse_m128i);
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
r_.neon_u8 = vrhaddq_u8(a_.neon_u8, b_.neon_u8);
#elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE) || defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE)
r_.altivec_u8 = vec_avg(a_.altivec_u8, b_.altivec_u8);
#else
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.u8) / sizeof(r_.u8[0])) ; i++) {
Expand Down Expand Up @@ -5816,6 +5818,8 @@ simde_wasm_u16x8_avgr (simde_v128_t a, simde_v128_t b) {
r_.sse_m128i = _mm_avg_epu16(a_.sse_m128i, b_.sse_m128i);
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
r_.neon_u16 = vrhaddq_u16(a_.neon_u16, b_.neon_u16);
#elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE) || defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE)
r_.altivec_u16 = vec_avg(a_.altivec_u16, b_.altivec_u16);
#else
SIMDE_VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.u16) / sizeof(r_.u16[0])) ; i++) {
Expand Down

0 comments on commit f9bf637

Please sign in to comment.