Closed SimeonEhrig closed 3 years ago
Update: During the development of the cupy caster, we got new experience using pybind11, which changes some of the design decisions.
Cupy_Ref
class, which is a reference to a cupy array and pass this wrapper class by reference to the C++ side.cupy array
, because the ownership of cupy array
needs to be moved to the Python side after leaving the C++ function.Done in #22
During the development of PR #15 we recognized, that we cannot use the numpy array support of pybind11 for cupy arrays. The reason is, that both arrays uses different apis.
Therefore we need to implement a custom pybind11 caster to support a nice interface for the C++ and Python side.
Please implement the custom caster. The C++ interfaces should look like this:
This documentation contains useful information about, how a Python class is organized internal: https://docs.python.org/3/reference/datamodel.html