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

Method submit_queue_wait_for

src/runtime/omp/omp_queue.cpp:595–609  ·  view source on GitHub ↗

Causes the queue to wait until an event on another queue has occured. the other queue must be from the same backend

Source from the content-addressed store, hash-verified

593/// Causes the queue to wait until an event on another queue has occured.
594/// the other queue must be from the same backend
595result omp_queue::submit_queue_wait_for(const dag_node_ptr& node) {
596 HIPSYCL_DEBUG_INFO << "omp_queue: Submitting wait for other queue..."
597 << std::endl;
598 auto evt = node->get_event();
599 if (!evt) {
600 return register_error(
601 __acpp_here(),
602 error_info{"omp_queue: event for synchronization is null.",
603 error_type::invalid_parameter_error});
604 }
605
606 _worker([=]() { evt->wait(); });
607
608 return make_success();
609}
610
611result omp_queue::wait() {
612 _worker.wait();

Callers

nothing calls this directly

Calls 4

register_errorFunction · 0.85
make_successFunction · 0.85
get_eventMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected