diff options
author | Joachim Protze <protze@itc.rwth-aachen.de> | 2020-07-05 09:46:31 +0300 |
---|---|---|
committer | Joachim Protze <protze@itc.rwth-aachen.de> | 2020-07-05 23:39:25 +0300 |
commit | 30205865d96aab4a39464674bafe7600fd1dabaa (patch) | |
tree | 77156dfb4eac25462737da850d081d6cbb549a95 /openmp | |
parent | 6ba4380ed62c2b6c3c18cece6f71a97a107fc76e (diff) |
[OpenMP][OMPT] Fix ifdefs for OMPT code
Fixes build with LIBOMP_OMPT_SUPPORT=off
Reported by: Jason Edson
Reviewed by: Hahnfeld
Differential Revision: https://reviews.llvm.org/D83171
Diffstat (limited to 'openmp')
-rw-r--r-- | openmp/runtime/src/kmp_taskdeps.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openmp/runtime/src/kmp_taskdeps.cpp b/openmp/runtime/src/kmp_taskdeps.cpp index f42eea54a84b..a654951f5b3b 100644 --- a/openmp/runtime/src/kmp_taskdeps.cpp +++ b/openmp/runtime/src/kmp_taskdeps.cpp @@ -638,9 +638,9 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid, return ret; } +#if OMPT_SUPPORT void __ompt_taskwait_dep_finish(kmp_taskdata_t *current_task, ompt_data_t *taskwait_task_data) { -#if OMPT_SUPPORT if (ompt_enabled.ompt_callback_task_schedule) { ompt_data_t task_data = ompt_data_none; ompt_callbacks.ompt_callback(ompt_callback_task_schedule)( @@ -652,8 +652,8 @@ void __ompt_taskwait_dep_finish(kmp_taskdata_t *current_task, } current_task->ompt_task_info.frame.enter_frame.ptr = NULL; *taskwait_task_data = ompt_data_none; -#endif /* OMPT_SUPPORT */ } +#endif /* OMPT_SUPPORT */ /*! @ingroup TASKING @@ -763,7 +763,9 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps, KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d has no blocking " "dependencies : loc=%p\n", gtid, loc_ref)); +#if OMPT_SUPPORT __ompt_taskwait_dep_finish(current_task, taskwait_task_data); +#endif /* OMPT_SUPPORT */ return; } @@ -776,7 +778,9 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps, KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d has no blocking " "dependencies : loc=%p\n", gtid, loc_ref)); +#if OMPT_SUPPORT __ompt_taskwait_dep_finish(current_task, taskwait_task_data); +#endif /* OMPT_SUPPORT */ return; } @@ -788,7 +792,9 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps, __kmp_task_stealing_constraint); } +#if OMPT_SUPPORT __ompt_taskwait_dep_finish(current_task, taskwait_task_data); +#endif /* OMPT_SUPPORT */ KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d finished waiting : loc=%p\n", gtid, loc_ref)); } |