refactor(hpc): add simd_caps LazyLock singleton — detect once, dispat…#34
Merged
Conversation
…ch forever Replace 38 per-call is_x86_feature_detected! macro invocations across 10 HPC modules with a single LazyLock<SimdCaps> singleton. Each macro call was a hidden AtomicU8 load (~3ns); now it's one LazyLock deref to a frozen Copy struct (~1ns). New module: simd_caps.rs - SimdCaps: Copy struct with avx2/avx512f/avx512bw/avx512vl/ avx512vpopcntdq/sse41/sse2/fma fields - simd_caps(): inline(always) accessor via static LazyLock - has_avx512_popcnt(), has_avx512_bw_popcnt() convenience methods - 4 tests (detect, Copy, deterministic, convenience) Swept files: aabb, bitwise, byte_scan, cam_pq, distance, nibble, palette_codec, property_mask, spatial_hash (production code only; test guards left as-is). 1135 HPC tests pass, 0 failures. https://claude.ai/code/session_01CdqyUTUfjKZuk8YGJzv6LB
AdaWorldAPI
pushed a commit
that referenced
this pull request
Mar 30, 2026
12 cognitive primitives implemented: 7 as styles/ submodules (rte, htd, smad, tcp, irs, mcp, tca) 5 as additions to existing modules (causal_diff, bgz17_bridge, nars, cascade) 21 tests passing. Waiting for tactics #13-#34. https://claude.ai/code/session_01M3at4EuHVvQ8S95mSnKgtK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ch forever
Replace 38 per-call is_x86_feature_detected! macro invocations across 10 HPC modules with a single LazyLock singleton. Each macro call was a hidden AtomicU8 load (~3ns); now it's one LazyLock deref to a frozen Copy struct (~1ns).
New module: simd_caps.rs
Swept files: aabb, bitwise, byte_scan, cam_pq, distance, nibble, palette_codec, property_mask, spatial_hash (production code only; test guards left as-is).
1135 HPC tests pass, 0 failures.
https://claude.ai/code/session_01CdqyUTUfjKZuk8YGJzv6LB