Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first vector arrays in C++ #33

Open
ftschindler opened this issue Oct 11, 2024 · 1 comment
Open

first vector arrays in C++ #33

ftschindler opened this issue Oct 11, 2024 · 1 comment

Comments

@ftschindler
Copy link
Contributor

ftschindler commented Oct 11, 2024

We need at least:

  • indices on the C++ side
  • a vector array view on the C++ side
  • the vector array interface on the C++ side
  • one implementation (say list-based) on the C++ side

Possible follow-ups are (separate issues once we pick them up):

  • Given a class MyVectorArray : public VectorArrayInterface on the C++ side, how do we ensure the corresponding Python object is derived from nias.interfaces.VectorArray?

    Ideally, the bindings would directly inherit on the Python side, but there might be issues in pybind11 (see Subclass python class in C++ pybind/pybind11#1193).

  • Given any Python vector array derived from nias.interfaces.VectorArray, how can we use that in bindings of C++ functions?

    Say, we have an algorithm implementation on the C++ side like

    double my_algorithm(const VectorArrayInterface<double>& vector_array);

    we want to bind that so that we roughly have

    def my_algorithm(vector_array: nias.interfaces.VectorArray) -> float:

    on the Python side.

    This likely requires a wrapper on the C++ side that holds the Python object and implements the VectorArrayInterface.

@tobiasleibner
Copy link

See nias-project/nias-cpp#10 for the initial implementation on the C++ side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants