38 #ifndef __GECODE_SEARCH_PAR_PBS_HH__ 39 #define __GECODE_SEARCH_PAR_PBS_HH__ 43 namespace Gecode {
namespace Search {
namespace Par {
51 volatile bool* tostop;
56 void share(
volatile bool* ts);
62 bool stop(
void)
const;
66 template<
class Collect>
70 template<
class Collect>
85 bool stopped(
void)
const;
87 void constrain(
const Space&
b);
89 virtual void run(
void);
101 static const bool best =
false;
107 bool constrain(
const Space&
b);
109 bool empty(
void)
const;
125 static const bool best =
true;
131 bool constrain(
const Space& b);
133 bool empty(
void)
const;
141 template<
class Collect>
179 virtual Space* next(
void);
183 virtual bool stopped(
void)
const;
185 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)
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.
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
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.