"csrc/vscode:/vscode.git/clone" did not exist on "5ab80c28f3d6c3e4f88ce236f427ab7c81025172"
Unverified Commit b0c2c4d8 authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Minor optimization to PME (#5151)

* Minor optimization to PME

* Minor simplification
parent a112fbfc
......@@ -102,6 +102,7 @@ KERNEL void gridSpreadCharge(GLOBAL const real4* RESTRICT posq,
ybase = ybase*GRID_SIZE_Z;
int index = xbase + ybase + zindex;
real add = dzdx*data[iy].y;
if (fabs(add) > 2.3e-10f) { // Smallest value representable in 64 bit fixed point
#ifdef USE_FIXED_POINT_CHARGE_SPREADING
ATOMIC_ADD(&pmeGrid[index], (mm_ulong) realToFixedPoint(add));
#if defined(__GFX12__)
......@@ -116,6 +117,7 @@ KERNEL void gridSpreadCharge(GLOBAL const real4* RESTRICT posq,
}
}
}
}
}
#ifdef USE_FIXED_POINT_CHARGE_SPREADING
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment