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 for bitmasks &c. #94452

Merged
merged 15 commits into from
Mar 1, 2022

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Feb 28, 2022

In the ideal case, where everything works easily and nothing has to be rearranged, it is as simple as:

  • git subtree pull -P library/portable-simd https://github.com/rust-lang/portable-simd - ${branch}
  • write the commit message
  • python x.py test --stage 1 to make sure it runs
  • git push to your PR-to-rustc branch

If anything borks up this flow, you can fix it with sufficient git wizardry but you are usually better off going back to the source, fixing it, and starting over, before you open the PR.

r? @calebzulawski

deantvv and others added 15 commits November 28, 2021 15:19
Add spectral_norm example from packed_simd
Includes some remarks in intrinsics.rs,
generated while auditing the interface for remaining UB.
and other quirks like panicking
and the equivalence to zipping and mapping binary ops
Co-authored-by: Caleb Zulawski <caleb.zulawski@gmail.com>
Remove overflow panic from divrem and add basic docs to Simd<T, N>

This finishes normalizing Simd<T, N> to being approximately equivalent to Simd<Wrapping<T>, N> for all implemented operations I can think of. It also documents this fact, allowing this to close rust-lang/portable-simd#56.
* Explain unsafe contracts of core::simd

This permeates the module with remarks on safety for pub methods,
layout of the Simd type, correct use of intrinsics, et cetera.
This is mostly to help others curious about how core::simd works,
including other Rust contributors, `unsafe` library authors,
and eventually ourselves.
Another approach that fixes rust-lang/portable-simd#223, as an alternative to rust-lang/portable-simd#238.

This adds the `ToBitMask` trait, which is implemented on a vector for each bitmask type it supports.  This includes all unsigned integers with enough bits to contain it.  The byte array variant has been separated out for now into rust-lang/portable-simd#246 and still requires `generic_const_exprs`, but the integer variants no longer require it and can make it to nightly.
@workingjubilee
Copy link
Member Author

Interesting, no assignment?

@bors r+

@bors
Copy link
Contributor

bors commented Feb 28, 2022

📌 Commit 4de99e1 has been approved by workingjubilee

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 28, 2022
@workingjubilee
Copy link
Member Author

Also hmm it's fine to
@bors rollup=always

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 1, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#91545 (Generalize "remove `&`"  and "add `*`" suggestions to more than one deref)
 - rust-lang#93385 (Rustdoc ty consistency fixes)
 - rust-lang#93926 (Lint against more useless `#[must_use]` attributes)
 - rust-lang#94094 (use BOOL for TCP_NODELAY setsockopt value on Windows)
 - rust-lang#94384 (Add Atomic*::from_mut_slice)
 - rust-lang#94448 (5 - Make more use of `let_chains`)
 - rust-lang#94452 (Sync portable-simd for bitmasks &c.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4001d98 into rust-lang:master Mar 1, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 1, 2022
@workingjubilee workingjubilee deleted the sync-simd-bitmasks branch March 1, 2022 18:28
workingjubilee pushed a commit to workingjubilee/rustc that referenced this pull request May 23, 2023
…r=workingjubilee

Sync portable-simd for bitmasks &c.

In the ideal case, where everything works easily and nothing has to be rearranged, it is as simple as:
- `git subtree pull -P library/portable-simd https://github.com/rust-lang/portable-simd - ${branch}`
- write the commit message
- `python x.py test --stage 1` to make sure it runs
- `git push` to your PR-to-rustc branch

If anything borks up this flow, you can fix it with sufficient git wizardry but you are usually better off going back to the source, fixing it, and starting over, before you open the PR.

r? `@calebzulawski`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants