Unverified Commit 2a7fd676 authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Fixed rare error related to single pairs (#3057)

parent 4c6cf680
......@@ -98,7 +98,7 @@ __device__ int saveSinglePairs(int x, int* atoms, int* flags, int length, unsign
int pairIndex = pairStartIndex + (indexInWarp > 0 ? prevSum : 0);
for (int i = indexInWarp; i < length; i += 32) {
int count = __popc(flags[i]);
if (count <= MAX_BITS_FOR_PAIRS && pairIndex+count < maxSinglePairs) {
if (count <= MAX_BITS_FOR_PAIRS && pairIndex+count <= maxSinglePairs) {
int f = flags[i];
while (f != 0) {
singlePairs[pairIndex] = make_int2(atoms[i], x*TILE_SIZE+__ffs(f)-1);
......
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