Skip to content

Commit

Permalink
hnsw_rs depends on crate anndists
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-pierreBoth committed Apr 29, 2024
1 parent f938df4 commit 3acb711
Show file tree
Hide file tree
Showing 15 changed files with 155 additions and 2,074 deletions.
12 changes: 5 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hnsw_rs"
version = "0.2.1"
version = "0.2.2"
authors = ["[email protected]"]
description = "Ann based on Hierarchical Navigable Small World Graphs from Yu.A. Malkov and D.A Yashunin"
license = "MIT/Apache-2.0"
Expand Down Expand Up @@ -86,9 +86,7 @@ env_logger = { version = "0.10" }

anyhow = { version = "1.0" }


# x86_64 simd stuff , enabled by simdeez_f feature
simdeez = { version = "1.0", optional = true }
anndists = { version = "0.1" }


# for benchmark reading, so the lbrary do not depend on hdf5 nor ndarray
Expand All @@ -102,7 +100,7 @@ skiplist = { version = "0.5" }

default = []

# feature for std simd on nightly
stdsimd = []
stdsimd = ["anndists/stdsimd"]
# feature for simd on stable for x86*
simdeez_f = ["simdeez"]
simdeez_f = ["anndists/simdeez_f"]
# feature for std simd on nightly
4 changes: 2 additions & 2 deletions examples/utils/annhdf5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ impl AnnBenchmarkData {
#[allow(unused)]
pub fn do_l2_normalization(&mut self) {
for i in 0..self.test_data.len() {
hnsw_rs::dist::l2_normalize(&mut self.test_data[i]);
anndists::dist::l2_normalize(&mut self.test_data[i]);
}
for i in 0..self.train_data.len() {
hnsw_rs::dist::l2_normalize(&mut self.train_data[i].0);
anndists::dist::l2_normalize(&mut self.train_data[i].0);
}
} // end of do_l2_normalization
} // end of impl block
Expand Down
2 changes: 1 addition & 1 deletion src/datamap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ mod tests {

use super::*;

use crate::dist;
use crate::hnswio::HnswIo;
use anndists::dist;

pub use crate::api::AnnT;
use crate::prelude::*;
Expand Down
Loading

0 comments on commit 3acb711

Please sign in to comment.