Lines Matching refs:task
477 static kmp_int32 __kmp_push_task(kmp_int32 gtid, kmp_task_t *task) { argument
479 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
487 __kmpc_give_task(task, __kmp_tid_from_gtid(shadow_gtid));
528 if (taskdata->td_flags.priority_specified && task->data2.priority > 0 &&
530 int pri = KMP_MIN(task->data2.priority, __kmp_max_task_priority);
670 static void __kmp_task_start(kmp_int32 gtid, kmp_task_t *task, argument
672 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
721 static inline void __ompt_task_init(kmp_taskdata_t *task, int tid) { argument
723 task->ompt_task_info.task_data.value = 0;
724 task->ompt_task_info.frame.exit_frame = ompt_data_none;
725 task->ompt_task_info.frame.enter_frame = ompt_data_none;
726 task->ompt_task_info.frame.exit_frame_flags =
728 task->ompt_task_info.frame.enter_frame_flags =
730 task->ompt_task_info.dispatch_chunk.start = 0;
731 task->ompt_task_info.dispatch_chunk.iterations = 0;
736 static inline void __ompt_task_start(kmp_task_t *task, argument
739 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
756 static inline void __ompt_task_finish(kmp_task_t *task, argument
760 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
776 kmp_task_t *task, argument
779 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
798 __kmp_task_start(gtid, task, current_task);
817 __ompt_task_start(task, current_task, gtid);
828 kmp_task_t *task, argument
831 __kmpc_omp_task_begin_if0_template<true>(loc_ref, gtid, task, frame_address,
851 kmp_task_t *task) { argument
855 __kmpc_omp_task_begin_if0_ompt(loc_ref, gtid, task,
861 __kmpc_omp_task_begin_if0_template<false>(loc_ref, gtid, task, NULL, NULL);
867 void __kmpc_omp_task_begin(ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *task) { argument
873 gtid, loc_ref, KMP_TASK_TO_TASKDATA(task), current_task));
875 __kmp_task_start(gtid, task, current_task);
878 loc_ref, KMP_TASK_TO_TASKDATA(task)));
901 kmp_task_t *task = KMP_TASKDATA_TO_TASK(taskdata); local
903 task->data1.destructors = NULL;
904 task->data2.priority = 0;
1038 static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task, argument
1040 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
1115 kmp_routine_entry_t destr_thunk = task->data1.destructors;
1117 destr_thunk(gtid, task);
1141 __ompt_task_finish(task, resumed_task, ompt_task_detach);
1159 __kmpc_give_task(task, __kmp_tid_from_gtid(gtid));
1174 __ompt_task_finish(task, resumed_task, ompt_task_complete);
1252 kmp_task_t *task) { argument
1254 gtid, loc_ref, KMP_TASK_TO_TASKDATA(task)));
1257 __kmp_task_finish<ompt>(gtid, task, NULL);
1260 gtid, loc_ref, KMP_TASK_TO_TASKDATA(task)));
1278 kmp_task_t *task) { argument
1279 __kmpc_omp_task_complete_if0_template<true>(loc_ref, gtid, task);
1289 kmp_task_t *task) { argument
1292 __kmpc_omp_task_complete_if0_ompt(loc_ref, gtid, task);
1296 __kmpc_omp_task_complete_if0_template<false>(loc_ref, gtid, task);
1303 kmp_task_t *task) { argument
1305 loc_ref, KMP_TASK_TO_TASKDATA(task)));
1307 __kmp_task_finish<false>(gtid, task,
1311 loc_ref, KMP_TASK_TO_TASKDATA(task)));
1329 kmp_taskdata_t *task = &team->t.t_implicit_task_taskdata[tid]; local
1334 tid, team, task, set_curr_task ? "TRUE" : "FALSE"));
1336 task->td_task_id = KMP_GEN_TASK_ID();
1337 task->td_team = team;
1340 task->td_ident = loc_ref;
1341 task->td_taskwait_ident = NULL;
1342 task->td_taskwait_counter = 0;
1343 task->td_taskwait_thread = 0;
1345 task->td_flags.tiedness = TASK_TIED;
1346 task->td_flags.tasktype = TASK_IMPLICIT;
1347 task->td_flags.proxy = TASK_FULL;
1350 task->td_flags.task_serial = 1;
1351 task->td_flags.tasking_ser = (__kmp_tasking_mode == tskm_immediate_exec);
1352 task->td_flags.team_serial = (team->t.t_serialized) ? 1 : 0;
1354 task->td_flags.started = 1;
1355 task->td_flags.executing = 1;
1356 task->td_flags.complete = 0;
1357 task->td_flags.freed = 0;
1359 task->td_flags.onced = 0;
1362 task->td_depnode = NULL;
1363 task->td_last_tied = task;
1364 task->td_allow_completion_event.type = KMP_EVENT_UNINITIALIZED;
1367 KMP_ATOMIC_ST_REL(&task->td_incomplete_child_tasks, 0);
1369 KMP_ATOMIC_ST_REL(&task->td_allocated_child_tasks, 0);
1370 task->td_taskgroup = NULL; // An implicit task does not have taskgroup
1371 task->td_dephash = NULL;
1374 KMP_DEBUG_ASSERT(task->td_incomplete_child_tasks == 0);
1375 KMP_DEBUG_ASSERT(task->td_allocated_child_tasks == 0);
1380 __ompt_task_init(task, tid);
1384 team, task));
1393 kmp_taskdata_t *task = thread->th.th_current_task; local
1394 if (task->td_dephash) {
1396 task->td_flags.complete = 1;
1398 task->td_flags.onced = 1;
1400 children = KMP_ATOMIC_LD_ACQ(&task->td_incomplete_child_tasks);
1401 kmp_tasking_flags_t flags_old = task->td_flags;
1405 if (KMP_COMPARE_AND_STORE_ACQ32(RCAST(kmp_int32 *, &task->td_flags),
1410 thread->th.th_info.ds.ds_gtid, task));
1411 __kmp_dephash_free_entries(thread, task->td_dephash);
1422 kmp_taskdata_t *task = thread->th.th_current_task; local
1423 if (task && task->td_dephash) {
1424 __kmp_dephash_free(thread, task->td_dephash);
1425 task->td_dephash = NULL;
1457 kmp_task_t *task; local
1562 task = KMP_TASKDATA_TO_TASK(taskdata);
1567 KMP_DEBUG_ASSERT((((kmp_uintptr_t)task) & (sizeof(double) - 1)) == 0);
1570 KMP_DEBUG_ASSERT((((kmp_uintptr_t)task) & (sizeof(_Quad) - 1)) == 0);
1574 task->shareds = &((char *)taskdata)[shareds_offset];
1576 KMP_DEBUG_ASSERT((((kmp_uintptr_t)task->shareds) & (sizeof(void *) - 1)) ==
1579 task->shareds = NULL;
1581 task->routine = task_entry;
1582 task->part_id = 0; // AC: Always start with 0 part id
1679 return task;
1752 __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task, argument
1754 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
1760 KMP_DEBUG_ASSERT(task);
1770 __kmp_bottom_half_finish_proxy(gtid, task);
1797 __kmp_task_start(gtid, task, current_task); // OMPT only if not discarded
1861 __ompt_task_start(task, current_task, gtid);
1906 if (task->routine != NULL) {
1909 ((void (*)(void *))(*(task->routine)))(task->shareds);
1913 (*(task->routine))(gtid, task);
1941 __kmp_task_finish<true>(gtid, task, current_task);
1944 __kmp_task_finish<false>(gtid, task, current_task);
2047 new_record[i].task = nullptr;
2061 if (tdg->record_map[new_taskdata->td_task_id].task == nullptr) {
2062 tdg->record_map[new_taskdata->td_task_id].task = new_task;
3052 kmp_task_t *task = NULL; local
3145 task = KMP_TASKDATA_TO_TASK(taskdata);
3146 return task;
3153 kmp_task_t *task; local
3215 task = KMP_TASKDATA_TO_TASK(taskdata);
3216 return task;
3227 kmp_task_t *task; local
3346 task = KMP_TASKDATA_TO_TASK(taskdata);
3347 return task;
3366 kmp_task_t *task; local
3397 task = NULL;
3399 task = __kmp_get_priority_task(gtid, task_team, is_constrained);
3401 if (task == NULL && use_own_tasks) { // check own queue next
3402 task = __kmp_remove_my_task(thread, gtid, task_team, is_constrained);
3404 if ((task == NULL) && (nthreads > 1)) { // Steal a task finally
3455 task = __kmp_steal_task(other_thread, gtid, task_team,
3459 if (task != NULL) { // set last stolen to victim
3473 if (task == NULL)
3486 __kmp_invoke_task(gtid, task, current_task);
4353 static bool __kmp_give_task(kmp_info_t *thread, kmp_int32 tid, kmp_task_t *task, argument
4355 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
4596 kmp_task_t *task) { argument
4597 kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task);
4600 td->td_allow_completion_event.ed.task = task;
4608 kmp_task_t *ptask = event->ed.task;
4666 kmp_task_t *task; local
4690 task = KMP_TASKDATA_TO_TASK(taskdata);
4702 if (task->shareds != NULL) { // need setup shareds pointer
4704 task->shareds = &((char *)taskdata)[shareds_offset];
4705 KMP_DEBUG_ASSERT((((kmp_uintptr_t)task->shareds) & (sizeof(void *) - 1)) ==
4736 return task;
4751 kmp_task_t *task; member in kmp_taskloop_bounds_t
4758 : task(_task), taskdata(KMP_TASK_TO_TASKDATA(task)),
4759 lower_offset((char *)lb - (char *)task),
4760 upper_offset((char *)ub - (char *)task) {
4765 : task(_task), taskdata(KMP_TASK_TO_TASKDATA(_task)),
4774 retval = *(kmp_int64 *)((char *)task + lower_offset);
4778 kmp_int32 *lb = RCAST(kmp_int32 *, task->shareds);
4781 kmp_int64 *lb = RCAST(kmp_int64 *, task->shareds);
4787 retval = *(kmp_int64 *)((char *)task + lower_offset);
4796 retval = *(kmp_int64 *)((char *)task + upper_offset);
4800 kmp_int32 *ub = RCAST(kmp_int32 *, task->shareds) + 1;
4803 kmp_int64 *ub = RCAST(kmp_int64 *, task->shareds) + 1;
4808 retval = *(kmp_int64 *)((char *)task + upper_offset);
4816 *(kmp_uint64 *)((char *)task + lower_offset) = lb;
4820 kmp_uint32 *lower = RCAST(kmp_uint32 *, task->shareds);
4823 kmp_uint64 *lower = RCAST(kmp_uint64 *, task->shareds);
4828 *(kmp_uint64 *)((char *)task + lower_offset) = lb;
4835 *(kmp_uint64 *)((char *)task + upper_offset) = ub;
4839 kmp_uint32 *upper = RCAST(kmp_uint32 *, task->shareds) + 1;
4842 kmp_uint64 *upper = RCAST(kmp_uint64 *, task->shareds) + 1;
4847 *(kmp_uint64 *)((char *)task + upper_offset) = ub;
4868 void __kmp_taskloop_linear(ident_t *loc, int gtid, kmp_task_t *task, argument
4881 kmp_taskloop_bounds_t task_bounds(task, lb, ub);
4930 next_task = __kmp_task_dup_alloc(thread, task, /* taskloop_recur */ 0);
4932 next_task = __kmp_task_dup_alloc(thread, task); // allocate new task
4948 ptask_dup(next_task, task, lastpriv);
4970 __kmp_task_start(gtid, task, current_task); // make internal bookkeeping
4972 __kmp_task_finish<false>(gtid, task, current_task);
4978 kmp_task_t *task; member
5008 kmp_task_t *task = p->task; local
5025 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
5026 KMP_DEBUG_ASSERT(task != NULL);
5035 __kmp_taskloop_recur(NULL, gtid, task, lb, ub, st, ub_glob, num_tasks,
5042 __kmp_taskloop_linear(NULL, gtid, task, lb, ub, st, ub_glob, num_tasks,
5071 void __kmp_taskloop_recur(ident_t *loc, int gtid, kmp_task_t *task, argument
5081 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
5082 KMP_DEBUG_ASSERT(task != NULL);
5095 (char *)lb - (char *)task; // remember offset of lb in the task structure
5097 (char *)ub - (char *)task; // remember offset of ub in the task structure
5132 next_task = __kmp_task_dup_alloc(thread, task,
5135 next_task = __kmp_task_dup_alloc(thread, task); // duplicate the task
5140 ptask_dup(next_task, task, 0);
5153 p->task = next_task;
5184 __kmp_taskloop_recur(loc, gtid, task, lb, ub, st, ub_glob, n_tsk0, gr_size0,
5191 __kmp_taskloop_linear(loc, gtid, task, lb, ub, st, ub_glob, n_tsk0,
5201 static void __kmp_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int if_val, argument
5205 kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task);
5206 KMP_DEBUG_ASSERT(task != NULL);
5219 kmp_taskloop_bounds_t task_bounds(task, lb, ub);
5248 __kmp_task_start(gtid, task, current_task);
5250 __kmp_task_finish<false>(gtid, task, current_task);
5320 __kmp_taskloop_linear(loc, gtid, task, lb, ub, st, ub_glob, num_tasks,
5333 __kmp_taskloop_recur(loc, gtid, task, lb, ub, st, ub_glob, num_tasks,
5344 __kmp_taskloop_linear(loc, gtid, task, lb, ub, st, ub_glob, num_tasks,
5385 void __kmpc_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int if_val, argument
5390 __kmp_taskloop(loc, gtid, task, if_val, lb, ub, st, nogroup, sched, grainsize,
5412 void __kmpc_taskloop_5(ident_t *loc, int gtid, kmp_task_t *task, int if_val, argument
5418 __kmp_taskloop(loc, gtid, task, if_val, lb, ub, st, nogroup, sched, grainsize,
5540 kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(this_record_map[j].task);
5565 __kmp_omp_task(gtid, this_record_map[this_root_tasks[j]].task, true);
5598 this_record_map[i].task = nullptr;