[flang-commits] [flang] [flang][cuda] Add entry point for alloc/free and simple copy (PR #109867)

via flang-commits flang-commits at lists.llvm.org
Tue Sep 24 14:27:18 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 50a1ab12abbe948e6d3f8418f11bfa1951c8d19e 1e350fc7fa9fa646439c656de5e5f5de34abf456 --extensions h,cpp -- flang/unittests/Runtime/CUDA/Memory.cpp flang/include/flang/Runtime/CUDA/memory.h flang/runtime/CUDA/memory.cpp
``````````

</details>

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

``````````diff
diff --git a/flang/unittests/Runtime/CUDA/Memory.cpp b/flang/unittests/Runtime/CUDA/Memory.cpp
index 95ae6c75e3..08fb22ef2b 100644
--- a/flang/unittests/Runtime/CUDA/Memory.cpp
+++ b/flang/unittests/Runtime/CUDA/Memory.cpp
@@ -20,11 +20,11 @@ TEST(MemoryCUFTest, SimpleAllocTramsferFree) {
   int *dev = (int *)RTNAME(CUFMemAlloc)(sizeof(int), __FILE__, __LINE__);
   EXPECT_TRUE(dev != 0);
   int host = 42;
-  RTNAME(CUFDataTransferPtrPtr)((void *)dev, (void *)&host, sizeof(int),
-      kHostToDevice, __FILE__, __LINE__);
+  RTNAME(CUFDataTransferPtrPtr)
+  ((void *)dev, (void *)&host, sizeof(int), kHostToDevice, __FILE__, __LINE__);
   host = 0;
-  RTNAME(CUFDataTransferPtrPtr)((void *)&host, (void *)dev, sizeof(int),
-      kDeviceToHost, __FILE__, __LINE__);
+  RTNAME(CUFDataTransferPtrPtr)
+  ((void *)&host, (void *)dev, sizeof(int), kDeviceToHost, __FILE__, __LINE__);
   EXPECT_EQ(42, host);
   RTNAME(CUFMemFree)((void *)dev, __FILE__, __LINE__);
 }

``````````

</details>


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


More information about the flang-commits mailing list