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
44daf269
Unverified
Commit
44daf269
authored
Feb 07, 2018
by
peastman
Committed by
GitHub
Feb 07, 2018
Browse files
Merge pull request #1986 from peastman/error
Fixed compilation error in kernel
parents
32400ee5
de666e30
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
platforms/cuda/src/kernels/rmsd.cu
platforms/cuda/src/kernels/rmsd.cu
+1
-0
platforms/opencl/src/kernels/rmsd.cl
platforms/opencl/src/kernels/rmsd.cl
+2
-1
No files found.
platforms/cuda/src/kernels/rmsd.cu
View file @
44daf269
...
...
@@ -6,6 +6,7 @@
*/
__device__
real
reduceValue
(
real
value
,
volatile
real
*
temp
)
{
const
int
thread
=
threadIdx
.
x
;
__syncthreads
();
temp
[
thread
]
=
value
;
__syncthreads
();
for
(
uint
step
=
1
;
step
<
32
;
step
*=
2
)
{
...
...
platforms/opencl/src/kernels/rmsd.cl
View file @
44daf269
...
...
@@ -6,12 +6,13 @@
*/
real
reduceValue
(
real
value,
__local
volatile
real*
temp
)
{
const
int
thread
=
get_local_id
(
0
)
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
temp[thread]
=
value
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
for
(
uint
step
=
1
; step < 32; step *= 2) {
if
(
thread+step
<
get_local_size
(
0
)
&&
thread%
(
2*step
)
==
0
)
temp[thread]
=
temp[thread]
+
temp[thread+step]
;
SYNC_WARPS
SYNC_WARPS
;
}
for
(
uint
step
=
32
; step < get_local_size(0); step *= 2) {
if
(
thread+step
<
get_local_size
(
0
)
&&
thread%
(
2*step
)
==
0
)
...
...
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