MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / sync

Method sync

dnn/test/common/task_executor.cpp:192–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void 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
210CpuDispatchChecker::TaskExecutor::~TaskExecutor() {
211#if MEGDNN_ENABLE_MULTI_THREADS

Callers 6

fill_zeroMethod · 0.45
copy_from_continueMethod · 0.45
copy_from_fixlayoutMethod · 0.45
make_callback_copyMethod · 0.45
DEF_IMPLFunction · 0.45
TESTFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected