Skip to content
This repository was archived by the owner on Sep 22, 2025. It is now read-only.

Commit b330fe7

Browse files
committed
Clang format fixes
1 parent 45ba1ab commit b330fe7

File tree

6 files changed

+38
-41
lines changed

6 files changed

+38
-41
lines changed

include/dr/mp/alignment.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
namespace dr::mp {
1212

1313
template <typename T>
14-
concept has_segments = requires(T &t) { dr::ranges::segments(t); };
14+
concept has_segments = requires(T &t) {
15+
dr::ranges::segments(t);
16+
};
1517

1618
template <typename T>
1719
concept no_segments = !has_segments<T>;

test/gtest/mp/CMakeLists.txt

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# SPDX-FileCopyrightText: Intel Corporation
1+
#SPDX - FileCopyrightText : Intel Corporation
22
#
3-
# SPDX-License-Identifier: BSD-3-Clause
3+
#SPDX - License - Identifier : BSD - 3 - Clause
44

55
set(CMAKE_INCLUDE_CURRENT_DIR ON)
66

7-
# tested with a variable number of ranks
8-
# cmake-format: off
7+
#tested with a variable number of ranks
8+
#cmake - format : off
99
add_executable(
1010
mp-tests
1111
mp-tests.cpp
@@ -17,10 +17,10 @@ add_executable(
1717
../common/drop.cpp
1818
../common/enumerate.cpp
1919
../common/equal.cpp
20-
# ../common/exclusive_scan.cpp disabled due to deadlock - DRA-213
20+
#../ common / exclusive_scan.cpp disabled due to deadlock - DRA - 213
2121
../common/fill.cpp
2222
../common/for_each.cpp
23-
# ../common/inclusive_scan.cpp disabled due to deadlock - DRA-213
23+
#../ common / inclusive_scan.cpp disabled due to deadlock - DRA - 213
2424
../common/iota.cpp
2525
../common/iota_view.cpp
2626
../common/reduce.cpp
@@ -55,9 +55,11 @@ add_executable(
5555
wide-halo-2d-3.cpp
5656
)
5757

58-
# mp-quick-test and mp-quick-test-3-only is for development. By reducing the number of source files, it
59-
# builds much faster. Change the source files to match what you need to test. It
60-
# is OK to commit changes to the source file list.
58+
#mp - quick - test and mp - quick - test - 3 - \
59+
only is for development.By reducing the number of source files, \
60+
it
61+
#builds much faster.Change the source files to match what you need to test.It
62+
#is OK to commit changes to the source file list.
6163
add_executable(mp-quick-test
6264
mp-tests.cpp
6365
halo.cpp
@@ -66,7 +68,7 @@ add_executable(mp-quick-test-3-only
6668
mp-tests.cpp
6769
wide-halo-2d-3.cpp
6870
)
69-
# cmake-format: on
71+
#cmake - format : on
7072

7173
target_compile_definitions(mp-quick-test PRIVATE QUICK_TEST)
7274
target_compile_definitions(mp-quick-test-3-only PRIVATE QUICK_TEST)
@@ -80,8 +82,8 @@ foreach(test-exec IN ITEMS mp-tests mp-tests-3 mp-quick-test mp-quick-test-3-onl
8082
"${CMAKE_COMMAND} -E time")
8183
endforeach()
8284

83-
# tests without --sycl flag will fail on IshmemBackend TODO: make them be
84-
# running somehow if ENABLE_ISHMEM will be default CI config
85+
#tests without-- sycl flag will fail on IshmemBackend TODO : make them be
86+
#running somehow if ENABLE_ISHMEM will be default CI config
8587
if(NOT ENABLE_ISHMEM)
8688
add_mp_ctest(NAME mp-quick-test NPROC 1)
8789
add_mp_ctest(NAME mp-quick-test NPROC 2)
@@ -90,7 +92,7 @@ if(NOT ENABLE_ISHMEM)
9092
cmake_path(GET MPI_CXX_ADDITIONAL_INCLUDE_DIRS FILENAME MPI_IMPL)
9193

9294
if(NOT MPI_IMPL STREQUAL "openmpi")
93-
# MPI_Win_create fails for communicator with size 1
95+
#MPI_Win_create fails for communicator with size 1
9496
add_mp_ctest(NAME mp-tests NPROC 1 TIMEOUT 150)
9597
endif()
9698
foreach(nproc RANGE 2 4)
@@ -100,15 +102,16 @@ if(NOT ENABLE_ISHMEM)
100102
endif()
101103

102104
if(ENABLE_SYCL)
103-
# DRA-83: Slide isn't complete
105+
#DRA - 83 : Slide isn't complete
104106
set(sycl-exclusions *Slide*:ComplexSlide*:)
105107

106108
if(ENABLE_ISHMEM)
107-
# Some Halo3 cases don't work on IshmemBackend (work on MPI, see: DRA-84),
108-
# Counted.large fails with
109-
# distributed-ranges/test/gtest/common/counted.cpp:62: Failure Expected
110-
# equality of these values: *(--counted_result.end()) Which is: 5, should be
111-
# 77 Mdspan, Mdarray hangs sometimes on ISHMEM.
109+
#Some Halo3 cases don't work on IshmemBackend (work on MPI, see: DRA-84),
110+
#Counted.large fails with
111+
#distributed - \
112+
ranges / test / gtest / common / counted.cpp : 62 : Failure Expected
113+
#equality of these values : *(--counted_result.end())Which is : 5, should be
114+
# 77 Mdspan, Mdarray hangs sometimes on ISHMEM.
112115
set(sycl-exclusions
113116
${sycl-exclusions}Halo3/*:Sort*:Counted/*:Mdspan*:Mdarray*:)
114117
endif()

test/gtest/mp/copy.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
// Fixture
88

9-
template <typename T> class CopyMP : public testing::Test {
10-
public:
11-
};
9+
template <typename T> class CopyMP : public testing::Test { public: };
1210

1311
TYPED_TEST_SUITE(CopyMP, AllTypes);
1412

test/gtest/mp/reduce.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
// Fixture
88

9-
template <typename T> class ReduceMP : public testing::Test {
10-
public:
11-
};
9+
template <typename T> class ReduceMP : public testing::Test { public: };
1210

1311
TYPED_TEST_SUITE(ReduceMP, AllTypes);
1412

test/gtest/mp/segments.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
#include <dr/mp/views/segmented.hpp>
88

9-
template <typename T> class Segmented : public testing::Test {
10-
public:
11-
};
9+
template <typename T> class Segmented : public testing::Test { public: };
1210

1311
TYPED_TEST_SUITE(Segmented, AllTypesWithoutIshmem);
1412

@@ -27,9 +25,7 @@ TYPED_TEST(Segmented, Basic) {
2725
EXPECT_EQ(dr::ranges::segments(ops.dist_vec), segmented);
2826
}
2927

30-
template <typename T> class SegmentUtils : public testing::Test {
31-
public:
32-
};
28+
template <typename T> class SegmentUtils : public testing::Test { public: };
3329

3430
// traversing on host over local_segment does not work in case of both:
3531
// device_memory and IshmemBackend (which uses device memory)

test/gtest/mp/xp-tests.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ namespace xp = dr::mp;
2020

2121
template <typename V>
2222
concept compliant_view = rng::forward_range<V> && rng::random_access_range<V> &&
23-
rng::viewable_range<V> && requires(V &v) {
24-
// test one at a time so error is apparent
25-
dr::ranges::segments(v);
26-
dr::ranges::segments(v).begin();
27-
*dr::ranges::segments(v).begin();
28-
dr::ranges::rank(*dr::ranges::segments(v).begin());
29-
// dr::ranges::local(rng::begin(dr::ranges::segments(v)[0]));
30-
// dr::mp::local_segments(v);
31-
};
23+
rng::viewable_range<V> && requires(V &v) {
24+
// test one at a time so error is apparent
25+
dr::ranges::segments(v);
26+
dr::ranges::segments(v).begin();
27+
*dr::ranges::segments(v).begin();
28+
dr::ranges::rank(*dr::ranges::segments(v).begin());
29+
// dr::ranges::local(rng::begin(dr::ranges::segments(v)[0]));
30+
// dr::mp::local_segments(v);
31+
};
3232

3333
inline void barrier() { dr::mp::barrier(); }
3434
inline void fence() { dr::mp::fence(); }

0 commit comments

Comments
 (0)