55 releases

0.7.28 Aug 12, 2024
0.7.26 Jul 21, 2024
0.7.15 Jan 29, 2024
0.7.13 Oct 17, 2023
0.3.2 Nov 27, 2019

#25 in Data structures

Download history 144666/week @ 2024-07-08 155746/week @ 2024-07-15 169949/week @ 2024-07-22 169220/week @ 2024-07-29 169823/week @ 2024-08-05 205414/week @ 2024-08-12 174367/week @ 2024-08-19 199252/week @ 2024-08-26 190327/week @ 2024-09-02 205004/week @ 2024-09-09 189777/week @ 2024-09-16 216569/week @ 2024-09-23 192613/week @ 2024-09-30 197996/week @ 2024-10-07 191735/week @ 2024-10-14 212422/week @ 2024-10-21

803,593 downloads per month
Used in 592 crates (26 directly)

Zlib OR Apache-2.0 OR MIT

500KB
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

~795KB
~12K SLoC