Skip to content
Closed
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
2 changes: 1 addition & 1 deletion rust/vecsim/src/distance/simd/avx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#![cfg(target_arch = "x86_64")]

use crate::types::VectorElement;
use crate::types::{DistanceType, VectorElement};

#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;
Expand Down
2 changes: 1 addition & 1 deletion rust/vecsim/src/distance/simd/avx2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#![cfg(target_arch = "x86_64")]

use crate::types::VectorElement;
use crate::types::{DistanceType, VectorElement};

#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;
Expand Down
2 changes: 1 addition & 1 deletion rust/vecsim/src/distance/simd/avx512.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#![cfg(target_arch = "x86_64")]

use crate::types::VectorElement;
use crate::types::{DistanceType, VectorElement};

#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;
Expand Down
2 changes: 1 addition & 1 deletion rust/vecsim/src/distance/simd/avx512bw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#![cfg(target_arch = "x86_64")]

use crate::types::{Int8, UInt8, VectorElement};
use crate::types::{DistanceType, Int8, UInt8, VectorElement};

#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;
Expand Down
8 changes: 4 additions & 4 deletions rust/vecsim/src/distance/simd/cross_consistency_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ mod x86_64_tests {

let scalar_result = cosine_distance_scalar_f32(&a, &b, dim);
let simd_result = unsafe {
crate::distance::simd::sse::cosine_distance_f32_sse(
crate::distance::simd::sse::cosine_f32_sse(
a.as_ptr(), b.as_ptr(), dim
)
};
Expand Down Expand Up @@ -606,7 +606,7 @@ mod x86_64_tests {

if is_x86_feature_detected!("sse") {
let sse_cos = unsafe {
crate::distance::simd::sse::cosine_distance_f32_sse(a.as_ptr(), b.as_ptr(), dim)
crate::distance::simd::sse::cosine_f32_sse(a.as_ptr(), b.as_ptr(), dim)
};
assert!((sse_cos - 1.0).abs() < 0.01, "SSE cosine of orthogonal vectors should be ~1.0, got {}", sse_cos);
}
Expand All @@ -631,7 +631,7 @@ mod x86_64_tests {

if is_x86_feature_detected!("sse") {
let sse_cos = unsafe {
crate::distance::simd::sse::cosine_distance_f32_sse(a.as_ptr(), b.as_ptr(), dim)
crate::distance::simd::sse::cosine_f32_sse(a.as_ptr(), b.as_ptr(), dim)
};
assert!((sse_cos - 2.0).abs() < 0.01, "SSE cosine of opposite vectors should be ~2.0, got {}", sse_cos);
}
Expand Down Expand Up @@ -662,7 +662,7 @@ mod x86_64_tests {
unsafe {
results_l2.push(("sse", crate::distance::simd::sse::l2_squared_f32_sse(a.as_ptr(), b.as_ptr(), dim)));
results_ip.push(("sse", crate::distance::simd::sse::inner_product_f32_sse(a.as_ptr(), b.as_ptr(), dim)));
results_cos.push(("sse", crate::distance::simd::sse::cosine_distance_f32_sse(a.as_ptr(), b.as_ptr(), dim)));
results_cos.push(("sse", crate::distance::simd::sse::cosine_f32_sse(a.as_ptr(), b.as_ptr(), dim)));
}
}

Expand Down
2 changes: 1 addition & 1 deletion rust/vecsim/src/distance/simd/sse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#![cfg(target_arch = "x86_64")]

use crate::types::VectorElement;
use crate::types::{DistanceType, VectorElement};

#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;
Expand Down
2 changes: 1 addition & 1 deletion rust/vecsim/src/distance/simd/sse4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#![cfg(target_arch = "x86_64")]

use crate::types::VectorElement;
use crate::types::{DistanceType, VectorElement};

#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;
Expand Down
2 changes: 1 addition & 1 deletion rust/vecsim/src/index/hnsw/visited.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl VisitedNodesHandlerPool {
}

/// Get a handler from the pool, creating one if necessary.
pub fn get(&self) -> PooledHandler {
pub fn get(&self) -> PooledHandler<'_> {
let cap = self.default_capacity.load(std::sync::atomic::Ordering::Acquire);
let handler = self.handlers.lock().pop().unwrap_or_else(|| {
VisitedNodesHandler::new(cap)
Expand Down
Loading