57 releases

0.7.30 Nov 19, 2024
0.7.28 Aug 12, 2024
0.7.26 Jul 21, 2024
0.7.15 Jan 29, 2024
0.3.2 Nov 27, 2019

#28 in Data structures

Download history 190198/week @ 2024-08-22 187011/week @ 2024-08-29 199369/week @ 2024-09-05 208411/week @ 2024-09-12 195052/week @ 2024-09-19 205863/week @ 2024-09-26 196414/week @ 2024-10-03 199142/week @ 2024-10-10 197316/week @ 2024-10-17 205995/week @ 2024-10-24 197247/week @ 2024-10-31 181121/week @ 2024-11-07 197457/week @ 2024-11-14 194887/week @ 2024-11-21 184611/week @ 2024-11-28 166103/week @ 2024-12-05

777,979 downloads per month
Used in 624 crates (29 directly)

Zlib OR Apache-2.0 OR MIT

510KB
14K SLoC

License:Zlib Minimum Rust Version crates.io docs.rs

wide

A crate to help you go wide.

Specifically, this has portable "wide" data types that do their best to be SIMD when possible.

On x86, x86_64, wasm32 and aarch64 neon this is done with explicit intrinsic usage (via safe_arch), and on other architectures this is done by carefully writing functions so that LLVM hopefully does the right thing. When Rust stabilizes more explicit intrinsics then they can go into safe_arch and then they can get used here.


lib.rs:

A crate to help you go wide.

This crate provides SIMD-compatible data types.

When possible, explicit SIMD is used with all the math operations here. As a fallback, the fact that all the lengths of a fixed length array are doing the same thing will often make LLVM notice that it should use SIMD instructions to complete the task. In the worst case, the code just becomes totally scalar (though the math is still correct, at least).

Crate Features

  • std: This causes the feature to link to std.
    • Currently this just improves the performance of sqrt when an explicit SIMD sqrt isn't available.

Dependencies

~785KB
~12K SLoC