diff --git a/include/aidge/scheduler/Scheduler.hpp b/include/aidge/scheduler/Scheduler.hpp index db9b903cc9f90ef3d84252f34867b23cfe13d237..dfdc270fad20a3d1577864ece15f25ee40bf304f 100644 --- a/include/aidge/scheduler/Scheduler.hpp +++ b/include/aidge/scheduler/Scheduler.hpp @@ -156,6 +156,11 @@ public: */ void resetScheduling(); + /** + * Clear only the dynamic scheduling obtained during execution. + */ + void clearScheduling(); + /** * Generate the memory layout for the current static scheduling. * @param incProducers If true, include the producers in the memory layout. diff --git a/python_binding/scheduler/pybind_Scheduler.cpp b/python_binding/scheduler/pybind_Scheduler.cpp index 1a3a4b6b2f552b05ae33fea0ecff43c4f1ec689f..01a27e455b36942d8cfc1c6b282ffb265a034907 100644 --- a/python_binding/scheduler/pybind_Scheduler.cpp +++ b/python_binding/scheduler/pybind_Scheduler.cpp @@ -33,7 +33,8 @@ void init_Scheduler(py::module& m){ .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) - .def("resetScheduling", &Scheduler::resetScheduling) + .def("reset_scheduling", &Scheduler::resetScheduling) + .def("clear_scheduling", &Scheduler::clearScheduling) .def("generate_scheduling", &Scheduler::generateScheduling) .def("get_static_scheduling", &Scheduler::getStaticScheduling, py::arg("step") = 0, py::arg("sorting") = Scheduler::EarlyLateSort::Default) .def("graph_view", &Scheduler::graphView) diff --git a/src/scheduler/Scheduler.cpp b/src/scheduler/Scheduler.cpp index bbbc3d8076cc1ff5fe25e9f60e4827b94ef0de4f..fabdc7ad2a897708297f6fac25f036b45bd3b2b2 100644 --- a/src/scheduler/Scheduler.cpp +++ b/src/scheduler/Scheduler.cpp @@ -519,6 +519,10 @@ void Aidge::Scheduler::resetScheduling() { mScheduling.clear(); } +void Aidge::Scheduler::clearScheduling() { + mScheduling.clear(); +} + /** * @warning This version is a simplified version without special handling of concatenation. */