MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / l2_squared

Function l2_squared

nodedb-vector/src/distance/simd/avx512.rs:7–10  ·  view source on GitHub ↗
(a: &[f32], b: &[f32])

Source from the content-addressed store, hash-verified

5#![cfg(target_arch = "x86_64")]
6
7pub fn l2_squared(a: &[f32], b: &[f32]) -> f32 {
8 assert_eq!(a.len(), b.len(), "avx512 l2: length mismatch");
9 unsafe { l2_impl(a, b) }
10}
11
12#[target_feature(enable = "avx512f")]
13unsafe fn l2_impl(a: &[f32], b: &[f32]) -> f32 {

Callers

nothing calls this directly

Calls 1

l2_implFunction · 0.70

Tested by

no test coverage detected