35 #include <boost/asio.hpp> 36 #ifndef BOOST_SIGNALS2_MAX_ARGS // this is also defined in tendril.hpp (TODO: consolidate) 37 #define BOOST_SIGNALS2_MAX_ARGS 3 39 #include <boost/signals2/signal.hpp> 40 #include <boost/thread/mutex.hpp> 82 bool execute(
unsigned num_iters = 0);
108 bool run(
unsigned timeout_usec);
139 void execute_iter(
unsigned cur_iter,
unsigned num_iters,
140 std::size_t stack_idx);
153 std::vector<ecto::graph::graph_t::vertex_descriptor>
stack_;
170 template<
typename Mutex_T = boost::mutex,
typename Count_T = std::
size_t>
175 typename Mutex_T::scoped_lock l(m_);
179 typename Mutex_T::scoped_lock l(m_);
189 boost::mutex::scoped_lock l(
mtx_);
195 boost::mutex::scoped_lock l(
mtx_);
196 return static_cast<int>(
state_) > 0;
201 boost::mutex::scoped_lock l(
mtx_);
207 boost::mutex::scoped_lock l(
mtx_);
Definition: scheduler.hpp:64
ecto::graph::graph_t & graph_
Definition: scheduler.hpp:151
bool execute(unsigned num_iters=0)
boost::mutex mtx_
Definition: scheduler.hpp:159
Definition: parameters.hpp:11
Definition: scheduler.hpp:70
Count_T & t_
Definition: scheduler.hpp:184
ref_count(Mutex_T &m, Count_T &t)
Definition: scheduler.hpp:173
Mutex_T & m_
Definition: scheduler.hpp:183
bool interrupted
Definition: scheduler.hpp:167
Definition: scheduler.hpp:67
boost::signals2::connection interrupt_connection
Definition: scheduler.hpp:166
profile::graph_stats_type graphstats_
Definition: scheduler.hpp:155
State
Definition: scheduler.hpp:54
Definition: scheduler.hpp:171
Definition: scheduler.hpp:62
std::string stats() const
Definition: scheduler.hpp:131
std::vector< ecto::graph::graph_t::vertex_descriptor > stack_
Definition: scheduler.hpp:153
std::size_t runners_
Current number of "runners" (threads calling a run method).
Definition: scheduler.hpp:163
std::string as_string(graph::graph_t &g) const
State state_
Current state of the scheduler.
Definition: scheduler.hpp:161
boost::asio::io_service io_svc_
Definition: scheduler.hpp:157
Definition: profile.hpp:44
Definition: scheduler.hpp:56
bool running() const
Definition: scheduler.hpp:193
void execute_init(unsigned num_iteRelWithDebInfors)
Definition: scheduler.hpp:50
plasm_ptr plasm_
Definition: scheduler.hpp:150
State state() const
Definition: scheduler.hpp:187
void execute_iter(unsigned cur_iter, unsigned num_iters, std::size_t stack_idx)
bool prepare_jobs(unsigned num_iters=0)
bool executing() const
Definition: scheduler.hpp:199
Definition: scheduler.hpp:59
~ref_count()
Definition: scheduler.hpp:178
boost::shared_ptr< plasm > plasm_ptr
Definition: forward.hpp:46