Mercurial > vec
comparison 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 |
comparison
equal
deleted
inserted
replaced
24:e49e70f7012f | 25:92156fe32755 |
---|---|
52 extern inline vec_uintmax vec_llshift(vec_uintmax x, unsigned int y); | 52 extern inline vec_uintmax vec_llshift(vec_uintmax x, unsigned int y); |
53 extern inline vec_uintmax vec_urshift(vec_uintmax x, unsigned int y); | 53 extern inline vec_uintmax vec_urshift(vec_uintmax x, unsigned int y); |
54 extern inline vec_uintmax vec_ulshift(vec_uintmax x, unsigned int y); | 54 extern inline vec_uintmax vec_ulshift(vec_uintmax x, unsigned int y); |
55 extern inline vec_intmax vec_rshift(vec_intmax x, unsigned int y); | 55 extern inline vec_intmax vec_rshift(vec_intmax x, unsigned int y); |
56 extern inline vec_intmax vec_lshift(vec_intmax x, unsigned int y); | 56 extern inline vec_intmax vec_lshift(vec_intmax x, unsigned int y); |
57 | |
58 extern inline vec_intmax vec_avg(vec_intmax x, vec_intmax y); | |
59 extern inline vec_uintmax vec_uavg(vec_uintmax x, vec_uintmax y); | |
57 | 60 |
58 // 16-bit | 61 // 16-bit |
59 const vint8x2_impl *vint8x2_impl_cpu = &vint8x2_impl_generic; | 62 const vint8x2_impl *vint8x2_impl_cpu = &vint8x2_impl_generic; |
60 const vuint8x2_impl *vuint8x2_impl_cpu = &vuint8x2_impl_generic; | 63 const vuint8x2_impl *vuint8x2_impl_cpu = &vuint8x2_impl_generic; |
61 | 64 |