| 709 | } |
| 710 | |
| 711 | std::vector<mx::array> operator()(const std::vector<mx::array>& inputs) { |
| 712 | nb::gil_scoped_acquire gil; |
| 713 | |
| 714 | auto new_inputs = nb::cast<nb::tuple>( |
| 715 | tree_unflatten_from_structure(input_structure_, inputs)); |
| 716 | std::vector<mx::array> outputs; |
| 717 | std::tie(outputs, *output_structure_) = |
| 718 | tree_flatten_with_structure(fun_(*new_inputs[0], **new_inputs[1])); |
| 719 | return outputs; |
| 720 | } |
| 721 | }; |
| 722 | |
| 723 | struct InnerVJPFunction { |
nothing calls this directly
no test coverage detected