Stack allocated uint multiset implementation, with optional SIMD implementations available.
:warning: This crate is not stable: expect API changes with each release.
The SIMD implementation uses packed_simd (behind a feature
flag). packed_simd
was chosen over alternatives due to it's simplicity and base on the assumption that when
std::simd is stabilised it will look similar in implementation to packed_simd
as it is now.
The implementations in utote
are built using macros rather than generics because there is no generic interface
available for the SIMD types in packed_simd
. Although there are crates available that enable generic implementation
of SIMD code they either lack features in comparison to packed_simd
, increase the complexity of the implementation,
or are unstable themselves. Other than enabling the implementation, the benefit of using macros is that the actual
implementation code is straightforward.
Since multisets are essentially collections of counters + some useful methods on those counters, the implementations
are built only for uint
types. The current Multiset is thus quite low level, perhaps better serving as a backend for
future implementations given any type.
Please see the docs for the API and more information!
T
which using the uint
implementations as a backend to handle the element
counters.const generics
and std::simd
are more fully implemented it should be possible to replace most of the macros
with generic implementations. And once these features are stabilised it will be possible to enable all the SIMD
implementations in utote
in the stable toolchain. Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
The implementations in this crate are inspired by nalgebra and simba.