[Openmp-commits] [openmp] [OpenMP][DeviceRTL] implemented nteams-var ICV, omp_get_max_teams(), and omp_set_num_teams() (PR #71259)

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 4 11:09:24 PST 2023


================
@@ -854,6 +854,7 @@ Error GenericDeviceTy::setupDeviceEnvironment(GenericPluginTy &Plugin,
   DeviceEnvironmentTy DeviceEnvironment;
   DeviceEnvironment.DeviceDebugKind = OMPX_DebugKind;
   DeviceEnvironment.NumDevices = Plugin.getNumDevices();
+  DeviceEnvironment.NumTeams = (OMP_NumTeams >= 0) ? uint32_t(OMP_NumTeams) : 0;
----------------
jdoerfert wrote:

You can just read OMP_NumTeams and make it default to what we want. Negative values are not allowed anyway.

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


More information about the Openmp-commits mailing list