Go to the documentation of this file.
38 namespace Gecode {
namespace Search {
namespace Meta {
namespace Parallel {
69 :
b(NULL), reporter(NULL) {}
118 : so(so0), tostop(NULL) {}
126 template<
class Collect>
129 : Support::Runnable(false), master(m), slave(s),
stop(so) {}
130 template<
class Collect>
135 template<
class Collect>
140 template<
class Collect>
145 template<
class Collect>
153 template<
class Collect>
157 : stat(stat0), slaves(
heap.alloc<
Slave<Collect>*>(
n)), n_slaves(
n),
158 slave_stop(false), tostop(false), n_busy(0) {
160 for (
unsigned int i=n_slaves;
i--; ) {
166 template<
class Collect>
185 while (slaves[
i] != slave)
187 assert(
i < n_slaves);
188 slaves[
i] = slaves[--n_slaves];
198 template<
class Collect>
204 }
while (!master->report(
this,s));
207 template<
class Collect>
223 for (
unsigned int i=n_slaves;
i--; )
224 Support::Thread::run(slaves[
i]);
244 for (
unsigned int i=n_slaves;
i--; )
246 slaves[
i]->constrain(*s);
253 template<
class Collect>
259 template<
class Collect>
263 for (
unsigned int i=n_slaves;
i--; )
264 s += slaves[
i]->statistics();
268 template<
class Collect>
272 throw NoBest(
"PBS::constrain");
275 for (
unsigned int i=n_slaves;
i--; )
276 slaves[
i]->constrain(
b);
280 template<
class Collect>
282 for (
unsigned int i=n_slaves;
i--; )
Space * clone(bool share_data=true, bool share_info=true, CloneStatistics &stat=unused_clone) const
Clone space.
virtual void constrain(const Space &best)
Constrain function for best solution search.
Base-class for Stop-object.
int solutions(TestSpace *c, Gecode::Search::Options &o, int maxNbSol=-1)
Find number of solutions.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Exception: Best solution search is not supported
Gecode toplevel namespace
void stop(Support::Timer &timer, std::ostream &os)
Get time since start of timer and print user friendly time information.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
Search engine implementation interface
Post propagator for SetVar SetOpType SetVar SetRelType r
SpaceStatus status(StatusStatistics &stat=unused_status)
Query space status.
Heap heap
The single global heap.
void todelete(bool d)
Set whether to delete upon termination.
int n
Number of negative literals for node type.
void rfree(void *p)
Free memory block starting at p.
@ SS_FAILED
Space is failed