[clang] [llvm] [OpenMP] Map `omp_default_mem_alloc` to global memory (PR #104790)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 07:50:12 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff b05c55472bf7cadcd0e4cb1a669b3474695b0524 0b3955d078356bb82a5f1d750d19e81001bc8807 --extensions cpp,c -- clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/test/OpenMP/nvptx_allocate_codegen.cpp offload/test/api/omp_device_alloc.c
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/offload/test/api/omp_device_alloc.c b/offload/test/api/omp_device_alloc.c
index 06e7357c7d..b4cfe442d9 100644
--- a/offload/test/api/omp_device_alloc.c
+++ b/offload/test/api/omp_device_alloc.c
@@ -15,7 +15,7 @@ int main() {
 #pragma omp parallel num_threads(32)
     {
 #pragma omp atomic
-    *ptr += 1;
+      *ptr += 1;
     }
     assert(*ptr == 32 && "Ptr is not 32");
     omp_free(ptr, omp_default_mem_alloc);

``````````

</details>


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


More information about the llvm-commits mailing list