| 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 |
no test coverage detected