Repository navigation
v0.7.0
This release has an MSRV of 1.89.
Added
- Added
i64x2,i64x4,i64x8,u64x2,u64x4, andu64x8vector types, the native-widthi64sandu64sassociated types, and 64-bit integer operations across all backends. (#253, #310 by @Shnatsel) - Added an
Sse2level. This is the new baseline for i686-* and x86_64-* targets, replacingFallback. It is detected at runtime on Tier-2 i586-* targets. (#270 by @Shnatsel) - Added
shift_elements_left,shift_elements_right,rotate_elements_left, androtate_elements_rightto non-mask vectors. Shifts accept a padding element and fill the entire vector when the offset is at least its lane count; rotations wrap the offset. (#274 by @Shnatsel) - Added full-vector
swizzle_dynandswizzle_dyn_precisebyte swizzles.swizzle_dynpermits implementation-defined results for out-of-range indices, whileswizzle_dyn_precisealways returns zero for them. (#276, #304 by @Shnatsel) - Added the
SimdElement::BITSconstant, exposing the bit width of a vector's lane type to generic code. (#296 by @danderson) - Added trait bounds on
SimdElement, and introduced theSimdIntElementandSimdFloatElementsubtraits. These allow generic code to access many math and utility operations on the elements of SIMD vector types. (#302 by @danderson) - Added the
SimdWidenandSimdNarrowtraits, providing widening, narrowing, and saturating narrowing operations for all integer and floating-point vector types. (#300 by @Shnatsel) - Four-way interleaved load and store operations are now exposed on the vector types they operate on and are available to generic code through
SimdInterleaved. (#321 by @Shnatsel)
Changed
- Breaking change: the
load_interleaved_128_*andstore_interleaved_128_*methods, which exchanged one 512-bit vector, have been replaced byload_four_interleaved_*andstore_four_interleaved_*. The new methods exchange an array of four 128-bit vectors directly and are available for all non-mask scalar types. (#298 by @Shnatsel) - Breaking change:
new_unchecked()on SIMD level tokens such asAvx2has been renamed toassume_supported(). It is safe to call from contexts containing the appropriate#[target_feature]annotations. Functions without those annotations can still call it inside anunsafeblock. (#293 by @Shnatsel) - Breaking change: the
fxsrCPU feature is now required for all x86 SIMD levels. It is present in hardware on all SIMD-capable CPUs, but can be disabled in some emulators combined with a custom Rust target specification. (#270 by @Shnatsel) - Breaking change: operations shared by integer and floating-point vectors have moved from
SimdInt/SimdFloattoSimdBase, allowing code generic over any non-mask vector to use arithmetic, comparisons, zip/unzip, and interleave/deinterleave operations. (#308 by @Shnatsel) - Breaking change:
min,max,min_precise, andmax_precisehave moved fromSimdInt/SimdFloattoSimdBase. (#313 by @Shnatsel) - Breaking change: the 204 vector-specific
Simdarray conversion methods have been replaced by the genericSimdBase::load_array,load_array_ref,as_array,as_array_ref,as_array_mut, andstore_arraymethods. Masks continue to useSimdMask::from_sliceandstore_slice. (#292 by @Shnatsel) - On x86_64 targets with static SSE2 support,
Level::baseline()now returnsSse2instead ofFallback. (#270 by @Shnatsel) - The scalar
Fallbackbackend andLevel::Fallbackvariant are no longer compiled when the target has a better ambient SIMD baseline, such as SSE2 on x86 or NEON on AArch64. Theforce_support_fallbackfeature continues to make them available for testing. (#320 by @Shnatsel) - Runtime CPU feature detection performed by
Level::new()is now cached on x86. (#278 by @Shnatsel) - Integer shifts by an amount greater than or equal to the element width are now explicitly documented as platform-dependent. Scalar fallback shifts use wrapping shift amounts instead of potentially panicking in debug builds. (#283 by @Shnatsel)
- Full-vector 8-bit shifts on x86 have been optimized, including a 2.4× faster left-shift formulation and faster signed and unsigned right shifts. (#291 by @Shnatsel)
- Native-width non-mask vector types now share
u8sas their byte representation, enablingBytes::bitcastbetween arbitrary lane types in code generic overSimd. (#284 by @Shnatsel) - Generic bounds now encode existing relationships between masks, vectors, blocks, elements, and split/combined vector types. (#285 by @Shnatsel)
SimdBase::Arraynow guaranteesCopy,Debug, by-valueIntoIterator,AsRef,AsMut, and conversion from its vector type. (#285 by @Shnatsel)SimdandSimdBasenow requireDebug. (#309 by @Shnatsel)- The
Simd::vectorizedocumentation now explains when to use it and includes an end-to-end example. (#312 by @Shnatsel) - Generated code and metadata have been substantially reduced, cutting x86 build time by roughly one third. (#292, #317, #318 by @Shnatsel)
Removed
- Breaking change: removed the low-level
reinterpret_f32_*,reinterpret_f64_*,reinterpret_i32_*,reinterpret_u32_*,reinterpret_u8_*,cvt_to_bytes_*, andcvt_from_bytes_*methods. UseBytes::bitcastfor arbitrary same-width bit reinterpretation, orBytes::to_bytesandBytes::from_bytesfor direct byte-vector conversions. (#284 by @Shnatsel) - Breaking change: removed the
WithSimdtrait, which only delegated to thedispatch!macro. Usedispatch!directly instead. (#306 by @Shnatsel)
Fixed
- Integer negation in the scalar fallback now wraps for the minimum signed value, matching SIMD backends instead of potentially panicking in debug builds. (#253 by @Shnatsel)
- Fixed x86 8-bit left shifts: overflowing
u8lanes now wrap instead of saturating, andi8lanes now match Rust's signed shift semantics. (#288, #290 by @danderson)
Full Changelog: v0.6.0...v0.7.0