[flang-commits] [flang] [OpenMPIRBuilder] Add ThreadLimit and NumTeamsUpper clauses to teams clause (PR #68364)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Mon Oct 9 07:34:39 PDT 2023
================
@@ -1917,8 +1917,13 @@ class OpenMPIRBuilder {
///
/// \param Loc The location where the teams construct was encountered.
/// \param BodyGenCB Callback that will generate the region code.
+ /// \param NumTeamsUpper Upper bound on the number of teams.
+ /// \param ThreadLimit on the number of threads that may participate in a
+ /// contention group created by each team.
InsertPointTy createTeams(const LocationDescription &Loc,
- BodyGenCallbackTy BodyGenCB);
+ BodyGenCallbackTy BodyGenCB,
+ Value *NumTeamsUpper = nullptr,
----------------
kiranchandramohan wrote:
So, there are two functions in the OpenMP runtime. It is OK to leave with a TODO, just write a status of the support in Clang and the OpenMP runtime.
```
KMP_EXPORT void __kmpc_push_num_teams(ident_t *loc, kmp_int32 global_tid,
kmp_int32 num_teams,
kmp_int32 num_threads);
/* Function for OpenMP 5.1 num_teams clause */
KMP_EXPORT void __kmpc_push_num_teams_51(ident_t *loc, kmp_int32 global_tid,
kmp_int32 num_teams_lb,
kmp_int32 num_teams_ub,
kmp_int32 num_threads);
```
https://github.com/llvm/llvm-project/pull/68364
More information about the flang-commits
mailing list