18#define KMP_ACQUIRE_DEPNODE(gtid, n) __kmp_acquire_lock(&(n)->dn.lock, (gtid))
19#define KMP_RELEASE_DEPNODE(gtid, n) __kmp_release_lock(&(n)->dn.lock, (gtid))
28#if USE_ITT_BUILD && USE_ITT_NOTIFY
29 __itt_sync_destroy(node);
33 __kmp_fast_free(thread, node);
44 for (; list; list = next) {
49 __kmp_fast_free(thread, list);
58 for (
size_t i = 0;
i <
h->size;
i++) {
66 if (entry->mtx_lock) {
71 __kmp_fast_free(thread, entry);
86 __kmp_fast_free(thread,
h);
97 if (
task->is_taskgraph && !(__kmp_tdg_is_recording(
task->tdg->tdg_status))) {
98 kmp_node_info_t *TaskInfo = &(
task->tdg->record_map[
task->td_task_id]);
100 for (
int i = 0;
i < TaskInfo->nsuccessors;
i++) {
101 kmp_int32 successorNumber = TaskInfo->successors[
i];
102 kmp_node_info_t *successor = &(
task->tdg->record_map[successorNumber]);
104 if (successor->task !=
nullptr && npredecessors == 0) {
125 if (
task->td_dephash) {
127 40, (
"__kmp_release_deps: T#%d freeing dependencies hash of task %p.\n",
130 task->td_dephash = NULL;
136 KA_TRACE(20, (
"__kmp_release_deps: T#%d notifying successors of task %p.\n",
141 if (!
task->is_taskgraph ||
142 (
task->is_taskgraph && !__kmp_tdg_is_recording(
task->tdg->tdg_status)))
152#if USE_ITT_BUILD && USE_ITT_NOTIFY
153 __itt_sync_releasing(successor);
159 if (npredecessors == 0) {
160#if USE_ITT_BUILD && USE_ITT_NOTIFY
161 __itt_sync_acquired(successor);
165 KA_TRACE(20, (
"__kmp_release_deps: T#%d successor %p of %p scheduled "
195 __kmp_fast_free(thread,
p);
205 (
"__kmp_release_deps: T#%d all successors of %p notified of completion\n",
void const char const char int ITT_FORMAT __itt_group_sync p
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function h
static int __kmp_tid_from_gtid(int gtid)
#define KMP_TASK_TO_TASKDATA(task)
kmp_info_t ** __kmp_threads
#define KMP_HIDDEN_HELPER_THREAD(gtid)
kmp_int32 __kmp_omp_task(kmp_int32 gtid, kmp_task_t *new_task, bool serialize_immediate)
union KMP_ALIGN_CACHE kmp_info kmp_info_t
#define __kmp_thread_free(th, ptr)
#define KMP_DEBUG_ASSERT(cond)
static void __kmp_destroy_lock(kmp_lock_t *lck)
static void __kmp_release_lock(kmp_lock_t *lck, kmp_int32 gtid)
#define KMP_ATOMIC_DEC(p)
static void __kmp_dephash_free(kmp_info_t *thread, kmp_dephash_t *h)
#define KMP_ACQUIRE_DEPNODE(gtid, n)
static void __kmp_depnode_list_free(kmp_info_t *thread, kmp_depnode_list *list)
void __kmpc_give_task(kmp_task_t *ptask, kmp_int32 start)
static void __kmp_node_deref(kmp_info_t *thread, kmp_depnode_t *node)
#define KMP_RELEASE_DEPNODE(gtid, n)
static void __kmp_dephash_free_entries(kmp_info_t *thread, kmp_dephash_t *h)
static void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task)
std::atomic< kmp_int32 > npredecessors
std::atomic< kmp_int32 > nrefs
kmp_lock_t * mtx_locks[MAX_MTX_DEPS]
kmp_depnode_list_t * successors
kmp_dephash_entry_t * next_in_bucket
kmp_depnode_list_t * next
kmp_info_p * td_alloc_thread
kmp_tasking_flags_t td_flags