34#ifndef __GECODE_SEARCH_PAR_DFS_HH__
35#define __GECODE_SEARCH_PAR_DFS_HH__
39namespace Gecode {
namespace Search {
namespace Par {
42 template<
class Tracer>
84 virtual void run(
void);
No-goods recorded from restarts.
Parallel depth-first search worker
void find(void)
Try to find some work.
DFS & engine(void) const
Provide access to engine.
virtual void run(void)
Start execution of worker.
Parallel depth-first search engine
virtual Statistics statistics(void) const
Return statistics.
void solution(Space *s)
Report solution s.
virtual void reset(Space *s)
Reset engine to restart at space s.
DFS(Space *s, const Options &o)
Initialize for space s with options o.
Worker * worker(unsigned int i) const
Provide access to worker i.
Worker ** _worker
Array of worker references.
virtual NoGoods & nogoods(void)
Return no-goods.
virtual ~DFS(void)
Destructor.
Parallel depth-first search engine
void idle(void)
Report that worker is idle.
const Options & opt(void) const
Provide access to search options.
Support::Event e_reset_ack_stop
Event for reset acknowledgment stopped.
Support::Event e_search
Event for search (solution found, no more solutions, search stopped)
Support::DynamicQueue< Space *, Heap > solutions
Queue of solutions.
void stop(void)
Report that worker has been stopped.
void block(void)
Block all workers.
Support::Mutex m_wait_reset
Mutex for waiting for reset.
Support::Mutex m_search
Mutex for search.
Support::Event e_reset_ack_start
Event for reset acknowledgment started.
void busy(void)
Report that worker is busy.
void release(Cmd c)
Release all workers.
bool signal(void) const
Whether search state changed such that signal is needed.
void terminate(void)
For engine to peform thread termination.
volatile unsigned int n_busy
Number of busy workers.
unsigned int workers(void) const
Return number of workers.
@ C_RESET
Perform reset operation.
@ C_WAIT
Run into wait lock.
void stop(Support::Timer &timer, std::ostream &os)
Get time since start of timer and print user friendly time information.
Gecode toplevel namespace
void path(Home home, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl=IPL_DEF)
Post propagator such that x forms a Hamiltonian path.
Gecode::IntArgs i({1, 2, 3, 4})