Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
050a1aa1
Unverified
Commit
050a1aa1
authored
Sep 16, 2020
by
peastman
Committed by
GitHub
Sep 16, 2020
Browse files
Fixed illegal read in kernel (#2843)
parent
817fd3bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
platforms/cuda/src/kernels/findInteractingBlocks.cu
platforms/cuda/src/kernels/findInteractingBlocks.cu
+2
-1
platforms/opencl/src/kernels/findInteractingBlocks.cl
platforms/opencl/src/kernels/findInteractingBlocks.cl
+2
-1
No files found.
platforms/cuda/src/kernels/findInteractingBlocks.cu
View file @
050a1aa1
...
...
@@ -344,7 +344,8 @@ extern "C" __global__ void findBlocksWithInteractions(real4 periodicBoxSize, rea
for
(
int
j
=
0
;
j
<
tilesToStore
;
j
++
)
interactingAtoms
[(
newTileStartIndex
+
j
)
*
TILE_SIZE
+
indexInWarp
]
=
buffer
[
indexInWarp
+
j
*
TILE_SIZE
];
}
buffer
[
indexInWarp
]
=
buffer
[
indexInWarp
+
TILE_SIZE
*
tilesToStore
];
if
(
indexInWarp
+
TILE_SIZE
*
tilesToStore
<
BUFFER_SIZE
)
buffer
[
indexInWarp
]
=
buffer
[
indexInWarp
+
TILE_SIZE
*
tilesToStore
];
neighborsInBuffer
-=
TILE_SIZE
*
tilesToStore
;
}
}
...
...
platforms/opencl/src/kernels/findInteractingBlocks.cl
View file @
050a1aa1
...
...
@@ -244,7 +244,8 @@ __kernel void findBlocksWithInteractions(real4 periodicBoxSize, real4 invPeriodi
for (int j = 0; j < tilesToStore; j++)
interactingAtoms[(newTileStartIndex+j)*TILE_SIZE+indexInWarp] = buffer[indexInWarp+j*TILE_SIZE];
}
buffer[indexInWarp] = buffer[indexInWarp+TILE_SIZE*tilesToStore];
if (indexInWarp+TILE_SIZE*tilesToStore < BUFFER_SIZE)
buffer[indexInWarp] = buffer[indexInWarp+TILE_SIZE*tilesToStore];
neighborsInBuffer -= TILE_SIZE*tilesToStore;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment