diff --git a/compiler/DirectedGraph/DirectedGraphAlgorythm.hh b/compiler/DirectedGraph/DirectedGraphAlgorythm.hh index 45554c1be7..4f1a76f2bc 100644 --- a/compiler/DirectedGraph/DirectedGraphAlgorythm.hh +++ b/compiler/DirectedGraph/DirectedGraphAlgorythm.hh @@ -260,7 +260,7 @@ inline std::vector> parallelize(const digraph& g) } }; - std::map levelcache; + std::map levelcache; // compute the level of each node in the graph int l = -1; for (const N& n : g.nodes()) { @@ -582,8 +582,8 @@ inline std::vector leaves(const digraph& G) * @param G * @return std::vector */ -template -inline std::vector criticalpath(const digraph& G, const N& n) +template > +inline std::vector criticalpath(const digraph& G, const N& n) { std::vector P; for (const auto& c : G.destinations(n)) { @@ -643,8 +643,8 @@ static std::list interleave(std::list& list1, std::list& list2) * @param n a node of G * @return std::list scheduling with duplicates */ -template -inline std::list recschedulenode(const digraph& G, const N& n) +template > +inline std::list recschedulenode(const digraph& G, const N& n) { std::list P; for (const auto& c : G.destinations(n)) { @@ -662,8 +662,8 @@ inline std::list recschedulenode(const digraph& G, const N& n) * @param G a DAG * @return std::list scheduling with duplicates */ -template -inline std::list recschedule(const digraph& G) +template > +inline std::list recschedule(const digraph& G) { std::list P; for (const N& n : roots(G)) { @@ -673,7 +673,6 @@ inline std::list recschedule(const digraph& G) return P; } - /******************************************************************************* ******************************************************************************** @@ -848,8 +847,8 @@ inline std::ostream& operator<<(std::ostream& file, const digraph * @param g graph we want to analyze * @return std::vector [n, a, c, l0, l1, ...] */ -template -inline std::vector topology(const digraph& g) +template > +inline std::vector topology(const digraph& g) { std::vector v; int n = 0; diff --git a/compiler/DirectedGraph/Schedule.hh b/compiler/DirectedGraph/Schedule.hh index 8e22d57728..1eeeb2ecd8 100644 --- a/compiler/DirectedGraph/Schedule.hh +++ b/compiler/DirectedGraph/Schedule.hh @@ -77,7 +77,7 @@ class schedule { // A schedule in reverse order schedule reverse() const { - schedule S; + schedule S; for (auto it = fElements.rbegin(); it != fElements.rend(); ++it) { S.append(*it); } @@ -166,11 +166,11 @@ inline schedule bfschedule(const digraph& G) * @param G * @return schedule */ -template -inline schedule spschedule(const digraph& G) +template > +inline schedule spschedule(const digraph& G) { - std::set V; // already scheduled nodes - schedule S; // the final schedule + std::set V; // already scheduled nodes + schedule S; // the final schedule std::list L = recschedule(G); // schedule list with duplicated for (auto it = L.rbegin(); it != L.rend(); ++it) { @@ -253,11 +253,11 @@ inline schedule bfcyclesschedule(const digraph& G) * @param G * @return schedule */ -template -inline schedule rbschedule(const digraph& G) +template > +inline schedule rbschedule(const digraph& G) { std::vector> P = parallelize(reverse(G)); - schedule S; + schedule S; for (uint64_t i = 0; i < P.size(); i++) { for (const N& n : P[i]) { diff --git a/compiler/generator/compile_scal.cpp b/compiler/generator/compile_scal.cpp index d6f39492c9..51a997ca6a 100644 --- a/compiler/generator/compile_scal.cpp +++ b/compiler/generator/compile_scal.cpp @@ -535,7 +535,7 @@ void ScalarCompiler::compileMultiSignal(Tree L) std::cerr << "Print siglist inst graph topology : " << topology(G) << '\n'; } // Force a specific scheduling (i.e. compilation order) - schedule S; + schedule S; switch (gGlobal->gSchedulingStrategy) { case 0: S = dfschedule(G); diff --git a/compiler/transform/sigDependenciesGraph.cpp b/compiler/transform/sigDependenciesGraph.cpp index 67f91963de..fff632ddde 100644 --- a/compiler/transform/sigDependenciesGraph.cpp +++ b/compiler/transform/sigDependenciesGraph.cpp @@ -13,7 +13,7 @@ class SigDependenciesGraph : public SignalVisitor { protected: digraph fGraph; bool fFullGraph; - bool fLimitOndemand = false; // don't go beyond tempvar signals + bool fLimitOndemand = false; // don't go beyond tempvar signals public: SigDependenciesGraph(bool full, bool limit) @@ -299,22 +299,6 @@ digraph immediateGraph(Tree L) return g.getGraph(); } -/** - * @brief Compute the immediate Graph (containing only immediate dependencies) - * of a list of signals and not going beyond tempvar signals - * - * @param L list of signals - * @return digraph - */ -digraph ondemandGraph(const tvec& signals) -{ - SigDependenciesGraph g(false, true); - for (Tree s : signals) { - g.self(s); - } - return g.getGraph(); -} - /** * @brief Compute the immediate Graph (containing only immediate dependencies) * of a list of signals and not going beyond tempvar signals @@ -364,6 +348,6 @@ std::vector compilationOrder(Tree L) */ std::vector ondemandCompilationOrder(const tvec& signals) { - digraph G = ondemandGraph(signals); + digraph G = ondemandGraph(signals); return serialize(G); } diff --git a/compiler/transform/sigDependenciesGraph.hh b/compiler/transform/sigDependenciesGraph.hh index 3525e02993..4414775dba 100644 --- a/compiler/transform/sigDependenciesGraph.hh +++ b/compiler/transform/sigDependenciesGraph.hh @@ -18,7 +18,7 @@ digraph immediateGraph(Tree L); * @param L list of signals * @return digraph */ -digraph ondemandGraph(const tvec& V); +digraph ondemandGraph(const tvec& V); /** * @brief Compute the full Graph of a list of signals including immediate and time dependencies