[Openmp-commits] [openmp] r343143 - [OpenMP] Add missing __kmpc_critical_with_hint to dllexports

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 26 13:47:25 PDT 2018


Author: jlpeyton
Date: Wed Sep 26 13:47:25 2018
New Revision: 343143

URL: http://llvm.org/viewvc/llvm-project?rev=343143&view=rev
Log:
[OpenMP] Add missing __kmpc_critical_with_hint to dllexports

This patch puts the __kmpc_critical_with_hint function in dllexports
and also replaces some OMP_45_ENABLED to OMP_50_ENABLED

Differential Revision: https://reviews.llvm.org/D52380

Modified:
    openmp/trunk/runtime/src/dllexports
    openmp/trunk/runtime/src/kmp.h
    openmp/trunk/runtime/src/kmp_tasking.cpp

Modified: openmp/trunk/runtime/src/dllexports
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/dllexports?rev=343143&r1=343142&r2=343143&view=diff
==============================================================================
--- openmp/trunk/runtime/src/dllexports (original)
+++ openmp/trunk/runtime/src/dllexports Wed Sep 26 13:47:25 2018
@@ -392,17 +392,18 @@ kmpc_set_defaults
         __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

Modified: openmp/trunk/runtime/src/kmp.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp.h?rev=343143&r1=343142&r2=343143&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp.h (original)
+++ openmp/trunk/runtime/src/kmp.h Wed Sep 26 13:47:25 2018
@@ -2148,8 +2148,7 @@ typedef struct kmp_taskgroup {
   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
@@ -3769,8 +3768,7 @@ KMP_EXPORT void __kmpc_taskloop(ident_t
                                 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

Modified: openmp/trunk/runtime/src/kmp_tasking.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_tasking.cpp?rev=343143&r1=343142&r2=343143&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_tasking.cpp (original)
+++ openmp/trunk/runtime/src/kmp_tasking.cpp Wed Sep 26 13:47:25 2018
@@ -1855,8 +1855,7 @@ kmp_int32 __kmpc_omp_taskyield(ident_t *
   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 @@ void __kmpc_taskgroup(ident_t *loc, int
   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 @@ void __kmpc_end_taskgroup(ident_t *loc,
   }
   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




More information about the Openmp-commits mailing list