]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #93146 - workingjubilee:use-std-simd, r=Mark-Simulacrum
authorbors <bors@rust-lang.org>
Thu, 3 Feb 2022 09:15:16 +0000 (09:15 +0000)
committerbors <bors@rust-lang.org>
Thu, 3 Feb 2022 09:15:16 +0000 (09:15 +0000)
pub use std::simd::StdFloat;

Syncs portable-simd up to commit rust-lang/portable-simd@03f6fbb21e6050da2a05b3ce8f480c020b384916,
Diff: https://github.com/rust-lang/portable-simd/compare/533f0fc81ab9ba097779fcd27c8f9ea12261fef5...03f6fbb21e6050da2a05b3ce8f480c020b384916

This sync requires a little bit more legwork because it also introduces a trait into `std::simd`, so that it is no longer simply a reexport of `core::simd`. Out of simple-minded consistency and to allow more options, I replicated the pattern for the way `core::simd` is integrated in the first place, however this is not necessary if it doesn't acquire any interdependencies inside `std`: it could be a simple crate reexport. I just don't know yet if that will happen or not.

To summarize other misc changes:
- Shifts no longer panic, now wrap on too-large shifts (like `Simd` integers usually do!)
- mask16x32 will now be many i16s, not many i32s... ðŸ™ƒ
- `#[must_use]` is spread around generously
- Adjusts division, float min/max, and `Mask::{from,to}_array` internally to be faster
- Adds the much-requested `Simd::cast::<U>` function (equivalent to `simd.to_array().map(|lane| lane as U)`)

1  2 
library/std/src/lib.rs

index 3a6b931f53b9d090ade08e2bdff0c0977dc8bc81,159b5027455ae63e0ef57015002b195373a2d628..4f44a3183a6eca0263c7e8de6948854b60e28551
  #![feature(once_cell)]
  #![feature(panic_info_message)]
  #![feature(panic_internals)]
 +#![feature(panic_can_unwind)]
  #![feature(panic_unwind)]
  #![feature(pin_static_ref)]
+ #![feature(platform_intrinsics)]
  #![feature(portable_simd)]
  #![feature(prelude_import)]
  #![feature(ptr_as_uninit)]