Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #111 from thestew42/master
Add access to cuda context handle
  • Loading branch information
inducer committed Jun 7, 2016
2 parents 55fe89e + 1309534 commit ceb78c1
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 ceb78c1

Please sign in to comment.