003 File Manager
Current Path:
/usr/src/contrib/llvm-project/openmp/runtime/src
usr
/
src
/
contrib
/
llvm-project
/
openmp
/
runtime
/
src
/
📁
..
📄
dllexports
(49.75 KB)
📄
exports_so.txt
(2.97 KB)
📄
extractExternal.cpp
(14.86 KB)
📁
i18n
📁
include
📄
kmp.h
(150.49 KB)
📄
kmp_affinity.cpp
(184.91 KB)
📄
kmp_affinity.h
(28.58 KB)
📄
kmp_alloc.cpp
(69.75 KB)
📄
kmp_atomic.cpp
(179.29 KB)
📄
kmp_atomic.h
(90.96 KB)
📄
kmp_barrier.cpp
(88.39 KB)
📄
kmp_cancel.cpp
(11.35 KB)
📄
kmp_config.h.cmake
(3.37 KB)
📄
kmp_csupport.cpp
(138.04 KB)
📄
kmp_debug.cpp
(3.54 KB)
📄
kmp_debug.h
(8.17 KB)
📄
kmp_debugger.cpp
(10.44 KB)
📄
kmp_debugger.h
(1.97 KB)
📄
kmp_dispatch.cpp
(90.11 KB)
📄
kmp_dispatch.h
(17.22 KB)
📄
kmp_dispatch_hier.h
(41.94 KB)
📄
kmp_environment.cpp
(14.35 KB)
📄
kmp_environment.h
(2.22 KB)
📄
kmp_error.cpp
(16 KB)
📄
kmp_error.h
(2.11 KB)
📄
kmp_ftn_cdecl.cpp
(1018 B)
📄
kmp_ftn_entry.h
(41.9 KB)
📄
kmp_ftn_extra.cpp
(971 B)
📄
kmp_ftn_os.h
(30.82 KB)
📄
kmp_ftn_stdcall.cpp
(895 B)
📄
kmp_global.cpp
(19.3 KB)
📄
kmp_gsupport.cpp
(91.3 KB)
📄
kmp_i18n.cpp
(27.56 KB)
📄
kmp_i18n.h
(6.77 KB)
📄
kmp_import.cpp
(1.04 KB)
📄
kmp_io.cpp
(6.38 KB)
📄
kmp_io.h
(1.1 KB)
📄
kmp_itt.cpp
(4.96 KB)
📄
kmp_itt.h
(14.32 KB)
📄
kmp_itt.inl
(38.74 KB)
📄
kmp_lock.cpp
(134.18 KB)
📄
kmp_lock.h
(52.92 KB)
📄
kmp_omp.h
(8.34 KB)
📄
kmp_os.h
(44.1 KB)
📄
kmp_platform.h
(5.35 KB)
📄
kmp_runtime.cpp
(289.73 KB)
📄
kmp_safe_c_api.h
(2.28 KB)
📄
kmp_sched.cpp
(37.33 KB)
📄
kmp_settings.cpp
(191.93 KB)
📄
kmp_settings.h
(3.26 KB)
📄
kmp_stats.cpp
(29.13 KB)
📄
kmp_stats.h
(40.94 KB)
📄
kmp_stats_timing.cpp
(3.59 KB)
📄
kmp_stats_timing.h
(3.6 KB)
📄
kmp_str.cpp
(22.28 KB)
📄
kmp_str.h
(4.48 KB)
📄
kmp_stub.cpp
(9.68 KB)
📄
kmp_stub.h
(1.56 KB)
📄
kmp_taskdeps.cpp
(29.79 KB)
📄
kmp_taskdeps.h
(3.93 KB)
📄
kmp_tasking.cpp
(177.28 KB)
📄
kmp_threadprivate.cpp
(26.22 KB)
📄
kmp_utility.cpp
(10.73 KB)
📄
kmp_version.cpp
(7.04 KB)
📄
kmp_version.h
(2.38 KB)
📄
kmp_wait_release.cpp
(905 B)
📄
kmp_wait_release.h
(32.1 KB)
📄
kmp_wrapper_getpid.h
(2.04 KB)
📄
kmp_wrapper_malloc.h
(7.2 KB)
📄
libomp.rc.var
(2.81 KB)
📄
ompt-event-specific.h
(4.38 KB)
📄
ompt-general.cpp
(23.73 KB)
📄
ompt-internal.h
(3.62 KB)
📄
ompt-specific.cpp
(14.43 KB)
📄
ompt-specific.h
(5.32 KB)
📄
test-touch.c
(688 B)
📁
thirdparty
📄
tsan_annotations.cpp
(5.92 KB)
📄
tsan_annotations.h
(6.77 KB)
📄
z_Linux_asm.S
(41.09 KB)
📄
z_Linux_util.cpp
(81.69 KB)
📄
z_Windows_NT-586_asm.asm
(30.37 KB)
📄
z_Windows_NT-586_util.cpp
(3.49 KB)
📄
z_Windows_NT_util.cpp
(52.15 KB)
Editing: kmp_taskdeps.h
/* * kmp_taskdeps.h */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef KMP_TASKDEPS_H #define KMP_TASKDEPS_H #include "kmp.h" #define KMP_ACQUIRE_DEPNODE(gtid, n) __kmp_acquire_lock(&(n)->dn.lock, (gtid)) #define KMP_RELEASE_DEPNODE(gtid, n) __kmp_release_lock(&(n)->dn.lock, (gtid)) static inline void __kmp_node_deref(kmp_info_t *thread, kmp_depnode_t *node) { if (!node) return; kmp_int32 n = KMP_ATOMIC_DEC(&node->dn.nrefs) - 1; if (n == 0) { KMP_ASSERT(node->dn.nrefs == 0); #if USE_FAST_MEMORY __kmp_fast_free(thread, node); #else __kmp_thread_free(thread, node); #endif } } static inline void __kmp_depnode_list_free(kmp_info_t *thread, kmp_depnode_list *list) { kmp_depnode_list *next; for (; list; list = next) { next = list->next; __kmp_node_deref(thread, list->node); #if USE_FAST_MEMORY __kmp_fast_free(thread, list); #else __kmp_thread_free(thread, list); #endif } } static inline void __kmp_dephash_free_entries(kmp_info_t *thread, kmp_dephash_t *h) { for (size_t i = 0; i < h->size; i++) { if (h->buckets[i]) { kmp_dephash_entry_t *next; for (kmp_dephash_entry_t *entry = h->buckets[i]; entry; entry = next) { next = entry->next_in_bucket; __kmp_depnode_list_free(thread, entry->last_ins); __kmp_depnode_list_free(thread, entry->last_mtxs); __kmp_node_deref(thread, entry->last_out); if (entry->mtx_lock) { __kmp_destroy_lock(entry->mtx_lock); __kmp_free(entry->mtx_lock); } #if USE_FAST_MEMORY __kmp_fast_free(thread, entry); #else __kmp_thread_free(thread, entry); #endif } h->buckets[i] = 0; } } } static inline void __kmp_dephash_free(kmp_info_t *thread, kmp_dephash_t *h) { __kmp_dephash_free_entries(thread, h); #if USE_FAST_MEMORY __kmp_fast_free(thread, h); #else __kmp_thread_free(thread, h); #endif } static inline void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task) { kmp_info_t *thread = __kmp_threads[gtid]; kmp_depnode_t *node = task->td_depnode; if (task->td_dephash) { KA_TRACE( 40, ("__kmp_release_deps: T#%d freeing dependencies hash of task %p.\n", gtid, task)); __kmp_dephash_free(thread, task->td_dephash); task->td_dephash = NULL; } if (!node) return; KA_TRACE(20, ("__kmp_release_deps: T#%d notifying successors of task %p.\n", gtid, task)); KMP_ACQUIRE_DEPNODE(gtid, node); node->dn.task = NULL; // mark this task as finished, so no new dependencies are generated KMP_RELEASE_DEPNODE(gtid, node); kmp_depnode_list_t *next; for (kmp_depnode_list_t *p = node->dn.successors; p; p = next) { kmp_depnode_t *successor = p->node; kmp_int32 npredecessors = KMP_ATOMIC_DEC(&successor->dn.npredecessors) - 1; // successor task can be NULL for wait_depends or because deps are still // being processed if (npredecessors == 0) { KMP_MB(); if (successor->dn.task) { KA_TRACE(20, ("__kmp_release_deps: T#%d successor %p of %p scheduled " "for execution.\n", gtid, successor->dn.task, task)); __kmp_omp_task(gtid, successor->dn.task, false); } } next = p->next; __kmp_node_deref(thread, p->node); #if USE_FAST_MEMORY __kmp_fast_free(thread, p); #else __kmp_thread_free(thread, p); #endif } __kmp_node_deref(thread, node); KA_TRACE( 20, ("__kmp_release_deps: T#%d all successors of %p notified of completion\n", gtid, task)); } #endif // KMP_TASKDEPS_H
Upload File
Create Folder