Skip to content

Sync upstream #353

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

Merged
merged 28 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
af2bc4e
Merge commit 'a8385522ade6f67853edac730b5bf164ddb298fd' into simd-rem…
workingjubilee Dec 3, 2021
35883a7
Merge commit '533f0fc81ab9ba097779fcd27c8f9ea12261fef5' into psimd
petrochenkov Dec 17, 2021
efb20c2
Sync rust-lang/portable-simd@03f6fbb21e6050da2a05b3ce8f480c020b384916
workingjubilee Jan 27, 2022
8adbb99
Switch bootstrap cfgs
Mark-Simulacrum Feb 23, 2022
754e077
Sync rust-lang/portable-simd@5f49d4c8435a25d804b2f375e949cb25479f5be9
workingjubilee Feb 28, 2022
ebb7423
Rollup merge of #94452 - workingjubilee:sync-simd-bitmasks, r=working…
Dylan-DPC Mar 1, 2022
700972b
Fix unused_doc_comments lint errors
GuillaumeGomez Mar 2, 2022
c43129f
Use implicit capture syntax in format_args
mahmoud-moursy Feb 12, 2022
94c7da0
Sync portable-simd to rust-lang/portable-simd@72df4c45056a8bc0d1b3f06…
workingjubilee Mar 13, 2022
62e239c
portable-simd: use simd_arith_offset to avoid ptr-int transmutation
RalfJung Apr 12, 2022
352e7b3
Finish bumping stage0
Mark-Simulacrum May 20, 2022
210275c
Sync core::simd up to rust-lang/portable-simd@2e081db92aa3ee0a4563bc2…
workingjubilee Jul 21, 2022
e2aec07
Fix a bunch of typo
dzvon Aug 18, 2022
1a6a069
separate the receiver from arguments in HIR under /clippy
TaKO8Ki Sep 1, 2022
6afcb85
Fix rustdoc lints
Mark-Simulacrum Nov 2, 2022
3cb40e5
Remove unnecessary `&format!`
nvzqz Jan 22, 2023
ddcb68a
Match unmatched backticks in library/
est31 Mar 3, 2023
2806570
remove some unneeded imports
kadiwa4 Aug 9, 2022
92a6d25
Merge from rustc
oli-obk Apr 17, 2023
a0d853c
Merge from rustc
RalfJung Apr 26, 2023
a2cdcd5
Make sure that signatures aren't accidental refinements
compiler-errors Apr 28, 2023
1ff41d3
Merge from rustc
RalfJung Apr 30, 2023
a978408
Sync portable-simd to 2023 May 10
workingjubilee May 11, 2023
c7f6aae
Correct swizzle_dyn cfg for armv7 neon
workingjubilee May 12, 2023
048264e
Hide repr attribute from doc of types without guaranteed repr
dtolnay Feb 5, 2023
ed2ee7a
Explicit set `workspace.resolver = "1"`
weihanglo May 30, 2023
0368a8c
Merge branch 'master' into sync-upstream-2023-06-07
calebzulawski Jun 8, 2023
eb0041d
Format
calebzulawski Jun 8, 2023
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]

resolver = "1"
members = [
"crates/core_simd",
"crates/std_float",
Expand Down
4 changes: 2 additions & 2 deletions crates/core_simd/examples/nbody.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ mod tests {
fn main() {
{
let (energy_before, energy_after) = nbody::run(1000);
println!("Energy before: {}", energy_before);
println!("Energy after: {}", energy_after);
println!("Energy before: {energy_before}");
println!("Energy after: {energy_after}");
}
}
2 changes: 1 addition & 1 deletion crates/core_simd/examples/spectral_norm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn dot(x: &[f64], y: &[f64]) -> f64 {
#[cfg(test)]
#[test]
fn test() {
assert_eq!(&format!("{:.9}", spectral_norm(100)), "1.274219991");
assert_eq!(format!("{:.9}", spectral_norm(100)), "1.274219991");
}

fn main() {
Expand Down
3 changes: 1 addition & 2 deletions crates/core_simd/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ extern "platform-intrinsic" {
pub(crate) fn simd_cast<T, U>(x: T) -> U;
/// follows Rust's `T as U` semantics, including saturating float casts
/// which amounts to the same as `simd_cast` for many cases
#[cfg(not(bootstrap))]
pub(crate) fn simd_as<T, U>(x: T) -> U;

/// neg/fneg
Expand Down Expand Up @@ -101,7 +100,7 @@ extern "platform-intrinsic" {
/// val: vector of values to select if a lane is masked
/// ptr: vector of pointers to read from
/// mask: a "wide" mask of integers, selects as if simd_select(mask, read(ptr), val)
/// note, the LLVM intrinsic accepts a mask vector of <N x i1>
/// note, the LLVM intrinsic accepts a mask vector of `<N x i1>`
/// FIXME: review this if/when we fix up our mask story in general?
pub(crate) fn simd_gather<T, U, V>(val: T, ptr: U, mask: V) -> T;
/// llvm.masked.scatter
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/masks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl_element! { isize }
/// The layout of this type is unspecified, and may change between platforms
/// and/or Rust versions, and code should not assume that it is equivalent to
/// `[T; LANES]`.
#[repr(transparent)]
#[cfg_attr(not(doc), repr(transparent))] // work around https://github.com/rust-lang/rust/issues/90435
pub struct Mask<T, const LANES: usize>(mask_impl::Mask<T, LANES>)
where
T: MaskElement,
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/masks/full_masks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ where
}
}

impl<T, const LANES: usize> core::convert::From<Mask<T, LANES>> for Simd<T, LANES>
impl<T, const LANES: usize> From<Mask<T, LANES>> for Simd<T, LANES>
where
T: MaskElement,
LaneCount<LANES>: SupportedLaneCount,
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ macro_rules! unsafe_base {

/// SAFETY: This macro should not be used for anything except Shl or Shr, and passed the appropriate shift intrinsic.
/// It handles performing a bitand in addition to calling the shift operator, so that the result
/// is well-defined: LLVM can return a poison value if you shl, lshr, or ashr if rhs >= <Int>::BITS
/// is well-defined: LLVM can return a poison value if you shl, lshr, or ashr if `rhs >= <Int>::BITS`
/// At worst, this will maybe add another instruction and cycle,
/// at best, it may open up more optimization opportunities,
/// or simply be elided entirely, especially for SIMD ISAs which default to this.
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/ops/deref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ macro_rules! deref_ops {

#[inline]
#[must_use = "operator returns a new vector without mutating the inputs"]
fn $call(self, rhs: &$simd) -> Self::Output {
fn $call(self, rhs: &'rhs $simd) -> Self::Output {
(*self).$call(*rhs)
}
}
Expand Down
7 changes: 6 additions & 1 deletion crates/core_simd/src/swizzle_dyn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ where
#![allow(unused_imports, unused_unsafe)]
#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
use core::arch::aarch64::{uint8x8_t, vqtbl1q_u8, vtbl1_u8};
#[cfg(all(target_arch = "arm", target_feature = "v7", target_endian = "little"))]
#[cfg(all(
target_arch = "arm",
target_feature = "v7",
target_feature = "neon",
target_endian = "little"
))]
use core::arch::arm::{uint8x8_t, vtbl1_u8};
#[cfg(target_arch = "wasm32")]
use core::arch::wasm32 as wasm;
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use core::convert::{TryFrom, TryInto};
/// let sum = array::from_fn(|i| a[i] + b[i]);
/// let prod = array::from_fn(|i| a[i] * b[i]);
///
/// // `Simd<T, N>` implements `From<[T; N]>
/// // `Simd<T, N>` implements `From<[T; N]>`
/// let (v, w) = (Simd::from(a), Simd::from(b));
/// // Which means arrays implement `Into<Simd<T, N>>`.
/// assert_eq!(v + w, sum.into());
Expand Down