Skip to content

Commit 12776e7

Browse files
update docs to link to ensure_simd
1 parent b50259f commit 12776e7

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@ The underlying algorithm is described in the following
2020

2121
## Requirements
2222

23-
This library supports AVX2 and NEON instruction sets.
24-
Make sure to set `RUSTFLAGS="-C target-cpu=native"` when compiling to use the instruction sets available on your architecture:
23+
This library requires AVX2 or NEON instruction sets, which, on x64, requires
24+
either `target-cpu=native` or `target-cpu=x86-64-v3`.
25+
See [this README](https://github.com/ragnargrootkoerkamp/ensure_simd) for details and [this
26+
blog](https://curiouscoding.nl/posts/distributing-rust-simd-binaries/) for background.
27+
The same restrictions apply when using simd-minimizers in a larger project.
2528

2629
``` sh
27-
RUSTFLAGS="-C target-cpu=native" cargo build --release
30+
RUSTFLAGS="-C target-cpu=native" cargo run --release
2831
```
29-
Or set it in your project or system wide `.cargo/config.toml`:
30-
```toml
31-
rustflags = ["-C", "target-cpu=native"]
32-
```
33-
34-
Enable the `-F scalar` feature flag to fall back to a scalar implementation with
35-
reduced performance.
3632

3733
## Usage example
3834

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
//!
6767
//! This library depends on AVX2 or NEON SIMD instructions to achieve good performance.
6868
//! Make sure to compile with `-C target-cpu=native` to enable these instructions.
69+
//! See the [ensure_simd](https://github.com/ragnargrootkoerkamp/ensure_simd) crate for more details.
6970
//!
7071
//! All functions take a `out_vec: &mut Vec<u32>` parameter to which positions are _appended_.
7172
//! For best performance, re-use the same `out_vec` between invocations, and [`Vec::clear`] it before or after each call.

0 commit comments

Comments
 (0)