[Openmp-commits] [PATCH] D52380: [OpenMP] Add missing __kmpc_critical_with_hint to dllexports
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Sep 21 14:12:42 PDT 2018
jlpeyton created this revision.
jlpeyton added reviewers: tlwilmar, AndreyChurbanov, hbae, omalyshe.
jlpeyton added a project: OpenMP.
Herald added a subscriber: guansong.
This patch puts the __kmpc_critical_with_hint function in dllexports and also replaces some OMP_45_ENABLED to OMP_50_ENABLED
Repository:
rOMP OpenMP
https://reviews.llvm.org/D52380
Files:
runtime/src/dllexports
runtime/src/kmp.h
runtime/src/kmp_tasking.cpp
Index: runtime/src/kmp_tasking.cpp
===================================================================
--- runtime/src/kmp_tasking.cpp
+++ runtime/src/kmp_tasking.cpp
@@ -1855,8 +1855,7 @@
return TASK_CURRENT_NOT_QUEUED;
}
-// TODO: change to OMP_50_ENABLED, need to change build tools for this to work
-#if OMP_45_ENABLED
+#if OMP_50_ENABLED
// Task Reduction implementation
typedef struct kmp_task_red_flags {
@@ -2059,8 +2058,7 @@
KMP_ATOMIC_ST_RLX(&tg_new->count, 0);
KMP_ATOMIC_ST_RLX(&tg_new->cancel_request, cancel_noreq);
tg_new->parent = taskdata->td_taskgroup;
-// TODO: change to OMP_50_ENABLED, need to change build tools for this to work
-#if OMP_45_ENABLED
+#if OMP_50_ENABLED
tg_new->reduce_data = NULL;
tg_new->reduce_num_data = 0;
#endif
@@ -2165,8 +2163,7 @@
}
KMP_DEBUG_ASSERT(taskgroup->count == 0);
-// TODO: change to OMP_50_ENABLED, need to change build tools for this to work
-#if OMP_45_ENABLED
+#if OMP_50_ENABLED
if (taskgroup->reduce_data != NULL) // need to reduce?
__kmp_task_reduction_fini(thread, taskgroup);
#endif
Index: runtime/src/kmp.h
===================================================================
--- runtime/src/kmp.h
+++ runtime/src/kmp.h
@@ -2148,8 +2148,7 @@
std::atomic<kmp_int32>
cancel_request; // request for cancellation of this taskgroup
struct kmp_taskgroup *parent; // parent taskgroup
-// TODO: change to OMP_50_ENABLED, need to change build tools for this to work
-#if OMP_45_ENABLED
+#if OMP_50_ENABLED
// Block of data to perform task reduction
void *reduce_data; // reduction related info
kmp_int32 reduce_num_data; // number of data items to reduce
@@ -3772,8 +3771,7 @@
kmp_int32 sched, kmp_uint64 grainsize,
void *task_dup);
#endif
-// TODO: change to OMP_50_ENABLED, need to change build tools for this to work
-#if OMP_45_ENABLED
+#if OMP_50_ENABLED
KMP_EXPORT void *__kmpc_task_reduction_init(int gtid, int num_data, void *data);
KMP_EXPORT void *__kmpc_task_reduction_get_th_data(int gtid, void *tg, void *d);
#endif
Index: runtime/src/dllexports
===================================================================
--- runtime/src/dllexports
+++ runtime/src/dllexports
@@ -392,17 +392,18 @@
__kmpc_doacross_post 263
__kmpc_doacross_fini 264
__kmpc_taskloop 266
+ __kmpc_critical_with_hint 270
%endif
%endif
kmpc_aligned_malloc 265
kmpc_set_disp_num_buffers 267
# OpenMP 5.0 entry points
-# TODO: change to OMP_50 once it is implemented
%ifndef stub
- %ifdef OMP_45
+ %ifdef OMP_50
__kmpc_task_reduction_init 268
__kmpc_task_reduction_get_th_data 269
+# USED FOR 4.5 __kmpc_critical_with_hint 270
__kmpc_get_target_offload 271
%endif
%endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52380.166559.patch
Type: text/x-patch
Size: 2954 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180921/266b7b17/attachment.bin>
More information about the Openmp-commits
mailing list