Lines Matching defs:task
38 node->dn.task = NULL; // will point to the right task
49 __itt_sync_create(node, "OMP task dep node", NULL, 0);
182 if (!h->last_all) // no predecessor task with omp_all_memory dependence
222 kmp_taskdata_t *task_source = KMP_TASK_TO_TASKDATA(source->dn.task);
224 if (source->dn.task && sink_task) {
260 kmp_taskdata_t *task_source = KMP_TASK_TO_TASKDATA(source->dn.task);
261 // do not use sink->dn.task as that is only filled after the dependences
270 /* OMPT tracks dependences between task (a=source, b=sink) in which
271 task a blocks the execution of b through the ompt_new_dependence_callback
274 kmp_taskdata_t *task_source = KMP_TASK_TO_TASKDATA(source->dn.task);
287 kmp_base_depnode_t *__kmpc_task_get_depnode(kmp_task_t *task) {
288 kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task);
292 kmp_depnode_list_t *__kmpc_task_get_successors(kmp_task_t *task) {
293 kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task);
299 kmp_task_t *task, kmp_depnode_t *node,
309 if (task) {
310 kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task);
312 tdg_status = KMP_TASK_TO_TASKDATA(task)->tdg->tdg_status;
314 __kmp_track_dependence(gtid, dep, node, task);
317 if (dep->dn.task) {
319 if (dep->dn.task) {
322 if (!(__kmp_tdg_is_recording(tdg_status)) && task)
324 __kmp_track_dependence(gtid, dep, node, task);
328 gtid, KMP_TASK_TO_TASKDATA(dep->dn.task),
329 KMP_TASK_TO_TASKDATA(task)));
339 // Add the edge 'sink' -> 'source' in the task dependency graph
342 kmp_task_t *task,
350 kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task);
351 if (task) {
353 tdg_status = KMP_TASK_TO_TASKDATA(task)->tdg->tdg_status;
354 if (__kmp_tdg_is_recording(tdg_status) && sink->dn.task)
355 __kmp_track_dependence(gtid, sink, source, task);
358 if (sink->dn.task) {
361 if (sink->dn.task) {
364 if (!(__kmp_tdg_is_recording(tdg_status)) && task)
366 __kmp_track_dependence(gtid, sink, source, task);
370 gtid, KMP_TASK_TO_TASKDATA(sink->dn.task),
371 KMP_TASK_TO_TASKDATA(task)));
374 kmp_taskdata_t *tdd = KMP_TASK_TO_TASKDATA(sink->dn.task);
377 // decrement npredecessors if sink->dn.task belongs to a taskgraph
379 // 1) the task is reset to its initial state (by kmp_free_task) or
380 // 2) the task is complete but not yet reset
395 bool dep_barrier, kmp_task_t *task) {
404 __kmp_depnode_link_successor(gtid, thread, task, node, h->last_all);
411 // task so the previous output nodes can be cleared.
427 __kmp_depnode_link_successor(gtid, thread, task, node, last_set);
435 __kmp_depnode_link_successor(gtid, thread, task, node, last_out);
454 kmp_depend_info_t *dep_list, kmp_task_t *task) {
476 __kmp_depnode_link_successor(gtid, thread, task, node, last_set);
484 __kmp_depnode_link_successor(gtid, thread, task, node, last_out);
492 // task so the previous output nodes can be cleared.
500 __kmp_depnode_link_successor(gtid, thread, task, node, last_out);
503 __kmp_depnode_link_successor(gtid, thread, task, node, prev_set);
514 __kmp_depnode_link_successor(gtid, thread, task, node, last_set);
570 // returns true if the task has any outstanding dependence
572 kmp_task_t *task, kmp_dephash_t **hash,
579 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
581 KA_TRACE(20, ("__kmp_check_deps: T#%d checking dependences for task %p : %d "
606 if (n_mtxs < MAX_MTX_DEPS && task != NULL) {
625 // this task before we have finished processing all the dependences
634 ndeps, dep_list, task);
636 gtid, node, hash, dep_barrier, ndeps_noalias, noalias_dep_list, task);
638 npredecessors = __kmp_process_dep_all(gtid, node, *hash, dep_barrier, task);
641 node->dn.task = task;
653 KA_TRACE(20, ("__kmp_check_deps: T#%d found %d predecessors for task %p \n",
656 // beyond this point the task could be queued (and executed) by a releasing
657 // task...
663 @param loc_ref location of the original task directive
665 @param new_task task thunk allocated by __kmp_omp_task_alloc() for the ''new
666 task''
672 @return Returns either TASK_CURRENT_NOT_QUEUED if the current task was not
675 Schedule a non-thread-switchable task with dependences for execution
684 KA_TRACE(10, ("__kmpc_omp_task_with_deps(enter): T#%d loc=%p task=%p\n", gtid,
713 new_record[i].task = nullptr;
726 tdg->record_map[new_taskdata->td_task_id].task = new_task;
834 KA_TRACE(10, ("__kmpc_omp_task_with_deps(exit): T#%d task had blocking "
836 "loc=%p task=%p, return: TASK_CURRENT_NOT_QUEUED\n",
847 "for task (serialized) loc=%p task=%p\n",
851 KA_TRACE(10, ("__kmpc_omp_task_with_deps(exit): T#%d task had no blocking "
853 "loc=%p task=%p, transferring to __kmp_omp_task\n",
879 @param loc_ref location of the original task directive
886 Blocks the current task until all specifies dependences have been fulfilled.
920 // - creation of the taskwait task
921 // - dependences of the taskwait task
922 // - schedule and finish of the taskwait task