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
42cbcb89
Commit
42cbcb89
authored
Sep 02, 2010
by
Peter Eastman
Browse files
Fixed a bug that caused a crash on Fermi.
parent
9f4bd981
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
platforms/opencl/src/kernels/sort.cl
platforms/opencl/src/kernels/sort.cl
+4
-5
No files found.
platforms/opencl/src/kernels/sort.cl
View file @
42cbcb89
...
@@ -76,9 +76,8 @@ __kernel void computeBucketPositions(int numBuckets, __global int* bucketOffset,
...
@@ -76,9 +76,8 @@ __kernel void computeBucketPositions(int numBuckets, __global int* bucketOffset,
//
Perform
a
parallel
prefix
sum.
//
Perform
a
parallel
prefix
sum.
for
(
int
step
=
1
; step < get_local_size(0); step *= 2) {
for
(
int
step
=
1
; step < get_local_size(0); step *= 2) {
int
add
=
buffer[get_local_id
(
0
)
-step]
;
int
add
=
(
get_local_id
(
0
)
>=
step
?
buffer[get_local_id
(
0
)
-step]
:
0
)
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
if
(
get_local_id
(
0
)
>=
step
)
buffer[get_local_id
(
0
)
]
+=
add
;
buffer[get_local_id
(
0
)
]
+=
add
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
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