Skip to content
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

Sync portable-simd to remove autosplats #91484

Merged
merged 17 commits into from
Dec 8, 2021

Commits on Nov 13, 2021

  1. Configuration menu
    Copy the full SHA
    36e198b View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2021

  1. Configuration menu
    Copy the full SHA
    429e0b6 View commit details
    Browse the repository at this point in the history
  2. Merge pull request rust-lang#190 from alex/patch-1

    Update CONTRIBUTING.md for the fact that Travis is no longer used
    calebzulawski committed Nov 14, 2021
    Configuration menu
    Copy the full SHA
    690184a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f7b0358 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2021

  1. Fix outdated workflow badge

    Proloy Mishra committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    9129ae6 View commit details
    Browse the repository at this point in the history
  2. Merge pull request rust-lang#192 from pro465/patch-1

    Fix outdated workflow badge
    calebzulawski committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    b8d6b68 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2021

  1. Configuration menu
    Copy the full SHA
    ced3a05 View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2021

  1. impl deref.rs<&Self> for Simd<T, _>

    Instead of implementing each "deref" pattern for every single scalar,
    we can use type parameters for Simd operating on &Self.
    We can use a macro, but keep it cleaner and more explicit.
    workingjubilee committed Nov 24, 2021
    Configuration menu
    Copy the full SHA
    0a6992f View commit details
    Browse the repository at this point in the history
  2. impl assign.rs<U> for Simd<T, _>

    Instead of implementing {Op}Assign traits for individual scalar type args
    to Simd<_, _>, use parametric impls that reassert the bounds of the binary op.
    workingjubilee committed Nov 24, 2021
    Configuration menu
    Copy the full SHA
    51ff925 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ae61210 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2021

  1. Uncomment AVX512 byte vector conversions

    Resolves my comment in rust-lang#197, at least for now; rust-lang#187 is pending but since these are already here, just commented, it seemed to make sense to me to re-enable them anyway.
    pthariensflame authored and workingjubilee committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    b2dac71 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2021

  1. impl unary.rs for Simd<{i,u}{8,16,32,64,size}, _>

    In order to assure type soundness, these "base" impls
    need to go directly on Simd<T, _> for every scalar type argument.
    A bit of cleanup of ops.rs is still warranted.
    workingjubilee committed Dec 1, 2021
    Configuration menu
    Copy the full SHA
    6094f22 View commit details
    Browse the repository at this point in the history
  2. Drop splats for Simd<T, _>

    Unfortunately, splatting impls currently break several crates.
    Rust needs more time to review possible mitigations, so
    drop the impls for the `impl Add<T> for Simd<T, _>` pattern, for now.
    workingjubilee committed Dec 1, 2021
    Configuration menu
    Copy the full SHA
    257fa7a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8003b04 View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2021

  1. Merge portable-simd#195 - portable-simd:trait-ops

    Generic `core::ops` for `Simd<T, _>`
    
    In order to maintain type soundness, we need to be sure we only implement an operation for `Simd<T, _> where T: SimdElement`... and also valid for that operation in general. While we could do this purely parametrically, it is more sound to implement the operators directly for the base scalar type arguments and then use type parameters to extend the operators to the "higher order" operations.
    
    This implements that strategy and cleans up `simd::ops` into a few submodules:
    - assign.rs: `core::ops::*Assign`
    - deref.rs:  `core::ops` impls which "deref" borrowed versions of the arguments
    - unary.rs: encloses the logic for unary operators on `Simd`, as unary ops are much simpler
    
    This is possible since everything need not be nested in a single maze of macros anymore. The result simplifies the logic and allows reasoning about what operators are valid based on the expressed trait bounds, and also reduces the size of the trait implementation output in rustdoc, for a huge win of 4 MB off the size of `struct.Simd.html`! This addresses a common user complaint, as the original was over 5.5 MB and capable of crashing browsers!
    
    This also carries a fix for a type-inference-related breakage, by removing the autosplatting (vector + scalar binop) impls, as unfortunately the presence of autosplatting was capable of busting type inference. We will likely need to see results from a Crater run before we can understand how to re-land autosplatting.
    workingjubilee committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    a838552 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2ea27bf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eef4371 View commit details
    Browse the repository at this point in the history