Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtract with overflow for integers #56

Open
mineichen opened this issue Mar 8, 2024 · 0 comments
Open

Subtract with overflow for integers #56

mineichen opened this issue Mar 8, 2024 · 0 comments

Comments

@mineichen
Copy link

There is currently no support for core::num::Wrapping(). If numbers overflow with #[cfg = debug_assertions], the program panics. It would be nice, if this library supports all of it's arithmetics for AutoSimd<[Wrapping<T>]> for all T=i8/i16/i32/i64/usize/isize/u8/u16/u32/u64 like for T itself. This seems to be the only overflow-mode in the proposal for std::simd::Simd. It would be very nice to have it in simba!

let x = AutoSimd([1, 2]);
println!("{}", x * x); // works
let x = AutoSimd([Wrapping(1), Wrapping(2)]);
println!("{}", x * x); // doesn't compile yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant