MCPcopy Create free account
hub / github.com/AdaptiveCpp/AdaptiveCpp / wait

Method wait

src/runtime/dag_node.cpp:228–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void dag_node::wait() const
229{
230 while (!_is_submitted);
231 if(_is_complete)
232 return;
233
234 _event->wait();
235 // All requirements are now also complete
236 descend_requirement_tree([](const dag_node* current) -> bool{
237 // Descend to all nodes that are not yet marked as complete,
238 // so abort on nodes that are complete
239 if(current->_is_complete)
240 return false;
241 // Otherwise mark as complete and return
242 current->_is_complete = true;
243 return true;
244 }, this);
245
246 _is_complete = true;
247}
248
249std::shared_ptr<dag_node_event>
250dag_node::get_event() const{

Callers 15

wait_for_allMethod · 0.45
wait_for_groupMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
test_interopFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
testFunction · 0.45
test_scalar_reductionFunction · 0.45
test_two_reductionsFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 1

descend_requirement_treeFunction · 0.85

Tested by 4

test_interopFunction · 0.36
test_scalar_reductionFunction · 0.36
test_two_reductionsFunction · 0.36
mainFunction · 0.36