Mercurial > vec
diff src/vec.c @ 25:92156fe32755
impl/ppc/altivec: update to new implementation
the signed average function is wrong; it needs to round up the number
when only one of them is odd, but that doesn't necessarily seem to be
true because altivec is weird, and that's what we need to emulate the
quirks for. ugh.
also the altivec backend uses the generic functions instead of fallbacks
because it does indeed use the exact same memory structure as the generic
implementation...
author | Paper <paper@tflc.us> |
---|---|
date | Sun, 24 Nov 2024 11:15:59 +0000 |
parents | e26874655738 |
children |
line wrap: on
line diff
--- a/src/vec.c Sun Nov 24 03:32:53 2024 -0500 +++ b/src/vec.c Sun Nov 24 11:15:59 2024 +0000 @@ -55,6 +55,9 @@ extern inline vec_intmax vec_rshift(vec_intmax x, unsigned int y); extern inline vec_intmax vec_lshift(vec_intmax x, unsigned int y); +extern inline vec_intmax vec_avg(vec_intmax x, vec_intmax y); +extern inline vec_uintmax vec_uavg(vec_uintmax x, vec_uintmax y); + // 16-bit const vint8x2_impl *vint8x2_impl_cpu = &vint8x2_impl_generic; const vuint8x2_impl *vuint8x2_impl_cpu = &vuint8x2_impl_generic;