Skip to content

feat(simd): add canonical hpc::simd module with runtime dispatch#3

Merged
LessUp merged 1 commit into
masterfrom
runtime-simd-deepening
May 22, 2026
Merged

feat(simd): add canonical hpc::simd module with runtime dispatch#3
LessUp merged 1 commit into
masterfrom
runtime-simd-deepening

Conversation

@LessUp
Copy link
Copy Markdown
Owner

@LessUp LessUp commented May 22, 2026

Summary

  • Add include/hpc/simd.hpp as the unified public SIMD module
  • Centralize runtime SIMD level detection and alignment selection
  • Provide SimdVec<T, Width> wrapper types with platform-specific specializations (SSE2/AVX2/AVX512)
  • Add runtime-dispatched kernels (add_arrays, dot_product, scale_array, clamp_array)
  • Refactor examples, benchmarks, and tests to use the new seam
  • Include OpenSpec change documentation

Test plan

  • cmake --preset=debug && cmake --build build/debug - builds successfully
  • ctest --preset=debug - all 87 tests pass
  • SIMD-specific tests validate the new public seam

Add include/hpc/simd.hpp as the unified public SIMD module:
- SIMDLevel enum and runtime detection (SSE2/AVX/AVX2/AVX512)
- AlignedAllocator and aligned_vector for SIMD-aligned memory
- SimdVec<T, Width> wrapper types with platform-specific specializations
- Runtime-dispatched kernels (add_arrays, dot_product, scale, clamp)

Refactor examples, benchmarks, and tests to use the new seam.
Include OpenSpec change documentation for the deepening work.
@LessUp LessUp merged commit b3630f0 into master May 22, 2026
6 of 7 checks passed
LessUp added a commit that referenced this pull request May 22, 2026
feat(simd): add canonical hpc::simd module with runtime dispatch
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