[flang-commits] [flang] [flang][cuda] Add function to allocate and deallocate device module variable (PR #109213)
via flang-commits
flang-commits at lists.llvm.org
Wed Sep 18 17:26:02 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 b4a8e877ee3002a8cfd613f7950afcbe1d98821c 3547be80e2f66b7f8ff89ca99bab40873ff9f513 --extensions h,cpp -- flang/include/flang/Runtime/CUDA/allocatable.h flang/include/flang/Runtime/CUDA/common.h flang/runtime/CUDA/allocatable.cpp flang/unittests/Runtime/CUDA/Allocatable.cpp flang/include/flang/Runtime/CUDA/allocator.h flang/include/flang/Runtime/CUDA/descriptor.h flang/include/flang/Runtime/CUDA/memory.h flang/lib/Optimizer/Transforms/CufOpConversion.cpp flang/runtime/CUDA/allocator.cpp flang/runtime/CUDA/descriptor.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/runtime/CUDA/allocatable.cpp b/flang/runtime/CUDA/allocatable.cpp
index f464d1b561..75ece103cb 100644
--- a/flang/runtime/CUDA/allocatable.cpp
+++ b/flang/runtime/CUDA/allocatable.cpp
@@ -39,8 +39,8 @@ int RTDEF(CUFAllocatableAllocate)(Descriptor &desc, bool hasStat,
if (stat == StatOk) {
void *deviceAddr{
RTNAME(CUFGetDeviceAddress)((void *)&desc, sourceFile, sourceLine)};
- RTDECL(CUFDescriptorSync)(
- (Descriptor *)deviceAddr, &desc, sourceFile, sourceLine);
+ RTDECL(CUFDescriptorSync)
+ ((Descriptor *)deviceAddr, &desc, sourceFile, sourceLine);
}
#endif
return stat;
@@ -57,8 +57,8 @@ int RTDEF(CUFAllocatableDeallocate)(Descriptor &desc, bool hasStat,
if (stat == StatOk) {
void *deviceAddr{
RTNAME(CUFGetDeviceAddress)((void *)&desc, sourceFile, sourceLine)};
- RTDECL(CUFDescriptorSync)(
- (Descriptor *)deviceAddr, &desc, sourceFile, sourceLine);
+ RTDECL(CUFDescriptorSync)
+ ((Descriptor *)deviceAddr, &desc, sourceFile, sourceLine);
}
#endif
return stat;
``````````
</details>
https://github.com/llvm/llvm-project/pull/109213
More information about the flang-commits
mailing list