You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
core: branchless minimum-image fold and flat Verlet-list cutoff table
Wave 1 of the short-range hot-path optimization:
- Branchless cuboid minimum-image fold. Encode periodicity into a masked
inverse box length (0 for non-periodic directions) so the per-component
fold reduces to `dx - rint(dx * inv_masked) * L` with no branch. `rint`
maps to a single rounding instruction. Results match the previous
round-based fold across the pair-loop input domain (separations below
1.5 box lengths); confirmed bitwise-identical on the canonical lj and
p3m trajectories.
- Flat per-type-pair squared-cutoff table in VerletCriterion. The
per-candidate cutoff query in the Verlet-list build becomes a dense
table load instead of walking the InteractionsNonBonded pointer table;
inactive pairs store a negative sentinel so the distance comparison
rejects them without a separate activity check.
- Hoist cuboid box parameters by value into the Verlet-build kernels via
CuboidMinimumImage, instead of chasing the BoxGeometry reference for the
box lengths on every candidate pair.
- Force-inline Utils::Vector operator+= / operator-= (previously outlined
as .isra clones called from inside the pair kernel).
Canonical identity bitwise-preserved (lj, p3m); unit tests pass.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments