44 releases

0.7.16 Apr 15, 2024
0.7.15 Jan 29, 2024
0.7.13 Oct 17, 2023
0.7.11 Jul 11, 2023
0.3.2 Nov 27, 2019

#39 in Data structures

Download history 104376/week @ 2024-01-03 114597/week @ 2024-01-10 129230/week @ 2024-01-17 123517/week @ 2024-01-24 120099/week @ 2024-01-31 127379/week @ 2024-02-07 136756/week @ 2024-02-14 136396/week @ 2024-02-21 146424/week @ 2024-02-28 140612/week @ 2024-03-06 141025/week @ 2024-03-13 144696/week @ 2024-03-20 131803/week @ 2024-03-27 145960/week @ 2024-04-03 145832/week @ 2024-04-10 111653/week @ 2024-04-17

560,976 downloads per month
Used in 300 crates (21 directly)

Zlib OR Apache-2.0 OR MIT

450KB
13K 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

~615KB