Minor optimizations to CPU platform: avoid applying periodic boundary conditions unnecessarily