Skip to content
Snippets Groups Projects
Commit 8c89d179 authored by Maxence Naud's avatar Maxence Naud
Browse files

[Add] resetScheduling() member function in Scheduling.hpp

parent 04d7660b
No related branches found
No related tags found
1 merge request!54horizontal tiling
Pipeline #35102 passed
......@@ -23,7 +23,7 @@ class Node;
class GraphView;
class SequentialScheduler {
public:
private:
struct SchedulingElement {
SchedulingElement(
std::shared_ptr<Node> node_,
......@@ -36,6 +36,7 @@ public:
std::chrono::time_point<std::chrono::high_resolution_clock> end;
};
public:
SequentialScheduler(std::shared_ptr<GraphView> graphView)
: mGraphView(graphView)
{
......@@ -44,6 +45,10 @@ public:
~SequentialScheduler() = default;
void generateScheduling(bool verbose = false);
inline void resetScheduling() {
mScheduling.clear();
mStaticSchedule.clear();
}
/**
* @brief Run the provided Computational Graph with a batch of data
......@@ -58,13 +63,12 @@ public:
/**
* @brief Return a vector of Node ordered by the order they are called by the scheduler
*
* @return std::vector<std::shared_ptr<Node>>
*/
std::vector<std::shared_ptr<Node>> getStaticScheduling(){
inline std::vector<std::shared_ptr<Node>> getStaticScheduling() const noexcept {
return mStaticSchedule;
}
std::shared_ptr<GraphView> getGraphView(){
inline std::shared_ptr<GraphView> getGraphView() const noexcept {
return mGraphView;
}
......@@ -77,20 +81,11 @@ private:
*/
std::set<std::shared_ptr<Node>> getConsumers(const std::set<std::shared_ptr<Node>>& producers) const;
/**
* @brief Shared ptr to the scheduled graph view
*
*/
/** @brief Shared ptr to the scheduled graph view */
std::shared_ptr<GraphView> mGraphView;
/**
* @brief List of SchedulingElement (i.e: Nodes with their computation time)
*
*/
/** @brief List of SchedulingElement (i.e: Nodes with their computation time) */
std::vector<SchedulingElement> mScheduling;
/**
* @brief List of nodes ordered by their
*
*/
/** @brief List of nodes ordered by their */
std::vector<std::shared_ptr<Node>> mStaticSchedule;
};
} // namespace Aidge
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment