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
11b86e0d
"vscode:/vscode.git/clone" did not exist on "f2958043a7a60e19484e3290232dc41a2fadfbf3"
Commit
11b86e0d
authored
Apr 12, 2013
by
Peter Eastman
Browse files
Call cudaProfilerStop() when destroying a context so profiling will work correctly
parent
a106d7d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
platforms/cuda/src/CudaContext.cpp
platforms/cuda/src/CudaContext.cpp
+4
-1
No files found.
platforms/cuda/src/CudaContext.cpp
View file @
11b86e0d
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#include <iostream>
#include <iostream>
#include <sstream>
#include <sstream>
#include <typeinfo>
#include <typeinfo>
#include <cudaProfiler.h>
#define CHECK_RESULT(result) CHECK_RESULT2(result, errorMessage);
#define CHECK_RESULT(result) CHECK_RESULT2(result, errorMessage);
...
@@ -253,8 +254,10 @@ CudaContext::~CudaContext() {
...
@@ -253,8 +254,10 @@ CudaContext::~CudaContext() {
if
(
thread
!=
NULL
)
if
(
thread
!=
NULL
)
delete
thread
;
delete
thread
;
string
errorMessage
=
"Error deleting Context"
;
string
errorMessage
=
"Error deleting Context"
;
if
(
contextIsValid
)
if
(
contextIsValid
)
{
cuProfilerStop
();
CHECK_RESULT
(
cuCtxDestroy
(
context
));
CHECK_RESULT
(
cuCtxDestroy
(
context
));
}
contextIsValid
=
false
;
contextIsValid
=
false
;
}
}
...
...
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