Skip to content

Fix ARM (Apple Silicon) build of the fast pair HMM - #12

Merged
glennhickey merged 1 commit into
masterfrom
arm-build
Oct 28, 2026
Merged

glennhickey merged 1 commit into
masterfrom
arm-build

Conversation

@glennhickey

Copy link
Copy Markdown

cactus adds -D__AVX2__ on ARM so abPOA can use SIMDe, and since #9 that makes pairwiseAligner.c include immintrin.h there, which breaks the build on Apple Silicon (and presumably aarch64 Linux).

  • The SSE2/AVX2 intrinsics are now only used when the target really is x86, via local PAIR_HMM_X86_SSE2 / PAIR_HMM_X86_AVX2 macros. The scalar path is used everywhere else.
  • On aarch64, FPCR.FZ is set and restored around the same block as the x86 FTZ/DAZ bits, so denormals are flushed the same way and results should match x86.

Tested by building cactus master on an M-series Mac (macOS 15, Apple clang 17) and running examples/evolverMammals.txt end to end.

🤖 Generated with Claude Code

cactus defines __AVX2__ on ARM so abPOA can use SIMDe, which made the fast
pair HMM include immintrin.h there and fail to build.  The intrinsics are now
gated on the target as well as the feature macros.  On aarch64, FPCR.FZ is set
for the same span as the x86 FTZ/DAZ bits so results match x86.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant