Parallel depth-first search engine
More...
#include <engine.hh>
Parallel depth-first search engine
Definition at line 49 of file engine.hh.
◆ Cmd
Commands from engine to workers.
Enumerator |
---|
C_WORK | Perform work.
|
C_WAIT | Run into wait lock.
|
C_RESET | Perform reset operation.
|
C_TERMINATE | Terminate.
|
Definition at line 91 of file engine.hh.
◆ Engine()
Gecode::Search::Parallel::Engine::Engine |
( |
const Options & |
o | ) |
|
|
inline |
Initialize with options o.
Definition at line 260 of file engine.hh.
◆ opt()
const Options & Gecode::Search::Parallel::Engine::opt |
( |
void |
| ) |
const |
|
inline |
Provide access to search options.
Definition at line 205 of file engine.hh.
◆ workers()
unsigned int Gecode::Search::Parallel::Engine::workers |
( |
void |
| ) |
const |
|
inline |
Return number of workers.
Definition at line 209 of file engine.hh.
◆ cmd()
Engine::Cmd Gecode::Search::Parallel::Engine::cmd |
( |
void |
| ) |
const |
|
inline |
Return current command.
Definition at line 218 of file engine.hh.
◆ block()
void Gecode::Search::Parallel::Engine::block |
( |
void |
| ) |
|
|
inline |
Block all workers.
Definition at line 222 of file engine.hh.
◆ release()
void Gecode::Search::Parallel::Engine::release |
( |
Cmd |
c | ) |
|
|
inline |
Release all workers.
Definition at line 227 of file engine.hh.
◆ wait()
void Gecode::Search::Parallel::Engine::wait |
( |
void |
| ) |
|
|
inline |
Ensure that worker waits.
Definition at line 232 of file engine.hh.
◆ ack_terminate()
void Gecode::Search::Parallel::Engine::ack_terminate |
( |
void |
| ) |
|
|
inline |
For worker to acknowledge termination command.
Definition at line 335 of file engine.hh.
◆ terminated()
void Gecode::Search::Parallel::Engine::terminated |
( |
void |
| ) |
|
|
inline |
For worker to register termination.
Definition at line 323 of file engine.hh.
◆ wait_terminate()
void Gecode::Search::Parallel::Engine::wait_terminate |
( |
void |
| ) |
|
|
inline |
For worker to wait until termination is legal.
Definition at line 343 of file engine.hh.
◆ terminate()
void Gecode::Search::Parallel::Engine::terminate |
( |
void |
| ) |
|
|
inline |
For engine to peform thread termination.
Definition at line 349 of file engine.hh.
◆ ack_reset_start()
void Gecode::Search::Parallel::Engine::ack_reset_start |
( |
void |
| ) |
|
|
inline |
For worker to acknowledge start of reset cycle.
Definition at line 369 of file engine.hh.
◆ ack_reset_stop()
void Gecode::Search::Parallel::Engine::ack_reset_stop |
( |
void |
| ) |
|
|
inline |
For worker to acknowledge stop of reset cycle.
Definition at line 377 of file engine.hh.
◆ wait_reset()
void Gecode::Search::Parallel::Engine::wait_reset |
( |
void |
| ) |
|
|
inline |
For worker to wait for all workers to reset.
Definition at line 385 of file engine.hh.
◆ signal()
bool Gecode::Search::Parallel::Engine::signal |
( |
void |
| ) |
const |
|
inlineprotected |
Whether search state changed such that signal is needed.
Definition at line 289 of file engine.hh.
◆ idle()
void Gecode::Search::Parallel::Engine::idle |
( |
void |
| ) |
|
|
inline |
Report that worker is idle.
Definition at line 293 of file engine.hh.
◆ busy()
void Gecode::Search::Parallel::Engine::busy |
( |
void |
| ) |
|
|
inline |
Report that worker is busy.
Definition at line 302 of file engine.hh.
◆ stop()
void Gecode::Search::Parallel::Engine::stop |
( |
void |
| ) |
|
|
inline |
Report that worker has been stopped.
Definition at line 309 of file engine.hh.
◆ next()
Space * Gecode::Search::Parallel::Engine::next |
( |
void |
| ) |
|
|
virtual |
◆ stopped()
bool Gecode::Search::Parallel::Engine::stopped |
( |
void |
| ) |
const |
|
virtual |
◆ _opt
const Options Gecode::Search::Parallel::Engine::_opt |
|
protected |
◆ _cmd
volatile Cmd Gecode::Search::Parallel::Engine::_cmd |
|
protected |
The current command.
Definition at line 99 of file engine.hh.
◆ _m_wait
Mutex for forcing workers to wait.
Definition at line 101 of file engine.hh.
◆ _m_term
Mutex for access to termination information.
Definition at line 117 of file engine.hh.
◆ _n_term_not_ack
volatile unsigned int Gecode::Search::Parallel::Engine::_n_term_not_ack |
|
protected |
Number of workers that have not yet acknowledged termination.
Definition at line 119 of file engine.hh.
◆ _e_term_ack
Event for termination acknowledgment.
Definition at line 121 of file engine.hh.
◆ _m_wait_terminate
Mutex for waiting for termination.
Definition at line 123 of file engine.hh.
◆ _n_not_terminated
volatile unsigned int Gecode::Search::Parallel::Engine::_n_not_terminated |
|
protected |
Number of not yet terminated workers.
Definition at line 125 of file engine.hh.
◆ _e_terminate
Event for termination (all threads have terminated)
Definition at line 127 of file engine.hh.
◆ _m_reset
Mutex for access to reset information.
Definition at line 143 of file engine.hh.
◆ _n_reset_not_ack
volatile unsigned int Gecode::Search::Parallel::Engine::_n_reset_not_ack |
|
protected |
Number of workers that have not yet acknowledged reset.
Definition at line 145 of file engine.hh.
◆ e_reset_ack_start
Event for reset acknowledgment started.
Definition at line 147 of file engine.hh.
◆ e_reset_ack_stop
Event for reset acknowledgment stopped.
Definition at line 149 of file engine.hh.
◆ m_wait_reset
Mutex for waiting for reset.
Definition at line 151 of file engine.hh.
◆ m_search
◆ e_search
Event for search (solution found, no more solutions, search stopped)
Definition at line 167 of file engine.hh.
◆ solutions
Queue of solutions.
Definition at line 169 of file engine.hh.
◆ n_busy
volatile unsigned int Gecode::Search::Parallel::Engine::n_busy |
|
protected |
Number of busy workers.
Definition at line 171 of file engine.hh.
◆ has_stopped
volatile bool Gecode::Search::Parallel::Engine::has_stopped |
|
protected |
Whether a worker had been stopped.
Definition at line 173 of file engine.hh.
The documentation for this class was generated from the following files: