Skip to content

Draft:try to pass id

Jakob Roth requested to merge pass_id_to_cpp into master

I tried to pass the information about the array shape via a Python ID to C++. Nevertheless, since I am not really familiar with C++, I couldn't figure out how to get the Python object back from the ID.

More specifically, the input to the C++ function is now two void pointers. The first points to the ID of a NumPy array containing the dimensions of the input (second pointer). @mtr do you know how to get back the numpy array from the id? (This part of the code: https://gitlab.mpcdf.mpg.de/jroth/extending-jax-and-nifty/-/blob/pass_id_to_cpp/cpp_for_jax.cpp?ref_type=heads#L58)

Merge request reports