Skip to content

Commit 3acb711

Browse files
hnsw_rs depends on crate anndists
1 parent f938df4 commit 3acb711

15 files changed

+155
-2074
lines changed

Diff for: Cargo.toml

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hnsw_rs"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["[email protected]"]
55
description = "Ann based on Hierarchical Navigable Small World Graphs from Yu.A. Malkov and D.A Yashunin"
66
license = "MIT/Apache-2.0"
@@ -86,9 +86,7 @@ env_logger = { version = "0.10" }
8686

8787
anyhow = { version = "1.0" }
8888

89-
90-
# x86_64 simd stuff , enabled by simdeez_f feature
91-
simdeez = { version = "1.0", optional = true }
89+
anndists = { version = "0.1" }
9290

9391

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

103101
default = []
104102

105-
# feature for std simd on nightly
106-
stdsimd = []
103+
stdsimd = ["anndists/stdsimd"]
107104
# feature for simd on stable for x86*
108-
simdeez_f = ["simdeez"]
105+
simdeez_f = ["anndists/simdeez_f"]
106+
# feature for std simd on nightly

Diff for: examples/utils/annhdf5.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ impl AnnBenchmarkData {
204204
#[allow(unused)]
205205
pub fn do_l2_normalization(&mut self) {
206206
for i in 0..self.test_data.len() {
207-
hnsw_rs::dist::l2_normalize(&mut self.test_data[i]);
207+
anndists::dist::l2_normalize(&mut self.test_data[i]);
208208
}
209209
for i in 0..self.train_data.len() {
210-
hnsw_rs::dist::l2_normalize(&mut self.train_data[i].0);
210+
anndists::dist::l2_normalize(&mut self.train_data[i].0);
211211
}
212212
} // end of do_l2_normalization
213213
} // end of impl block

Diff for: src/datamap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ mod tests {
300300

301301
use super::*;
302302

303-
use crate::dist;
304303
use crate::hnswio::HnswIo;
304+
use anndists::dist;
305305

306306
pub use crate::api::AnnT;
307307
use crate::prelude::*;

0 commit comments

Comments
 (0)