Skip to main content

csm_core_lib/
lib.rs

1#![allow(clippy::needless_range_loop, unused_imports)]
2pub mod bundle;
3pub mod bundle_simd;
4pub mod encoder;
5pub mod error;
6#[cfg(feature = "chaotic-hashing")]
7pub mod hashing;
8pub mod hyperdim;
9pub mod hyperdim_batch;
10pub mod hyperdim_binary;
11pub mod hyperdim_ops;
12pub mod hyperdim_serde;
13pub mod hyperdim_simd;
14pub mod hyperdim_simd_bundle;
15#[cfg(feature = "chaotic-hashing")]
16pub mod maps;
17pub mod reservoir;
18pub mod reservoir_chaotic;
19pub mod reservoir_inertial;
20pub mod reservoir_sparse;
21
22pub use bundle::BundleAccumulator;
23pub use error::{MemoryError, Result};
24pub use hyperdim::{HVec10240, batch_cosine_similarity};
25pub use hyperdim_binary::BHVec10240;
26pub use hyperdim_ops::Hypervector;
27
28pub mod prelude {
29    pub use crate::error::{MemoryError, Result};
30    pub use crate::hyperdim::HVec10240;
31}
32
33#[cfg(test)]
34mod tests {
35    #![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
36    use super::*;
37    use crate::hyperdim::HVec10240;
38    use crate::reservoir::Reservoir;
39
40    mod hyperdim_tests {
41        use super::*;
42        include!("hyperdim_tests.rs");
43    }
44    mod reservoir_tests {
45        use super::*;
46        include!("reservoir_tests.rs");
47    }
48}