MCPcopy Create free account
hub / github.com/Gecode/gecode / babengine

Function babengine

gecode/search/bab.cpp:44–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42namespace Gecode { namespace Search {
43
44 Engine*
45 babengine(Space* s, const Options& o) {
46 Options to = o.expand();
47#ifdef GECODE_HAS_THREADS
48 if (to.threads == 1.0) {
49 if (to.tracer)
50 return new WorkerToEngine<Seq::BAB<TraceRecorder>>(s,to);
51 else
52 return new WorkerToEngine<Seq::BAB<NoTraceRecorder>>(s,to);
53 } else {
54 if (to.tracer)
55 return new Par::BAB<EdgeTraceRecorder>(s,to);
56 else
57 return new Par::BAB<NoTraceRecorder>(s,to);
58 }
59#else
60 if (to.tracer)
61 return new WorkerToEngine<Seq::BAB<TraceRecorder>>(s,to);
62 else
63 return new WorkerToEngine<Seq::BAB<NoTraceRecorder>>(s,to);
64#endif
65 }
66
67}}
68

Callers 1

BABMethod · 0.85

Calls 1

expandMethod · 0.45

Tested by

no test coverage detected