[Openmp-commits] [PATCH] D120671: [OpenMP][libomp] omp_in_explicit_task() implementation.

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Mar 3 04:49:04 PST 2022


protze.joachim added inline comments.


================
Comment at: openmp/runtime/src/kmp_ftn_entry.h:1574
+#else
+  int gtid = __kmp_entry_gtid();
+  return __kmp_thread_from_gtid(gtid)->th.th_current_task->td_flags.tasktype;
----------------
Is this code sufficient for all scenarios of lazily initialized OpenMP threads?
Should this function handle uninitialized 


================
Comment at: openmp/runtime/test/api/omp_in_explicit_task.c:32
+    }
+    #pragma omp task
+    {
----------------
Would it make sense to test different kinds of tasks, like undeferred (and detachable) tasks, instead of two simple tasks?
At the moment it should not make a difference, but things might change in the future.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120671/new/

https://reviews.llvm.org/D120671



More information about the Openmp-commits mailing list