Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add access to cuda context handle
  • Loading branch information
Stewart Hall committed Jun 7, 2016
1 parent 55fe89e commit 1309534
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cpp/cuda.hpp
Expand Up @@ -602,6 +602,9 @@ namespace pycuda
CUcontext handle() const
{ return m_context; }

intptr_t handle_int() const
{ return (intptr_t) m_context; }

bool operator==(const context &other) const
{
return m_context == other.m_context;
Expand Down
1 change: 1 addition & 0 deletions src/wrapper/wrap_cudadrv.cpp
Expand Up @@ -1010,6 +1010,7 @@ BOOST_PYTHON_MODULE(_driver)
.DEF_SIMPLE_METHOD(set_shared_config)
.staticmethod("set_shared_config")
#endif
.add_property("handle", &cl::handle_int)
;
}
// }}}
Expand Down

0 comments on commit 1309534

Please sign in to comment.