From 5460accb52c9fce7c09ebaf3f5d56cb1f8914377 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Mon, 17 Feb 2025 17:13:37 +0100 Subject: [PATCH] Minor changes --- include/aidge/scheduler/Scheduler.hpp | 20 +++++++++---------- python_binding/scheduler/pybind_Scheduler.cpp | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/aidge/scheduler/Scheduler.hpp b/include/aidge/scheduler/Scheduler.hpp index 881d16e05..61aeb49ba 100644 --- a/include/aidge/scheduler/Scheduler.hpp +++ b/include/aidge/scheduler/Scheduler.hpp @@ -135,16 +135,6 @@ public: */ void tagConditionalNodes() const; - /** - * @brief Check if the conditional node is required (if one of its conditions - * is true). - * - * @param node Node to check the condition. - * @return true If any node condition is true, meaning it has to be executed. - * @return false If all node conditions are false, meaning it can be skipped. - */ - bool isConditionalNodeRequired(NodePtr node) const; - /** * @brief Get the static scheduling order of nodes. * @param step The step of the static schedule to retrieve (default is 0). @@ -220,6 +210,16 @@ public: protected: + /** + * @brief Check if the conditional node is required (if one of its conditions + * is true). + * + * @param node Node to check the condition. + * @return true If any node condition is true, meaning it has to be executed. + * @return false If all node conditions are false, meaning it can be skipped. + */ + bool isConditionalNodeRequired(NodePtr node) const; + /** * @brief Getter for the set of children Nodes of the given input Nodes. * @param producers Set of Nodes for which we want to obtain the set of children Nodes. diff --git a/python_binding/scheduler/pybind_Scheduler.cpp b/python_binding/scheduler/pybind_Scheduler.cpp index 01a27e455..34ed93520 100644 --- a/python_binding/scheduler/pybind_Scheduler.cpp +++ b/python_binding/scheduler/pybind_Scheduler.cpp @@ -30,6 +30,7 @@ void init_Scheduler(py::module& m){ py::class_<Scheduler, std::shared_ptr<Scheduler>>(m, "Scheduler") .def(py::init<std::shared_ptr<GraphView>&>(), py::arg("graph_view")) .def("graph_view", &Scheduler::graphView) + .def("tag_conditional_nodes", &Scheduler::tagConditionalNodes) .def("save_scheduling_diagram", &Scheduler::saveSchedulingDiagram, py::arg("file_name")) .def("save_static_scheduling_diagram", &Scheduler::saveStaticSchedulingDiagram, py::arg("file_name")) .def("save_factorized_static_scheduling_diagram", &Scheduler::saveFactorizedStaticSchedulingDiagram, py::arg("file_name"), py::arg("min_repeat") = 2) -- GitLab