diff options
| author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-09-26 20:47:25 +0000 |
|---|---|---|
| committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-09-26 20:47:25 +0000 |
| commit | 83e360a42720fee14e9886fb0c39d3dc9965a789 (patch) | |
| tree | cd9c575c378991a6b579b6756858e637f42912cf /openmp/runtime/src | |
| parent | e525f0d4e2249df7969f9af34014d6e5674cce0f (diff) | |
| download | bcm5719-llvm-83e360a42720fee14e9886fb0c39d3dc9965a789.tar.gz bcm5719-llvm-83e360a42720fee14e9886fb0c39d3dc9965a789.zip | |
[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
llvm-svn: 343143
Diffstat (limited to 'openmp/runtime/src')
| -rw-r--r-- | openmp/runtime/src/dllexports | 5 | ||||
| -rw-r--r-- | openmp/runtime/src/kmp.h | 6 | ||||
| -rw-r--r-- | openmp/runtime/src/kmp_tasking.cpp | 9 |
3 files changed, 8 insertions, 12 deletions
diff --git a/openmp/runtime/src/dllexports b/openmp/runtime/src/dllexports index baf6f544be7..59bda870f81 100644 --- a/openmp/runtime/src/dllexports +++ b/openmp/runtime/src/dllexports @@ -392,17 +392,18 @@ kmpc_set_defaults 224 __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 diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h index ce8fddf9939..fbb5ab81bf1 100644 --- a/openmp/runtime/src/kmp.h +++ b/openmp/runtime/src/kmp.h @@ -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 *loc, kmp_int32 gtid, kmp_task_t *task, 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 diff --git a/openmp/runtime/src/kmp_tasking.cpp b/openmp/runtime/src/kmp_tasking.cpp index 7179d2c3149..d2b5ddeb2ff 100644 --- a/openmp/runtime/src/kmp_tasking.cpp +++ b/openmp/runtime/src/kmp_tasking.cpp @@ -1855,8 +1855,7 @@ kmp_int32 __kmpc_omp_taskyield(ident_t *loc_ref, kmp_int32 gtid, int end_part) { 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 gtid) { 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, int gtid) { } 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 |

