[libcxx-commits] [libcxx] [OpenMPIRBuilder] Add ThreadLimit and NumTeamsUpper clauses to teams clause (PR #68364)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 9 06:30:09 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,
----------------
shraiysh wrote:

Lowerbound isn't handled for clang either - it is not even recognized as syntactically correct. I don't know what the generated code should look like, as `@__kmpc_push_num_teams` does not accept a lowerbound on number of teams. So, I kept it unimplemented for future work.

https://github.com/llvm/llvm-project/pull/68364


More information about the libcxx-commits mailing list