style: cargo fmt --all

Formatting only. cargo fmt --check was already failing on main (accel SIMD
kernels, agent, format, migrate, bench); CI now enforces it.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
osobh
2026-09-19 05:36:23 -07:00
co-authored by Claude Fable 5.1
parent bbe1baa208
commit a3f7c6fe89
13 changed files with 67 additions and 21 deletions
+5 -1
View File
@@ -111,7 +111,11 @@ pub unsafe fn cosine_similarity(a: &[f32], b: &[f32]) -> f32 {
}
let denom = (norm_a * norm_b).sqrt();
if denom < f32::EPSILON { 0.0 } else { dot / denom }
if denom < f32::EPSILON {
0.0
} else {
dot / denom
}
}
}
+5 -1
View File
@@ -89,7 +89,11 @@ pub unsafe fn cosine_similarity(a: &[f32], b: &[f32]) -> f32 {
}
let denom = (norm_a * norm_b).sqrt();
if denom < f32::EPSILON { 0.0 } else { dot / denom }
if denom < f32::EPSILON {
0.0
} else {
dot / denom
}
}
}
+5 -1
View File
@@ -94,7 +94,11 @@ pub unsafe fn cosine_similarity(a: &[f32], b: &[f32]) -> f32 {
}
let denom = (norm_a * norm_b).sqrt();
if denom < f32::EPSILON { 0.0 } else { dot / denom }
if denom < f32::EPSILON {
0.0
} else {
dot / denom
}
}
/// NEON L2 distance.
+5 -1
View File
@@ -21,7 +21,11 @@ pub fn cosine_similarity(a: &[f32], b: &[f32]) -> f32 {
norm_b += y * y;
}
let denom = (norm_a * norm_b).sqrt();
if denom < f32::EPSILON { 0.0 } else { dot / denom }
if denom < f32::EPSILON {
0.0
} else {
dot / denom
}
}
pub fn batch_cosine(query: &[f32], vectors: &[&[f32]], results: &mut [(usize, f32)]) {