Skip to content

Commit f4bbfee

Browse files
committed
Merge branch 'main' into jmm/fix-out-of-bounds
2 parents bc0d61c + 0fe18f1 commit f4bbfee

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

.github/workflows/formatting.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: export DEBIAN_FRONTEND=noninteractive
1919
- name: install dependencies
2020
run: |
21-
sudo apt-get install -y --force-yes -qq git clang-format
21+
sudo apt-get install -y --force-yes -qq git clang-format-19
2222
- name: check formatting
2323
continue-on-error: true
24-
run: find . -regex '.*\.\(cpp\|hpp\)' | xargs clang-format -style=file -i && git diff --exit-code --ignore-submodules
24+
run: find . -regex '.*\.\(cpp\|hpp\)' | xargs clang-format-19 -style=file -i && git diff --exit-code --ignore-submodules

cmake/Format.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
find_program(
1515
CLANG_FORMAT
1616
NAMES
17-
clang-format-12 # Debian package manager, among others, provide this name
18-
clang-format-mp-12.0 # MacPorts
17+
clang-format-19 # Debian package manager, among others, provide this name
18+
clang-format-mp-19.0 # MacPorts
1919
clang-format # Default name
2020
)
2121

@@ -36,15 +36,15 @@ endif()
3636
if (NOT CLANG_FORMAT_VERSION)
3737
message(
3838
WARNING
39-
"Couldn't determine clang-format version. clang-format 12.0 is \
39+
"Couldn't determine clang-format version. clang-format 19.0 is \
4040
expected - results on other versions may not be stable")
4141

4242
set(CLANG_FORMAT_VERSION "0.0.0" CACHE STRING "clang-format version not found")
43-
elseif (NOT (CLANG_FORMAT_VERSION VERSION_GREATER_EQUAL "12.0" AND
44-
CLANG_FORMAT_VERSION VERSION_LESS "13.0"))
43+
elseif (NOT (CLANG_FORMAT_VERSION VERSION_GREATER_EQUAL "19.0" AND
44+
CLANG_FORMAT_VERSION VERSION_LESS "20.0"))
4545
message(
4646
WARNING
47-
"clang-format version 12.0 is required - results on other \
47+
"clang-format version 19.0 is required - results on other \
4848
versions may not be stable")
4949
endif()
5050

spiner/databox.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@ PORTABLE_FORCEINLINE_FUNCTION T DataBox<T, Grid_t, Concept>::interpToReal(
475475
}
476476

477477
template <typename T, typename Grid_t, typename Concept>
478-
PORTABLE_FORCEINLINE_FUNCTION T
479-
DataBox<T, Grid_t, Concept>::interpToReal(const T x2, const T x1, const int idx) const noexcept {
478+
PORTABLE_FORCEINLINE_FUNCTION T DataBox<T, Grid_t, Concept>::interpToReal(
479+
const T x2, const T x1, const int idx) const noexcept {
480480
assert(rank_ == 3);
481481
for (int r = 1; r < rank_; ++r) {
482482
assert(indices_[r] == IndexType::Interpolated);
@@ -490,8 +490,8 @@ DataBox<T, Grid_t, Concept>::interpToReal(const T x2, const T x1, const int idx)
490490

491491
// TODO: prefectch corners for speed?
492492
// TODO: re-order access pattern?
493-
return (w2[0] *
494-
(w1[0] * dataView_(ix2, ix1, idx) + w1[1] * dataView_(ix2, ix1 + 1, idx)) +
493+
return (w2[0] * (w1[0] * dataView_(ix2, ix1, idx) +
494+
w1[1] * dataView_(ix2, ix1 + 1, idx)) +
495495
w2[1] * (w1[0] * dataView_(ix2 + 1, ix1, idx) +
496496
w1[1] * dataView_(ix2 + 1, ix1 + 1, idx)));
497497
}

test/test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,9 @@ int main(int argc, char *argv[]) {
10061006
Kokkos::initialize();
10071007
#endif
10081008
int result;
1009-
{ result = Catch::Session().run(argc, argv); }
1009+
{
1010+
result = Catch::Session().run(argc, argv);
1011+
}
10101012
#ifdef PORTABILITY_STRATEGY_KOKKOS
10111013
Kokkos::finalize();
10121014
#endif

0 commit comments

Comments
 (0)