From ee13ce6e6e1c880c0acf2aa912d54dacc11112ed Mon Sep 17 00:00:00 2001 From: cmoineau <cyril.moineau@cea.fr> Date: Mon, 3 Jun 2024 15:59:41 +0000 Subject: [PATCH] Add a templated binding to allow modular project name. --- .../aidge_export_aidge/templates/pybind.jinja | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 aidge_core/aidge_export_aidge/templates/pybind.jinja diff --git a/aidge_core/aidge_export_aidge/templates/pybind.jinja b/aidge_core/aidge_export_aidge/templates/pybind.jinja new file mode 100644 index 000000000..9b48cc97f --- /dev/null +++ b/aidge_core/aidge_export_aidge/templates/pybind.jinja @@ -0,0 +1,14 @@ +#include <pybind11/pybind11.h> + +#include "dnn.hpp" + +namespace py = pybind11; + + +void init_{{name}}(py::module& m){ + m.def("generate_model", generateModel); +} + +PYBIND11_MODULE({{name}}, m) { + init_{{name}}(m); +} -- GitLab