Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ edition = "2021"
[dependencies]
bytemuck = { version = "1.21.0", features = ["derive", "extern_crate_alloc"] }
byteorder = "1.5.0"
heed = { version = "0.21.0", default-features = false }
log = "0.4.22"
heed = { version = "0.20.5", default-features = false }
log = "0.4.26"
memmap2 = "0.9.5"
ordered-float = "4.6.0"
rand = { version = "0.8.5", features = ["alloc"] }
Expand Down
8 changes: 4 additions & 4 deletions src/spaces/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pub mod simple;

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod simple_sse;
// #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
// mod simple_sse;

#[cfg(target_arch = "x86_64")]
mod simple_avx;
// #[cfg(target_arch = "x86_64")]
// mod simple_avx;

#[cfg(target_arch = "aarch64")]
mod simple_neon;
16 changes: 8 additions & 8 deletions src/spaces/simple.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#[cfg(target_arch = "x86_64")]
use super::simple_avx::*;
// #[cfg(target_arch = "x86_64")]
// use super::simple_avx::*;
#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
use super::simple_neon::*;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
use super::simple_sse::*;
// #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
// use super::simple_sse::*;
use crate::unaligned_vector::{BinaryQuantized, UnalignedVector};

#[cfg(target_arch = "x86_64")]
Expand All @@ -23,14 +23,14 @@ pub fn euclidean_distance(u: &UnalignedVector<f32>, v: &UnalignedVector<f32>) ->
&& is_x86_feature_detected!("fma")
&& u.len() >= MIN_DIM_SIZE_AVX
{
return unsafe { euclid_similarity_avx(u, v) };
// return unsafe { euclid_similarity_avx(u, v) };
}
}

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
{
if is_x86_feature_detected!("sse") && u.len() >= MIN_DIM_SIZE_SIMD {
return unsafe { euclid_similarity_sse(u, v) };
// return unsafe { euclid_similarity_sse(u, v) };
}
}

Expand All @@ -57,14 +57,14 @@ pub fn dot_product(u: &UnalignedVector<f32>, v: &UnalignedVector<f32>) -> f32 {
&& is_x86_feature_detected!("fma")
&& u.len() >= MIN_DIM_SIZE_AVX
{
return unsafe { dot_similarity_avx(u, v) };
// return unsafe { dot_similarity_avx(u, v) };
}
}

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
{
if is_x86_feature_detected!("sse") && u.len() >= MIN_DIM_SIZE_SIMD {
return unsafe { dot_similarity_sse(u, v) };
// return unsafe { dot_similarity_sse(u, v) };
}
}

Expand Down
1 change: 1 addition & 0 deletions src/unaligned_vector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ impl<Codec: UnalignedVectorCodec> UnalignedVector<Codec> {
self.vector.is_empty()
}
/// Returns the raw pointer to the start of this slice.
#[allow(unused)]
pub(crate) fn as_ptr(&self) -> *const u8 {
self.vector.as_ptr()
}
Expand Down
Loading