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

Method find

gecode/search/par/dfs.hpp:121–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 */
120 template<class Tracer>
121 forceinline void
122 DFS<Tracer>::Worker::find(void) {
123 // Try to find new work (even if there is none)
124 for (unsigned int i=0U; i<engine().workers(); i++) {
125 unsigned long int r_d = 0ul;
126 typename Engine<Tracer>::Worker* wi = engine().worker(i);
127 if (Space* s = wi->steal(r_d,wi->tracer,tracer)) {
128 // Reset this guy
129 m.acquire();
130 idle = false;
131 // Not idle but also does not have the root of the tree
132 path.ngdl(0);
133 d = 0;
134 cur = s;
135 Statistics t = *this;
136 Search::Worker::reset(r_d);
137 (*this) += t;
138 m.release();
139 return;
140 }
141 }
142 }
143
144 /*
145 * Statistics

Callers 10

arg2tuplesetMethod · 0.45
arg2intsharedarrayMethod · 0.45
arg2boolsharedarrayMethod · 0.45
getSharedDFAMethod · 0.45
printElemMethod · 0.45
shrinkElementMethod · 0.45
postMethod · 0.45
putMethod · 0.45
getMethod · 0.45
createSetSymFunction · 0.45

Calls 6

workersMethod · 0.45
workerMethod · 0.45
stealMethod · 0.45
acquireMethod · 0.45
ngdlMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected