40 #ifdef GECODE_HAS_THREADS 44 namespace Gecode {
namespace Search {
namespace Parallel {
virtual ~Worker(void)
Destructor.
Path path
Current path ins search tree.
virtual Space * next(void)
Return next solution (NULL, if none exists or search has been stopped)
void acquire(void)
Acquire the mutex and possibly block.
void block(void)
Block all workers.
virtual bool stopped(void) const
Check whether engine has been stopped.
volatile unsigned int n_busy
Number of busy workers.
void release(void)
Release the mutex.
Space * cur
Current space being explored.
volatile bool has_stopped
Whether a worker had been stopped.
Support::Event e_search
Event for search (solution found, no more solutions, search stopped)
void release(Cmd c)
Release all workers.
Support::DynamicQueue< Space *, Heap > solutions
Queue of solutions.
Gecode toplevel namespace
#define GECODE_NEVER
Assert that this command is never executed.
void reset(int l)
Reset stack and set no-good depth limit to l.
void wait(void)
Wait until the event becomes signalled.
Support::Mutex m_search
Mutex for search.