Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ You can find its changes [documented below](#070-2026-08-11).
- Added lane-wise `count_ones` and `count_zeros` operations for all integer vector types and backends.
- Added `mul_add_precise` and `mul_sub_precise` for floating-point vectors. They guarantee the infinite-precision product-plus-add rounded once, including on SIMD levels without hardware fused multiply-add instructions. They are not susceptible to the [bug](https://github.com/rust-lang/compiler-builtins/issues/1262) in Rust standard library, `std::simd` and musl libc that causes incorrect rounding for subnormal results. SSE4.2 gets SIMD emulation of these operations for better performance. ([#323][], [#324][] by [@Shnatsel][])
- Documented the storage representation of the SIMD vector types. The documented representation will not change without a semver major version change.
- Added `TryFrom` bounds to `SimdIntElement`, allowing attempted conversion from all primitive integer types.

### Changed

Expand Down
13 changes: 13 additions & 0 deletions fearless_simd/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
reason = "TODO: https://github.com/linebender/fearless_simd/issues/40"
)]
use crate::{Simd, SimdBase, seal::Seal};
use core::error::Error;
use core::fmt::{Binary, Debug, Display, LowerExp, UpperExp};
use core::iter::{Product, Sum};
use core::ops::{
Expand Down Expand Up @@ -219,6 +220,18 @@ pub trait SimdIntElement:
+ BitOrAssign<Self>
+ BitXor<Self, Output = Self>
+ BitXorAssign<Self>
+ TryFrom<u8, Error: Copy + Error + Eq>
+ TryFrom<u16, Error: Copy + Error + Eq>
+ TryFrom<u32, Error: Copy + Error + Eq>
+ TryFrom<u64, Error: Copy + Error + Eq>
+ TryFrom<u128, Error: Copy + Error + Eq>
+ TryFrom<usize, Error: Copy + Error + Eq>
+ TryFrom<i8, Error: Copy + Error + Eq>
+ TryFrom<i16, Error: Copy + Error + Eq>
+ TryFrom<i32, Error: Copy + Error + Eq>
+ TryFrom<i64, Error: Copy + Error + Eq>
+ TryFrom<i128, Error: Copy + Error + Eq>
+ TryFrom<isize, Error: Copy + Error + Eq>
+ for<'a> Shl<&'a usize, Output = Self>
+ for<'a> ShlAssign<&'a usize>
+ for<'a> Shr<&'a usize, Output = Self>
Expand Down
Loading