[Openmp-commits] [openmp] [OpenMP] Simplify parallel reductions (PR #70983)

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Thu Nov 2 15:20:08 PDT 2023


================
@@ -0,0 +1,25 @@
+// RUN: %libomptarget-compilexx-run-and-check-generic
+// RUN: %libomptarget-compileoptxx-run-and-check-generic
+
+#include <omp.h>
+#include <stdio.h>
+__attribute__((optnone)) void optnone(void) {}
+
+int main() {
+  int sum = 0, nt;
+#pragma omp target teams map(tofrom : sum, nt) num_teams(1)
+  {
+    nt = 3 * omp_get_max_threads();
+    optnone();
----------------
jdoerfert wrote:

it prevents SPMDztion. 

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


More information about the Openmp-commits mailing list