Skip to content

Subtract with overflow for integers #56

Description

@mineichen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions