Lokathor / wide

A crate to help you go wide. By which I mean use SIMD stuff.
https://docs.rs/wide
zlib License
288 stars 24 forks source link

adding saturation arithmetic #122

Closed mcroomp closed 1 year ago

mcroomp commented 1 year ago

What do people think about adding saturating_add, sub, mul methods? Doesn't look like it would be too hard to add... there's intrinsics in safe_arch for this, and it would be useful in some signal processing scenarios that require sensible overflow handling. I can prepare a pull request if there isn't some reason that this wouldn't be a good idea.

The idea would be to just add them as methods, since the traits aren't stable.

Lokathor commented 1 year ago

Yeah we can generally accept new methods!

mcroomp commented 1 year ago

added #123

mcroomp commented 1 year ago

Done