-
Notifications
You must be signed in to change notification settings - Fork 13.4k
pub use core::simd; #89167
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
pub use core::simd; #89167
Changes from all commits
Commits
Show all changes
307 commits
Select commit
Hold shift + click to select a range
db7d986
Add cross-links to Zulip, etc.
workingjubilee 285fff0
Merge pull request #37 from rust-lang/link-more
KodrAus 3870633
Add rounding mode test
calebzulawski 4baa8c2
Merge pull request #34 from rust-lang/feature/round
calebzulawski a5bdb8b
Document size/align of SIMD types
workingjubilee 3aec4a2
Merge pull request #43 from rust-lang/docs/layout
workingjubilee 7538ff8
Revert "Disable riscv64gc"
workingjubilee e9cc306
Remove round, trunc tests
workingjubilee 3d9bbf9
Use simd_{floor,ceil} intrinsics for round.rs
workingjubilee a69c441
Use platform intrinsics, not LLVM, for floor & ceil
workingjubilee cebc2ca
Add opaque masks
calebzulawski 5bc5d7f
Add comparison ops
calebzulawski 78a8d61
Implement missing traits on opaque masks, fix tests
calebzulawski 35b9ab9
Simplify some formatting
calebzulawski 27e9442
Begin changing vectors to const generics
calebzulawski 22576bb
Implement additional functions
calebzulawski 25c7640
Reenable ops and fix tests
calebzulawski 9cc3dea
Finish refactoring vector types
calebzulawski 0ddf7ac
Reenable rounding ops
calebzulawski 2720ccc
Fix masks
calebzulawski 62d98e3
Remove obsolete macros
calebzulawski 9b8cb18
Remove obsolete files
calebzulawski 5994771
Add workaround for rust-lang/rust#80108
calebzulawski cd36c98
Deploy documentation to GitHub Pages
calebzulawski c7d031c
Merge pull request #52 from rust-lang/feature/deploy-docs
KodrAus d72927c
Switch docs deploy to GITHUB_TOKEN
calebzulawski b931c15
Merge pull request #49 from rust-lang/feature/const-generics
KodrAus cb036b5
min_const_generics ride the train to stable
workingjubilee 3717408
Merge pull request #57 from rust-lang/stable-min-const
calebzulawski c67fc2e
Add guards/tests for div,rem overflow cases
miguelraz 9801540
Merge pull request #55 from miguelraz/min-panics
workingjubilee e4cdd15
Add issue templates
workingjubilee 9b6b5d7
Merge pull request #58 from rust-lang/issue-templates
workingjubilee fd6179b
Add a blank issue template
workingjubilee 8bea634
AsRef -> as_slices()
miguelraz acbde03
Merge pull request #60 from miguelraz/as-slice-prettify
workingjubilee 4ad53da
Merge pull request #59 from rust-lang/blank-ish
workingjubilee 5424140
Add SIMD shuffles for SimdType{2,4,8,16,32,64}
workingjubilee 55f0efc
add a link to docs to the readme
KodrAus 38ae9bd
Merge pull request #65 from rust-lang/KodrAus-patch-1
KodrAus 1b0c231
Merge pull request #62 from rust-lang/feature/shuffle-self
KodrAus 92293af
Add bitmask that supports up to 64 lanes. Simplify mask op API.
calebzulawski 9e96c8a
Add missing From implementation, add simple mask API tests
calebzulawski 26061b4
Fix wasm tests
calebzulawski 8aa7ba7
Merge pull request #61 from rust-lang/feature/masks
calebzulawski 6362540
Limit all types to 64 lanes
calebzulawski 16904eb
Add missing type bounds
calebzulawski faae170
Remove glob import
calebzulawski 08ee338
Add to glossary: vectorize, scalar, vector register
workingjubilee cbca211
Merge pull request #67 from rust-lang/limit-lanes
workingjubilee d3c58da
Merge pull request #73 from rust-lang/scalar-docs
calebzulawski d5c2279
Add proptest float tests
calebzulawski 0ac057a
Add integer tests
calebzulawski 5b0818a
Remove old integer tests
calebzulawski 223daea
Update supported lane counts
calebzulawski b38d342
Simplify test creation
calebzulawski 38b1890
Remove obsolete helpers
calebzulawski 8d5702e
Fix performance issues
calebzulawski 976fafc
Fix wasm tests
calebzulawski 0ec3ecf
Split ops tests
calebzulawski 714ad63
Fix MulAssign typo in tests, move panic tests
calebzulawski 8c378d3
Add documentation
calebzulawski 15dd0ae
Disable CI on branches without PR
calebzulawski 2b3f4b2
Add LanesAtMost64 bounds
calebzulawski f85bd24
Merge pull request #72 from rust-lang/feature/proptest
workingjubilee 2f2a463
Remove From<Scalar> for SimdTy impl
workingjubilee e3b729c
Merge pull request #75 from rust-lang/no-scalar-from
calebzulawski 1a19ad4
Reorg vectors into crate::vector::*;
workingjubilee 27f094f
Nominate base files
workingjubilee ca15e4f
cat vector types by kind
workingjubilee 39fb223
Partially carve macros.rs into other files
workingjubilee a2302da
Move macros.rs to first.rs
workingjubilee 8ad4f14
Merge pull request #77 from rust-lang/reorg-vectors
workingjubilee 8cb1fe0
Fix wasm-bindgen dependency
calebzulawski d95433d
Merge pull request #82 from rust-lang/bugfix/wasm-dependencies
workingjubilee fa77b19
Add std cargo feature
calebzulawski 65c3ce9
Merge pull request #81 from rust-lang/feature/std-cargo-feature
workingjubilee 4a6b4c0
Introduce saturating math
workingjubilee 6620015
Merge pull request #86 from rust-lang/feat/saturating
workingjubilee dd1a5e4
Add saturating abs/neg
workingjubilee 331230f
Explain why to use saturation
workingjubilee 4e6d440
Merge pull request #87 from rust-lang/feat/sat-abs-neg
calebzulawski 93ce1c1
Add floating-point classification functions
calebzulawski 07247a0
Various bug fixes
calebzulawski 97bbe2d
Fix normal and subnormal classification
calebzulawski e6a5309
Reduce maximum lanes from 64 to 32
calebzulawski 0682c31
Merge pull request #80 from rust-lang/feature/comparisons
workingjubilee b0a005d
Add floating-point classification functions
calebzulawski d7649f4
Various bug fixes
calebzulawski 926cf3a
Add intrinsics
calebzulawski 875b31c
Implement reductions
calebzulawski a7b82ad
Add tests
calebzulawski 193cd14
Enable special handling of zero
calebzulawski 02608d4
Fix mask ops
calebzulawski 64f5648
Update documentation and fix i586 inaccuracy
calebzulawski 4b8cbd5
Fix i586 detection
calebzulawski b51febb
Revert i586 fix, fix test instead
calebzulawski 3fae09b
Revert "Revert i586 fix, fix test instead"
calebzulawski 3cf970f
Fix test sum/product implementation
calebzulawski e2fa502
Enable i586 workaround for both f32 and f64
calebzulawski e127586
Improve function names and docs
calebzulawski e3f0124
Silence warnings
workingjubilee 894062f
Burn Chrome again
workingjubilee 81c9633
Drop wasm SIMD tests
workingjubilee 87b7207
Use neg intrinsics
workingjubilee 1c3d957
Merge pull request #96 from rust-lang/burning-chrome
workingjubilee 01d78aa
Update docs
calebzulawski e73985f
Merge pull request #89 from rust-lang/intrinsic-neg
calebzulawski 977f26f
Add some common shuffles
calebzulawski 1999c54
Clarify concatenation order
calebzulawski 9acc112
Use fabs intrinsic
workingjubilee b2e25bc
Merge pull request #95 from rust-lang/intrinsic-fabs
calebzulawski 828b274
Rename sum, product to horizontal_{sum,product}
calebzulawski 7028a58
Attempt to clarify interleave/deinterleave
calebzulawski 2fa62b9
Merge pull request #98 from rust-lang/feature/common-shuffles
workingjubilee 04ee107
Remove wrapping from sum/product fns
calebzulawski 24ebae8
Merge pull request #83 from rust-lang/feature/reductions
workingjubilee 1f4e902
Fix saturating math docs
calebzulawski e8b6bca
Finish fixing up abs docs
workingjubilee 91134e6
Branchless abs
workingjubilee f06427f
Move lanes_at_most_64 to _32
workingjubilee 92d643b
Remove Simd{U,I}128
workingjubilee b4fda6e
Give rounding intrinsics their own modules
workingjubilee 6ea08d8
Add SIMD round, trunc, fract
workingjubilee a9a1c9d
Merge pull request #100 from rust-lang/fix-sat-math
workingjubilee 5751179
Merge pull request #107 from rust-lang/feat/simd-round
workingjubilee da42aa5
Begin reducing mask API
calebzulawski eec4280
Update bitmask API
calebzulawski 98dad13
Make implementation more scalable by using a helper trait to determin…
calebzulawski 589fce0
Attempt to workaround MIPS bug
calebzulawski 9a063bc
Merge pull request #99 from rust-lang/feature/simplify-masks
workingjubilee 563d2a2
Add select function
calebzulawski dfebaf9
Merge pull request #103 from rust-lang/feature/select
workingjubilee 0bf5eb5
Add select for masks
calebzulawski e8cae87
Fix rustfmt
calebzulawski 45d7e80
Clarify documentation
calebzulawski ce92300
Merge pull request #117 from rust-lang/feature/mask-select
workingjubilee d679581
add simd_fsqrt intrinsic
miguelraz 1c18f8f
Add byte conversions
calebzulawski 20c3b8e
Merge pull request #120 from miguelraz/simd_fsqrt
calebzulawski e52d51c
nbody example
miguelraz 2591c59
fix imports
miguelraz ab6af37
Simdf64 from attempt
miguelraz 8bea362
replace sum() with horizontal_sum()
miguelraz 9926218
Remove extended_key_value_attributes feature
calebzulawski 93ee641
Merge pull request #125 from rust-lang/remove-stable-feature
workingjubilee 3c05cee
Update crates/core_simd/examples/nbody.rs
miguelraz 83dc5b7
don't need clippy
miguelraz 5605056
don't use turbofish on run
miguelraz f24110a
collapse run_k into run
miguelraz 5557907
rewrite unaligned slice, fix output const array
miguelraz 4e86aeb
finish nbody
miguelraz 70305c5
add main to avoid CI crash
miguelraz c042f33
clean up code, fudge approx true
miguelraz 435d1cf
Update crates/core_simd/examples/nbody.rs
miguelraz be121c9
clean code vis. Jubilee's comments
miguelraz 4311c06
Merge pull request #122 from miguelraz/nbodyexample
workingjubilee 3032a62
add helloworld to README (#134)
miguelraz 68393aa
Add mask width conversion (#127)
calebzulawski 57e67c9
add doctests for shuffle (#130)
miguelraz bdcccba
Implement Sum/Product traits
calebzulawski 96f0f5d
Implement Sum/Product over references
calebzulawski b936f34
Add various special functions (recip, signum, copysign)
calebzulawski 74e6262
Add min/max/clamp
calebzulawski f102de7
Add mul_add
calebzulawski 7b66032
Fix test typo
calebzulawski 15b4e28
Add from_bitmask (#136)
calebzulawski 708ae61
Remove scalar Sum/Product over questionable order of operations
calebzulawski b0a9fe5
Extract constant from scalar to_radians as well
calebzulawski 16765a1
Introduce SimdArray trait
workingjubilee 2f99cc8
Add pointer vectors: SimdConstPtr, SimdMutPtr
workingjubilee 128b6f5
Add SimdArray::gather_{or,or_default,select}
workingjubilee 81ceda8
Add SimdArray::scatter{,_select}
workingjubilee f38659a
Add assoc const SimdArray::LANES
workingjubilee 1529ed4
Document and test doubled writes in scatter
workingjubilee 3872723
Merge pull request #138 from rust-lang/feature/various-fns
workingjubilee b5ba195
Merge pull request #139 from rust-lang/feat/gather
workingjubilee 715f9ac
Fix typo. Closes #140
calebzulawski 871d588
Add 32-bit SIMD types i/u16x2 and i/u8x4. (#145)
adamgreig ac749a1
add matrix_inversion example (#131)
miguelraz 3954b27
Add conversions between vendor intrinsics (#144)
calebzulawski be96995
Add portable_simd unstable feature gate (#141)
calebzulawski 732b7ed
Add fmt and clippy to CI (#147)
calebzulawski c077bf3
Rename SimdArray to Vector, remove its generic parameter, and remove …
calebzulawski f178dda
Add as_slice/as_mut_slice to Vector
calebzulawski fdd7d6e
Change as_slice to as_array
calebzulawski 529ffe0
Use new module naming
calebzulawski f93bef3
Move vector implementation
calebzulawski 97c25dd
Add lane count marker type
calebzulawski 82e3405
Merge pull request #142 from rust-lang/feature/traits
workingjubilee 34384b7
Add const_evaluatable_checked feature, change to_bitmask to use it, a…
calebzulawski 1f69bc4
Add CI for testing cargo features
calebzulawski 9ab0507
Fix feature flag in CI
calebzulawski cca9102
Change bitmasks to use less opaque type
calebzulawski c36d17d
Merge pull request #152 from rust-lang/feature/const_eval_checked
workingjubilee 2acf204
Rename to portable-simd and remove other names
workingjubilee 50eb35e
Merge pull request #153 from rust-lang/death-of-the-author
calebzulawski 054f25f
Convert all vectors to a single type
calebzulawski dc4dc99
Change to various generic impls
calebzulawski 8cc38ae
Remove Vector trait
calebzulawski ddc67e3
Remove Mask trait
calebzulawski de13b20
Convert all masks to a single type
calebzulawski ea02805
Implement select generically
calebzulawski e6d95e4
Implement comparisons generically
calebzulawski e11286a
Remove unused transmute file
calebzulawski 5ed57b4
Remove most usage of type aliases
calebzulawski 88f79d4
Remove aliases from op trait impls
calebzulawski f7f2968
Remove aliases from most tests
calebzulawski 275889f
Remove remaining usage of aliases
calebzulawski 40142ac
Remove aliases
calebzulawski 00165ed
Remove mask aliases
calebzulawski cf653c7
Update crates/core_simd/src/vector.rs
calebzulawski 4aafd8e
Rename element type variable
calebzulawski d428753
Merge pull request #154 from rust-lang/feature/generic-element-type
workingjubilee 8cf7a62
Fix cargo features for nightly (#155)
calebzulawski b25ed7f
Restructure crate as core module
workingjubilee 8342fe7
Cleanup more for std::simd also
workingjubilee 6d3d07a
Feature-flag doc tests so they run for core
workingjubilee c2f5948
Feature-flag fused mul-add to block libcalls
workingjubilee afd7c5a
Make sure MaskElement is in bitmasks.rs
workingjubilee 4fbccaf
Add lanes()
mulimoen ec05dfb
Add associated LANES const
mulimoen b506e3e
Renovate for Edition 2021
workingjubilee 436ca7f
Add lanes() and associated LANES const
workingjubilee 6d23662
Add {gather,scatter}_select_unchecked
workingjubilee 01e9816
docs: fix typo gather -> scatter
workingjubilee 9be2665
Rewrite gather/scatter docs
workingjubilee a16b481
Simplify language for scatter/gather
workingjubilee 10168fb
Add new swizzle API
calebzulawski 98e4fca
Fix macro in core
calebzulawski 37797d9
simd_shuffle -> simd_swizzle
calebzulawski cd7ecba
Remove adt_const_params feature
calebzulawski 765bee6
Update crates/core_simd/src/swizzle.rs
calebzulawski 5b4282e
Improve docs
calebzulawski ab8eec7
Fixup import pathing for core
workingjubilee 7c2d295
Hide mask impl details in sealed trait.
calebzulawski 772bf20
Hide select impl in sealed trait
calebzulawski 4e00aa6
rotate_{left,right} -> rotate_lanes_{left,right}
calebzulawski d2e8728
add `Simd::from_slice` (#177)
pro465 0ecf987
Merge pull request #181 from rust-lang/rotate_lanes
calebzulawski 349a611
Delete travis config, move tests to github actions.
calebzulawski 081240a
Merge pull request #175 from rust-lang/feature/more-actions
workingjubilee c52083e
Use the right name for AVX512F
workingjubilee 949f71c
Deny warnings in CI and fix
workingjubilee 7d91357
Dynamically detect AVX512 in CI
workingjubilee 6ddf7ad
Restrict Arm types to Arm v7+
workingjubilee 1ce1c64
Rewrite Arm transmutes, reading std::arch closer
workingjubilee fdee059
Add 'library/portable-simd/' from commit '1ce1c645cf27c4acdefe6ec8a11…
workingjubilee 39cb863
Expose portable-simd as core::simd
workingjubilee 7c3d72d
Test core::simd works
workingjubilee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use core::simd::f32x4; | ||
|
||
#[test] | ||
fn testing() { | ||
let x = f32x4::from_array([1.0, 1.0, 1.0, 1.0]); | ||
let y = -x; | ||
|
||
let h = x * 0.5; | ||
|
||
let r = y.abs(); | ||
assert_eq!(x, r); | ||
assert_eq!(h, f32x4::splat(0.5)); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
name: Blank Issue | ||
about: Create a blank issue. | ||
--- |
50 changes: 50 additions & 0 deletions
50
library/portable-simd/.github/ISSUE_TEMPLATE/bug_report.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
name: Bug Report | ||
about: Create a bug report for Rust. | ||
labels: C-bug | ||
--- | ||
<!-- | ||
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, | ||
along with any information you feel relevant to replicating the bug. | ||
--> | ||
|
||
I tried this code: | ||
|
||
```rust | ||
<code> | ||
``` | ||
|
||
I expected to see this happen: *explanation* | ||
|
||
Instead, this happened: *explanation* | ||
|
||
### Meta | ||
|
||
`rustc --version --verbose`: | ||
``` | ||
<version> | ||
``` | ||
|
||
|
||
`crate version in Cargo.toml`: | ||
```toml | ||
[dependencies] | ||
stdsimd = | ||
``` | ||
<!-- If this specifies the repo at HEAD, please include the latest commit. --> | ||
|
||
|
||
<!-- | ||
If a backtrace is available, please include a backtrace in the code block by | ||
setting `RUST_BACKTRACE=1` in your environment. e.g. | ||
`RUST_BACKTRACE=1 cargo build`. | ||
--> | ||
<details><summary>Backtrace</summary> | ||
<p> | ||
|
||
``` | ||
<backtrace> | ||
``` | ||
|
||
</p> | ||
</details> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This only controls whether a tiny, hard-to-find "open a blank issue" link appears at the end of | ||
# the template list. | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: Intrinsic Support | ||
url: https://github.com/rust-lang/stdarch/issues | ||
about: Please direct issues about Rust's support for vendor intrinsics to core::arch | ||
- name: Internal Compiler Error | ||
url: https://github.com/rust-lang/rust/issues | ||
about: Please report ICEs to the rustc repository |
14 changes: 14 additions & 0 deletions
14
library/portable-simd/.github/ISSUE_TEMPLATE/feature_request.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: Feature Request | ||
about: Request an addition to the core::simd API | ||
labels: C-feature-request | ||
--- | ||
<!-- | ||
Hello! | ||
We are very interested in any feature requests you may have. | ||
However, please be aware that core::simd exists to address concerns with creating a portable SIMD API for Rust. | ||
Requests for extensions to compiler features, such as `target_feature`, binary versioning for SIMD APIs, or | ||
improving specific compilation issues in general should be discussed at https://internals.rust-lang.org/ | ||
--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Hello, welcome to `std::simd`! | ||
|
||
It seems this pull request template checklist was created while a lot of vector math ops were being implemented, and only really applies to ops. Feel free to delete everything here if it's not applicable, or ask for help if you're not sure what it means! | ||
|
||
For a given vector math operation on TxN, please add tests for interactions with: | ||
- [ ] `T::MAX` | ||
- [ ] `T::MIN` | ||
- [ ] -1 | ||
- [ ] 1 | ||
- [ ] 0 | ||
|
||
|
||
For a given vector math operation on TxN where T is a float, please add tests for test interactions with: | ||
- [ ] a really large number, larger than the mantissa | ||
- [ ] a really small "subnormal" number | ||
- [ ] NaN | ||
- [ ] Infinity | ||
- [ ] Negative Infinity |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.