Skip to main content

Crate rustalign_simd

Crate rustalign_simd 

Source
Expand description

RustAlign SIMD - SIMD-accelerated alignment operations

This crate provides SIMD-accelerated implementations of the Smith-Waterman alignment algorithm, matching the C++ SSE/AVX2 code.

§Platform Support

  • x86_64: SSE2, SSE4.2, AVX2 via core::arch::x86_64
  • AArch64: NEON via core::arch::aarch64
  • Other: Scalar fallback implementations

§Runtime Dispatch

The crate supports runtime CPU feature detection and dispatch, similar to the C++ __builtin_cpu_supports approach.

Structs§

CpuFeatures
Detected CPU features for SIMD dispatch
DpMatrix
SIMD-accelerated DP matrix
MatrixQuartet
Helper structure for working with matrix quartets
SseReg
SIMD register type wrapper

Constants§

AVX_REG_WIDTH
AVX register width in bytes
I16_PER_AVX
Number of i16 elements per AVX register
I16_PER_SSE
Number of i16 elements per SSE register
SSE_REG_WIDTH
SIMD register width in bytes (16 for SSE, 32 for AVX2)
U8_PER_AVX
Number of u8 elements per AVX register
U8_PER_SSE
Number of u8 elements per SSE register

Functions§

aligned_vec
Create a new SIMD-aligned vector
has_avx2
Check if AVX2 is available (x86_64)
has_neon
Check if NEON is available (always false on x86_64)
has_popcnt
Check if POPCNT is available
has_sse2
Convenience functions for individual feature detection
has_sse4_2
Check if SSE4.2 is available

Type Aliases§

AlignedVec
SIMD-aligned vector for SSE operations