-
Notifications
You must be signed in to change notification settings - Fork 309
Refactor stdsimd #640
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
Refactor stdsimd #640
Conversation
| const fn uninitialized() -> Self { | ||
| Cache(AtomicU64::new(u64::max_value())) | ||
| const X: AtomicU64 = AtomicU64::new(u64::max_value()); | ||
| Self(X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(repeating from Discord: I wasn't able to reproduce either... I'll see if I have time to test this locally; for the time being, this hack is fine, and AtomicU64 is stable in 1.34 so hopefully that makes the hack go away... However, when using the hack in the future, please cc myself and @oli-obk...)
|
So @alexcrichton this should be all green now. In some targets |
This commit:
* renames `coresimd` to `core_arch` and `stdsimd` to `std_detect`
* `std_detect` does no longer depend on `core_arch` - it is a freestanding
`no_std` library that only depends on `core` - it is renamed to `std_detect`
* moves the top-level coresimd and stdsimd directories into the appropriate
crates/... directories - this simplifies creating crate.io releases of these crates
* moves the top-level `coresimd` and `stdsimd` sub-directories into their
corresponding crates in `crates/{core_arch, std_detect}`.
|
I am merging this. We can iterate on this in tree. |
Update stdsimd This is the companion PR to rust-lang/stdarch#640 r? @alexcrichton
This commit:
renames
coresimdtocore_archandstdsimdtostd_detectstd_detectdoes no longer depend oncore_arch- it is a freestandingno_std(on some archs) library that only depends oncoremoves the top-level coresimd and stdsimd directories into the appropriate
crates/... directories - this simplifies creating crate.io releases of these crates
moves the top-level
coresimdandstdsimdsub-directories into theircorresponding crates in
crates/{core_arch, std_detect}.moves the examples into its own crate at
examples/to reduce the dev-dependencies ofstd_detectto a minimumAfter this PR lands rust-lang/rust#57808 could land. The main benefit is that we no longer build core::arch twice in rust-lang/rust, once in libstd, and once in libcore. Instead, these two PR change that to only build it once in libcore, and then libstd just re-export the
core::archmodule. The run-time feature detection is provided inlibstdby just addingstd_detetas a dependency, hopefully, without much hackery (since it is ait's only a#[no_std]library#[no_std]library on some archs, so we'll see how this goes). This also allows those#[no_std]users that want to have the exact same run-time feature detection system aslibstdto be able to do so by just addingstd_detectas a dependency.