Caution
Fearless SIMD is in extremely early experimental development. As such, there are no stability guarantees, APIs are incomplete, and architectures have missing implementations. Fearless SIMD is being developed in conjunction with the Vello Sparse Strips renderer.
Full details of how to use Fearless SIMD can be found in the Fearless SIMD package's README.
This crate proposes an experimental way to use SIMD intrinsics reasonably safely. The blog post A plan for SIMD contains the high level motivations, goal, and summary for Fearless SIMD.
The only package which is published to crates.io from this repository is Fearless SIMD, which can be found in the fearless_simd
folder.
This folder also contains the examples.
The other packages are as follows:
fearless_simd_gen
: A code generator, used to generate the low signal-to-noise parts of the Fearless SIMD crate.fearless_simd_tests
: Tests of functionality in Fearless SIMD, to validate that all implementations give the same and correct results.fearless_simd_dev_macros
: Procedural macros used infearless_simd_tests
to generate versions of each test for each SIMD level supported on the current machine.
A much earlier version of this crate experimented with an approach that tried to accomplish safety in safe Rust as of 2018, using types that witnessed the SIMD capability of the CPU. There is a blog post, Towards fearless SIMD, that wrote up the experiment. That approach couldn't quite be made to work, but was an interesting exploration at the time. A practical development along roughly similar lines is the pulp crate.
For more discussion about this crate, see Towards fearless SIMD, 7 years later.
This crate was inspired by [pulp
], std::simd, among others in the Rust ecosystem, though makes many decisions differently.
It benefited from conversations with Luca Versari, though he is not responsible for any of the mistakes or bad decisions.
This version of Fearless SIMD has been verified to compile with Rust 1.86 and later.
Future versions of Fearless SIMD might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases.
Discussion of Fearless SIMD development happens in the Linebender Zulip, specifically in #simd. All public content can be read without logging in.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributions are welcome by pull request. The Rust code of conduct applies. Please feel free to add your name to the AUTHORS file in any substantive pull request.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.