#![allow(clippy::doc_markdown)] #![allow(clippy::cast_lossless)] #![allow(clippy::missing_panics_doc)]
pub mod prefetch;
pub(crate) mod reduction;
pub mod scalar;
mod tail_unroll;
#[allow(unused_imports)]
pub(crate) use tail_unroll::sum_remainder_unrolled_8;
#[allow(unused_imports)]
pub(crate) use tail_unroll::sum_squared_remainder_unrolled_8;
#[allow(unused_imports)]
pub(crate) use reduction::simd_4acc_dot_loop;
#[allow(unused_imports)]
pub(crate) use reduction::simd_4acc_l2_loop;
pub use scalar::{cosine_similarity_fast, fast_rsqrt};
pub use prefetch::{
calculate_prefetch_distance, prefetch_vector, prefetch_vector_multi_cache_line,
prefetch_vector_u64, L2_CACHE_LINE_BYTES,
};
#[cfg(target_arch = "x86_64")]
mod x86_avx512;
#[cfg(target_arch = "x86_64")]
mod x86_avx2;
#[cfg(target_arch = "x86_64")]
mod x86_avx2_similarity;
#[cfg(target_arch = "aarch64")]
mod neon;
#[cfg(target_arch = "x86_64")]
pub(crate) use x86_avx512::{
cosine_fused_avx512, cosine_fused_avx512_4acc, cosine_fused_avx512_8acc, dot_product_avx512,
dot_product_avx512_4acc, dot_product_avx512_8acc, hamming_avx512, hamming_avx512_4acc,
hamming_binary_avx512, hamming_binary_avx512_vpopcntdq, jaccard_avx512, jaccard_avx512_4acc,
jaccard_avx512_8acc, squared_l2_avx512, squared_l2_avx512_4acc, squared_l2_avx512_8acc,
};
#[cfg(target_arch = "x86_64")]
pub(crate) use x86_avx2::{
dot_product_avx2, dot_product_avx2_1acc, dot_product_avx2_4acc, squared_l2_avx2,
squared_l2_avx2_1acc, squared_l2_avx2_4acc,
};
#[cfg(target_arch = "x86_64")]
pub(crate) use x86_avx2_similarity::{
cosine_fused_avx2, cosine_fused_avx2_2acc, hamming_avx2, hamming_binary_avx2, jaccard_avx2,
};
#[cfg(target_arch = "aarch64")]
pub(crate) use neon::{
cosine_neon, dot_product_neon, hamming_binary_neon, hamming_neon, jaccard_neon, squared_l2_neon,
};
pub mod adc;
mod dispatch;
pub use dispatch::{
batch_cosine_native, batch_dot_product_native, batch_euclidean_native, batch_hamming_native,
batch_jaccard_native, batch_squared_l2_native, cosine_normalized_native,
cosine_similarity_native, dot_product_native, euclidean_native, hamming_binary_native,
hamming_distance_native, jaccard_similarity_native, norm_native, normalize_inplace_native,
simd_level, squared_l2_native, warmup_simd_cache, DistanceEngine, SimdLevel,
};
#[cfg(test)]
mod simd_native_dispatch_tests;
#[cfg(test)]
mod cosine_fused_tests;
#[cfg(test)]
mod harley_seal_tests;
#[cfg(test)]
mod warmup_tests;
#[cfg(test)]
mod distance_engine_tests;
#[cfg(test)]
mod hamming_jaccard_tests;