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
f9e24fea
Commit
f9e24fea
authored
Sep 08, 2014
by
peastman
Browse files
Merge pull request #608 from peastman/master
Fixed bug in CustomManyParticleForce that caused crash
parents
a27f396f
904a9c10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
platforms/cuda/src/CudaKernels.cpp
platforms/cuda/src/CudaKernels.cpp
+4
-0
platforms/opencl/src/OpenCLKernels.cpp
platforms/opencl/src/OpenCLKernels.cpp
+4
-0
No files found.
platforms/cuda/src/CudaKernels.cpp
View file @
f9e24fea
...
...
@@ -5024,6 +5024,10 @@ double CudaCalcCustomManyParticleForceKernel::execute(ContextImpl& context, bool
maxNeighborPairs
=
(
int
)
(
1.1
*
(
*
numPairs
));
neighborPairs
=
CudaArray
::
create
<
int2
>
(
cu
,
maxNeighborPairs
,
"customManyParticleNeighborPairs"
);
neighbors
=
CudaArray
::
create
<
int
>
(
cu
,
maxNeighborPairs
,
"customManyParticleNeighbors"
);
forceArgs
[
5
]
=
&
neighbors
->
getDevicePointer
();
neighborsArgs
[
5
]
=
&
neighborPairs
->
getDevicePointer
();
copyPairsArgs
[
0
]
=
&
neighborPairs
->
getDevicePointer
();
copyPairsArgs
[
1
]
=
&
neighbors
->
getDevicePointer
();
continue
;
}
}
...
...
platforms/opencl/src/OpenCLKernels.cpp
View file @
f9e24fea
...
...
@@ -5190,6 +5190,10 @@ double OpenCLCalcCustomManyParticleForceKernel::execute(ContextImpl& context, bo
maxNeighborPairs
=
(
int
)
(
1.1
*
(
*
numPairs
));
neighborPairs
=
OpenCLArray
::
create
<
mm_int2
>
(
cl
,
maxNeighborPairs
,
"customManyParticleNeighborPairs"
);
neighbors
=
OpenCLArray
::
create
<
int
>
(
cl
,
maxNeighborPairs
,
"customManyParticleNeighbors"
);
forceKernel
.
setArg
<
cl
::
Buffer
>
(
5
,
neighbors
->
getDeviceBuffer
());
neighborsKernel
.
setArg
<
cl
::
Buffer
>
(
5
,
neighborPairs
->
getDeviceBuffer
());
copyPairsKernel
.
setArg
<
cl
::
Buffer
>
(
0
,
neighborPairs
->
getDeviceBuffer
());
copyPairsKernel
.
setArg
<
cl
::
Buffer
>
(
1
,
neighbors
->
getDeviceBuffer
());
continue
;
}
}
...
...
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