From 15902d31f5a723db28664c986fbfc352bdb3a5ab Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 17 Aug 2015 20:50:06 +0200 Subject: Use references in FIG deadline reduction loop --- src/fig/FIGCarousel.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp index 106e78e..2d09ade 100644 --- a/src/fig/FIGCarousel.cpp +++ b/src/fig/FIGCarousel.cpp @@ -141,9 +141,13 @@ size_t FIGCarousel::write_fibs( { /* Decrement all deadlines of all figs */ for (auto& fib_fig : m_fibs) { - auto fig = fib_fig.second; - for (auto fig_el : fig) { + auto& fig = fib_fig.second; + for (auto& fig_el : fig) { fig_el.reduce_deadline(); +#if CAROUSELDEBUG + std::cerr << " * " << fig_el.fig->name() << + " d:" << fig_el.deadline << std::endl; +#endif } } @@ -213,15 +217,6 @@ size_t FIGCarousel::carousel( return left->deadline < right->deadline; }); -#if CAROUSELDEBUG - // Carousel debugging help - std::cerr << " ***** Sorted figs in FIB" << fib << ":" << std::endl; - for (auto& fig_el : sorted_figs) { - std::cerr << " " << fig_el->fig->name() << - " d:" << fig_el->deadline << std::endl; - } -#endif - /* Data structure to carry FIB */ size_t available_size = bufsize; -- cgit v1.2.3