Skip to content

Add SIMD helpers to SPHCellList#169

Open
AhmedSalih3d wants to merge 2 commits intocodex/refactor-to-avoid-if-statementfrom
codex/evaluate-and-implement-simd.jl-enhancements
Open

Add SIMD helpers to SPHCellList#169
AhmedSalih3d wants to merge 2 commits intocodex/refactor-to-avoid-if-statementfrom
codex/evaluate-and-implement-simd.jl-enhancements

Conversation

@AhmedSalih3d
Copy link
Owner

Motivation

  • Provide a SIMD-friendly implementation for frequent small dot products in the neighbor interaction kernels to attempt a measurable speedup in SPH cell-list compute hotspots.

Description

  • Add SIMD as a project dependency in Project.toml and import Vec into src/SPHCellList.jl.
  • Introduce DotSimd helpers specialized for SVector{2, T} and SVector{3, T} using SIMD.Vec, with a generic fallback to dot for other sizes.
  • Replace hot dot calls in the neighbor interaction kernels (ComputeInteractionsPerParticle!, ComputeInteractionsPerParticleNoKernel!, ComputeInteractionsMDBC!, and related locations) with DotSimd to enable the SIMD path for 2D/3D vectors.

Testing

  • Executed julia -e 'using Pkg; Pkg.activate("."); Pkg.add("SIMD")' which installed SIMD and precompiled packages successfully (precompilation completed without error).
  • No project unit tests or benchmarks were run as part of this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant