| 190 | } |
| 191 | |
| 192 | void CpuDispatchChecker::TaskExecutor::sync() { |
| 193 | #if MEGDNN_ENABLE_MULTI_THREADS |
| 194 | bool no_finished = false; |
| 195 | do { |
| 196 | no_finished = false; |
| 197 | for (uint32_t i = 0; i < m_nr_threads - 1; ++i) { |
| 198 | if (*m_workers_flag[i]) { |
| 199 | no_finished = true; |
| 200 | break; |
| 201 | } |
| 202 | } |
| 203 | if (no_finished) { |
| 204 | std::this_thread::yield(); |
| 205 | } |
| 206 | } while (no_finished); |
| 207 | #endif |
| 208 | } |
| 209 | |
| 210 | CpuDispatchChecker::TaskExecutor::~TaskExecutor() { |
| 211 | #if MEGDNN_ENABLE_MULTI_THREADS |
no outgoing calls
no test coverage detected