Expand description
Pruning elements in SIMD vectors
This crate is a port of Daniel Lemire’s C library simdprune.
The mask “marks” values in the input for deletion. So if the mask is odd, then the first value is marked for deletion. This function produces a new vector that start with all values that have not been deleted.
Passing a mask of 0 would simply copy the provided vector.
Note that this is the opposite of the mask behavior of AVX512 VCOMPRESS/VPCOMRESS instructions. If you have AVX512 much of this crate can be performed with those instructions.
§Examples
See prune_epi32
.
§Features
All features below are enabled by default.
- std - Enables the standard library. Disabling this enables the
no_std
crate attribute. - large_tables - Enables functions like
prune_epi8
which require large tables (>1MB). Disabling this may speed up compilation.
Functions§
- pext_
prune256_ ⚠epi32 avx2,bmi2
- Prune 32-bit floating-point values. Uses 64bit
pdep/pext
to save a step in unpacking. - prune256_
epi32 ⚠avx2
- Prune 32-bit integer values.
- prune256_
ps ⚠avx2
- Prune 32-bit floating-point values.
- prune_
epi8 ⚠large_tables
andssse3
- Prune 8-bit values.
- prune_
epi16 ⚠ssse3
- Prune 8-bit values.
- prune_
epi32 ⚠ssse3
- Prune 32-bit integer values.
- prune_
ps ⚠ssse3
- Prune 32-bit floating-point values.
- skinnyprune_
epi8 ⚠ssse3
- Prune 8-bit values. Like
prune_epi8
but uses a <1kB table. - thinprune_
epi8 ⚠ssse3
- Prune 8-bit values. Like
prune_epi8
but uses a 2kB table.