holographic_memory/core/
hardware.rs1use super::types::HardwareCapabilities;
5
6pub fn capabilities() -> HardwareCapabilities {
8 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
9 let (avx2, avx512f) = (
10 std::is_x86_feature_detected!("avx2"),
11 std::is_x86_feature_detected!("avx512f"),
12 );
13 #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
14 let (avx2, avx512f) = (false, false);
15
16 #[cfg(target_arch = "aarch64")]
17 let neon = std::arch::is_aarch64_feature_detected!("neon");
18 #[cfg(target_arch = "arm")]
19 let neon = cfg!(target_feature = "neon");
21 #[cfg(not(any(target_arch = "aarch64", target_arch = "arm")))]
22 let neon = false;
23
24 HardwareCapabilities {
25 architecture: std::env::consts::ARCH.to_string(),
26 avx2,
27 avx512f,
28 neon,
29 sparse_intersection_kernel: "adaptive_merge_galloping".to_string(),
31 }
32}