vectorized prefix ~sum~ function composition
send help
| GitHub | https://github.com/bal-e |
| Website | https://bal-e.org |
| Pronouns | she/her |
| GitHub | https://github.com/bal-e |
| Website | https://bal-e.org |
| Pronouns | she/her |
vectorized prefix ~sum~ function composition
send help
AVX2 tip! `PANDN(x, PCMPEQB(y, 0))` where the MSB of `y` is always unset can be transformed into `PSIGN(y, x)`. If you want to mask some elements `x` based on whether an input `y` is non-zero, and the MSB of `y` is always unset, you can multiply `x` by the sign of `y` (which will be 0 or 1) in 1 cycle using `PSIGN`. I think this is actually a pretty common pattern, but compilers can't really see it because of the MSB check.
why are unconstrained generic const parameters making me sad
can I not have nice things
Version 0.2.0 of `npsimd` is now published, with a new low-level API that supports runtime feature detection (currently only SSE2 is implemented). I'm going to slowly migrate all the existing functionality over to it, and then work on a better higher-level API. See <https://docs.rs/npsimd>!