[llvm] [Offload][Tests] Non-contiguous_update_to_tests (PR #169623)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 26 01:33:32 PST 2025
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 origin/main HEAD --extensions c -- offload/test/offloading/strided_multiple_update_to.c offload/test/offloading/strided_partial_update_to.c offload/test/offloading/strided_update_to.c offload/test/offloading/strided_multiple_update_from.c offload/test/offloading/strided_partial_update_from.c offload/test/offloading/strided_update_from.c --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/offload/test/offloading/strided_multiple_update_to.c b/offload/test/offloading/strided_multiple_update_to.c
index 7671e5215..1ae61e9ed 100644
--- a/offload/test/offloading/strided_multiple_update_to.c
+++ b/offload/test/offloading/strided_multiple_update_to.c
@@ -62,7 +62,7 @@ int main() {
data2[i] = 20.0;
}
}
-
+
// Modify host arrays for strided elements
data1[0] = 10.0;
data1[4] = 10.0;
diff --git a/offload/test/offloading/strided_partial_update_to.c b/offload/test/offloading/strided_partial_update_to.c
index 106152ade..ea708cf0c 100644
--- a/offload/test/offloading/strided_partial_update_to.c
+++ b/offload/test/offloading/strided_partial_update_to.c
@@ -38,7 +38,7 @@ int main() {
#pragma omp target
for (int i = 0; i < len; i++)
data[i] = 20.0;
-
+
// Modify host data for strided elements
data[0] = 10.0;
data[3] = 10.0;
diff --git a/offload/test/offloading/strided_update_to.c b/offload/test/offloading/strided_update_to.c
index fb74ed0bc..89f80e021 100644
--- a/offload/test/offloading/strided_update_to.c
+++ b/offload/test/offloading/strided_update_to.c
@@ -10,12 +10,12 @@
int main() {
int len = 8;
double data[len];
-
+
// Initialize on host
for (int i = 0; i < len; i++) {
data[i] = i;
}
-
+
// Initial values
printf("original host array values:\n");
for (int i = 0; i < len; i++)
@@ -29,7 +29,7 @@ int main() {
for (int i = 0; i < len; i++) {
data[i] = 20.0;
}
-
+
// Modify host for strided elements
data[0] = 10.0;
data[2] = 10.0;
@@ -44,7 +44,7 @@ int main() {
data[i] += 5.0;
}
}
-
+
// CHECK: 0.000000
// CHECK: 1.000000
// CHECK: 2.000000
``````````
</details>
https://github.com/llvm/llvm-project/pull/169623
More information about the llvm-commits
mailing list