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
3e43d52b
"vscode:/vscode.git/clone" did not exist on "df99352d9bec6c0f1dcf643f57436b278844ace4"
Commit
3e43d52b
authored
Apr 04, 2018
by
Peter Eastman
Browse files
Fixed CUDA error when working with multiple contexts
parent
8fe2b5a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
platforms/cuda/src/CudaArray.cpp
platforms/cuda/src/CudaArray.cpp
+1
-0
No files found.
platforms/cuda/src/CudaArray.cpp
View file @
3e43d52b
...
@@ -41,6 +41,7 @@ CudaArray::CudaArray(CudaContext& context, int size, int elementSize, const std:
...
@@ -41,6 +41,7 @@ CudaArray::CudaArray(CudaContext& context, int size, int elementSize, const std:
CudaArray
::~
CudaArray
()
{
CudaArray
::~
CudaArray
()
{
if
(
pointer
!=
0
&&
ownsMemory
&&
context
->
getContextIsValid
())
{
if
(
pointer
!=
0
&&
ownsMemory
&&
context
->
getContextIsValid
())
{
context
->
setAsCurrent
();
CUresult
result
=
cuMemFree
(
pointer
);
CUresult
result
=
cuMemFree
(
pointer
);
if
(
result
!=
CUDA_SUCCESS
)
{
if
(
result
!=
CUDA_SUCCESS
)
{
std
::
stringstream
str
;
std
::
stringstream
str
;
...
...
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