Skip to content

Commit

Permalink
Add ability to get handle to CUDA Arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
lukepfister committed Nov 10, 2015
1 parent 88d143b commit 86ecf27
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 @@ -1059,6 +1059,9 @@ namespace pycuda

CUarray handle() const
{ return m_array; }

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

// }}}
Expand Down
1 change: 1 addition & 0 deletions src/wrapper/wrap_cudadrv.cpp
Expand Up @@ -1429,6 +1429,7 @@ BOOST_PYTHON_MODULE(_driver)
.def(py::init<const CUDA_ARRAY3D_DESCRIPTOR &>())
.DEF_SIMPLE_METHOD(get_descriptor_3d)
#endif
.add_property("handle", &cl::handle_int)
;
}
// }}}
Expand Down

0 comments on commit 86ecf27

Please sign in to comment.