34 #ifndef __GECODE_SEARCH_PAR_PBS_HH__ 35 #define __GECODE_SEARCH_PAR_PBS_HH__ 39 namespace Gecode {
namespace Search {
namespace Par {
47 volatile bool* tostop;
52 void share(
volatile bool* ts);
58 bool stop(
void)
const;
62 template<
class Collect>
66 template<
class Collect>
81 bool stopped(
void)
const;
83 void constrain(
const Space&
b);
85 virtual void run(
void);
97 static const bool best =
false;
103 bool constrain(
const Space&
b);
105 bool empty(
void)
const;
121 static const bool best =
true;
127 bool constrain(
const Space& b);
129 bool empty(
void)
const;
137 template<
class Collect>
175 virtual Space* next(
void);
179 virtual bool stopped(
void)
const;
181 virtual void constrain(
const Space&
b);
Statistics stat
Master statistics.
volatile bool tostop
Shared stop flag.
Space * b
Currently best solution.
#define GECODE_SEARCH_EXPORT
Slave< Collect > ** slaves
Slave engines.
Engine * slave
The slave engine.
unsigned int n_slaves
Number of slave engines.
unsigned int n_busy
Number of busy slaves.
An interface for objects that can be run by a thread.
void stop(Support::Timer &timer, std::ostream &os)
Get time since start of timer and print user friendly time information.
Parallel depth-first search engine
A mutex for mutual exclausion among several threads.
Support::Event idle
Signal that number of busy slaves becomes zero.
int n
Number of negative literals for node type.
An event for synchronization.
Support::Mutex m
Mutex for synchronization.
Slave< CollectBest > * reporter
Who has reported the best solution (NULL if solution has already been reported)
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
Support::DynamicQueue< Space *, Heap > solutions
Queue of solutions.
Collect solutions
Collect solutions in this.
Post propagator for SetVar SetOpType SetVar SetRelType r
Queue with arbitrary number of elements.
Stop object used for controling slaves in a portfolio.
bool slave_stop
Whether a slave has been stopped.
Parallel portfolio engine implementation.
Runnable slave of a portfolio master.
Gecode toplevel namespace
unsigned int n_active
Number of active slave engines.
Base-class for Stop-object.
PBS< Collect > * master
The master engine.