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
9c1a2669
"platforms/reference/vscode:/vscode.git/clone" did not exist on "e1a378b784ed377f9458669f358ddc021da7df92"
Commit
9c1a2669
authored
Jan 27, 2010
by
Peter Eastman
Browse files
Fixed thread synchronization bug
parent
a5e3869f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
platforms/opencl/src/kernels/sort.cl
platforms/opencl/src/kernels/sort.cl
+3
-1
No files found.
platforms/opencl/src/kernels/sort.cl
View file @
9c1a2669
...
...
@@ -76,8 +76,10 @@ __kernel void computeBucketPositions(int numBuckets, __global int* bucketOffset,
//
Perform
a
parallel
prefix
sum.
for
(
int
step
=
1
; step < get_local_size(0); step *= 2) {
int
add
=
buffer[get_local_id
(
0
)
-step]
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
if
(
get_local_id
(
0
)
>=
step
)
buffer[get_local_id
(
0
)
]
+=
buffer[get_local_id
(
0
)
-step]
;
buffer[get_local_id
(
0
)
]
+=
add
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
}
...
...
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