hermes-simd 0.6.0

High-performance, zero-overhead SIMD abstraction library
Documentation

High-performance, zero-overhead SIMD abstraction library.

Architecture

hermes-simd is the public facade for the hermes-simd workspace:

  • [hermes_simd_core] — core abstractions, traits, views
  • [hermes_simd_intrinsics] — architecture-specific kernels
  • [hermes_simd_macros] — proc-macro code generation

Feature Flags

Feature Description
std (default) Runtime CPU feature detection (is_x86_feature_detected!); without it dispatch uses compile-time cfg!(target_feature) only
mnemosyne-memory (default) Route AlignedVec allocation through the mnemosyne allocator
libnuma Linux NUMA affinity and residency probes via libnuma (links -lnuma); allocation still routes through Mnemosyne/the configured allocator

Usage Examples

Dense sum (runtime dispatch):

use hermes_simd::sum;
let data = vec![1.0f32; 1024];
assert_eq!(sum(&data), 1024.0);

Masked dot product:

use hermes_simd::masked_dot;
let a = vec![1.0f32, 2.0, 3.0, 4.0, 5.0];
let b = vec![1.0f32; 5];
let mask = vec![true, false, true, false, true];
assert_eq!(masked_dot(&a, &b, &mask).unwrap(), 9.0); // 1+3+5