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
f9106ddb
Unverified
Commit
f9106ddb
authored
Jun 18, 2018
by
peastman
Committed by
GitHub
Jun 18, 2018
Browse files
Merge pull request #2102 from peastman/sort
Fixed race condition in sorting
parents
ed8a48b6
2f565a0d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
platforms/cuda/src/kernels/sort.cu
platforms/cuda/src/kernels/sort.cu
+1
-0
platforms/opencl/src/kernels/sort.cl
platforms/opencl/src/kernels/sort.cl
+1
-0
No files found.
platforms/cuda/src/kernels/sort.cu
View file @
f9106ddb
...
...
@@ -144,6 +144,7 @@ __global__ void computeBucketPositions(unsigned int numBuckets, unsigned int* __
// Load the bucket sizes into local memory.
unsigned
int
globalIndex
=
startBucket
+
threadIdx
.
x
;
__syncthreads
();
posBuffer
[
threadIdx
.
x
]
=
(
globalIndex
<
numBuckets
?
bucketOffset
[
globalIndex
]
:
0
);
__syncthreads
();
...
...
platforms/opencl/src/kernels/sort.cl
View file @
f9106ddb
...
...
@@ -147,6 +147,7 @@ __kernel void computeBucketPositions(uint numBuckets, __global uint* restrict bu
//
Load
the
bucket
sizes
into
local
memory.
uint
globalIndex
=
startBucket+get_local_id
(
0
)
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
buffer[get_local_id
(
0
)
]
=
(
globalIndex
<
numBuckets
?
bucketOffset[globalIndex]
:
0
)
;
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