Skip to content

Commit 25aee03

Browse files
committed
change spacing
1 parent 4d92935 commit 25aee03

File tree

380 files changed

+4885
-10082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

380 files changed

+4885
-10082
lines changed

.clang-format

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
BasedOnStyle : LLVM
2+
# Indent formatting
23
IndentWidth : 2
4+
UseTab: Never
35
BreakBeforeBraces : Linux
46
KeepEmptyLinesAtTheStartOfBlocks : true
57
MaxEmptyLinesToKeep : 2
68
AccessModifierOffset : -2
9+
10+
# Pointer alignment
711
DerivePointerAlignment: false
812
PointerAlignment: Left
9-
UseTab: Never
1013
AllowShortIfStatementsOnASingleLine : true
1114
ConstructorInitializerAllOnOneLineOrOnePerLine : true
1215
AllowShortFunctionsOnASingleLine : true
1316
AllowShortLoopsOnASingleLine : false
14-
BinPackParameters : false
17+
BinPackParameters : true
1518
AllowAllParametersOfDeclarationOnNextLine : false
1619
AlignTrailingComments : true
1720
ColumnLimit : 80

examples/dynamic-forall.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,14 @@
2727
void checkResult(int* res, int len);
2828
void printResult(int* res, int len);
2929

30-
using policy_list = camp::list<RAJA::seq_exec,
31-
RAJA::simd_exec
30+
using policy_list = camp::list<RAJA::seq_exec, RAJA::simd_exec
3231
#if defined(RAJA_ENABLE_OPENMP)
3332
,
3433
RAJA::omp_parallel_for_exec
3534
#endif
3635
#if defined(RAJA_ENABLE_CUDA)
3736
,
38-
RAJA::cuda_exec<256>,
39-
RAJA::cuda_exec<512>
37+
RAJA::cuda_exec<256>, RAJA::cuda_exec<512>
4038
#endif
4139
>;
4240

examples/omp-target-ltimes.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ RAJA_INDEX_VALUE(IGroup, "IGroup");
2424
RAJA_INDEX_VALUE(IZone, "IZone");
2525

2626

27-
void runLTimesRajaKernel(bool debug,
28-
Index_type num_moments,
29-
Index_type num_directions,
30-
Index_type num_groups,
27+
void runLTimesRajaKernel(bool debug, Index_type num_moments,
28+
Index_type num_directions, Index_type num_groups,
3129
Index_type num_zones)
3230
{
3331

examples/plugin/counter-plugin.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ class CounterPlugin : public RAJA::util::PluginStrategy
4343
};
4444

4545
// Statically loading plugin.
46-
static RAJA::util::PluginRegistry::add<CounterPlugin> P("Counter",
47-
"Counts number of "
48-
"kernel launches.");
46+
static RAJA::util::PluginRegistry::add<CounterPlugin> P("Counter", "Counts "
47+
"number of "
48+
"kernel "
49+
"launches.");
4950

5051
// Dynamically loading plugin.
5152
extern "C" RAJA::util::PluginStrategy* getPlugin() { return new CounterPlugin; }

examples/plugin/timer-plugin.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class TimerPlugin : public RAJA::util::PluginStrategy
4343
extern "C" RAJA::util::PluginStrategy* getPlugin() { return new TimerPlugin; }
4444

4545
// Statically loading plugin.
46-
static RAJA::util::PluginRegistry::add<TimerPlugin> P("Timer",
47-
"Prints elapsed time of "
48-
"kernel executions.");
46+
static RAJA::util::PluginRegistry::add<TimerPlugin> P("Timer", "Prints elapsed "
47+
"time of "
48+
"kernel "
49+
"executions.");

examples/red-black-gauss-seidel.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ struct grid_s {
6464
double solution(double x, double y);
6565
void computeErr(double* I, grid_s grid);
6666
RAJA::TypedIndexSet<RAJA::ListSegment> gsColorPolicy(
67-
int N,
68-
camp::resources::Resource res);
67+
int N, camp::resources::Resource res);
6968

7069
int main(int RAJA_UNUSED_ARG(argc), char** RAJA_UNUSED_ARG(argv[]))
7170
{
@@ -171,8 +170,7 @@ int main(int RAJA_UNUSED_ARG(argc), char** RAJA_UNUSED_ARG(argv[]))
171170
// Set.
172171

173172
RAJA::TypedIndexSet<RAJA::ListSegment> gsColorPolicy(
174-
int N,
175-
camp::resources::Resource res)
173+
int N, camp::resources::Resource res)
176174
{
177175
RAJA::TypedIndexSet<RAJA::ListSegment> colorSet;
178176

examples/resource-dynamic-forall.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,15 @@
2727
void checkResult(int* res, int len);
2828
void printResult(int* res, int len);
2929

30-
using policy_list = camp::list<RAJA::seq_exec,
31-
RAJA::simd_exec
30+
using policy_list = camp::list<RAJA::seq_exec, RAJA::simd_exec
3231
#if defined(RAJA_ENABLE_CUDA)
3332
,
34-
RAJA::cuda_exec<256>,
35-
RAJA::cuda_exec<512>
33+
RAJA::cuda_exec<256>, RAJA::cuda_exec<512>
3634
#endif
3735

3836
#if defined(RAJA_ENABLE_HIP)
3937
,
40-
RAJA::hip_exec<256>,
41-
RAJA::hip_exec<512>
38+
RAJA::hip_exec<256>, RAJA::hip_exec<512>
4239
#endif
4340
>;
4441

examples/tut_halo-exchange.cpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ const int num_neighbors = 26;
5757
// Functions for checking and printing results
5858
//
5959
void checkResult(std::vector<double*> const& vars,
60-
std::vector<double*> const& vars_ref,
61-
int var_size,
60+
std::vector<double*> const& vars_ref, int var_size,
6261
int num_vars);
6362
void printResult(std::vector<double*> const& vars, int var_size, int num_vars);
6463

@@ -67,12 +66,10 @@ void printResult(std::vector<double*> const& vars, int var_size, int num_vars);
6766
//
6867
void create_pack_lists(std::vector<int*>& pack_index_lists,
6968
std::vector<int>& pack_index_list_lengths,
70-
const int halo_width,
71-
const int* grid_dims);
69+
const int halo_width, const int* grid_dims);
7270
void create_unpack_lists(std::vector<int*>& unpack_index_lists,
7371
std::vector<int>& unpack_index_list_lengths,
74-
const int halo_width,
75-
const int* grid_dims);
72+
const int halo_width, const int* grid_dims);
7673
void destroy_pack_lists(std::vector<int*>& pack_index_lists);
7774
void destroy_unpack_lists(std::vector<int*>& unpack_index_lists);
7875

@@ -1758,8 +1755,7 @@ int main(int argc, char** argv)
17581755
// Function to compare result to reference and report P/F.
17591756
//
17601757
void checkResult(std::vector<double*> const& vars,
1761-
std::vector<double*> const& vars_ref,
1762-
int var_size,
1758+
std::vector<double*> const& vars_ref, int var_size,
17631759
int num_vars)
17641760
{
17651761
bool correct = true;
@@ -1809,8 +1805,7 @@ struct Extent {
18091805
//
18101806
void create_pack_lists(std::vector<int*>& pack_index_lists,
18111807
std::vector<int>& pack_index_list_lengths,
1812-
const int halo_width,
1813-
const int* grid_dims)
1808+
const int halo_width, const int* grid_dims)
18141809
{
18151810
std::vector<Extent> pack_index_list_extents(num_neighbors);
18161811

@@ -2026,8 +2021,7 @@ void destroy_pack_lists(std::vector<int*>& pack_index_lists)
20262021
//
20272022
void create_unpack_lists(std::vector<int*>& unpack_index_lists,
20282023
std::vector<int>& unpack_index_list_lengths,
2029-
const int halo_width,
2030-
const int* grid_dims)
2024+
const int halo_width, const int* grid_dims)
20312025
{
20322026
std::vector<Extent> unpack_index_list_extents(num_neighbors);
20332027

exercises/sort.cpp

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,14 @@
6161
template <typename Function, typename T>
6262
void checkUnstableSortResult(const T* in, const T* out, int N);
6363
template <typename Function, typename T, typename U>
64-
void checkUnstableSortResult(const T* in,
65-
const T* out,
66-
const U* in_vals,
67-
const U* out_vals,
68-
int N);
64+
void checkUnstableSortResult(const T* in, const T* out, const U* in_vals,
65+
const U* out_vals, int N);
6966
//
7067
template <typename Function, typename T>
7168
void checkStableSortResult(const T* in, const T* out, int N);
7269
template <typename Function, typename T, typename U>
73-
void checkStableSortResult(const T* in,
74-
const T* out,
75-
const U* in_vals,
76-
const U* out_vals,
77-
int N);
70+
void checkStableSortResult(const T* in, const T* out, const U* in_vals,
71+
const U* out_vals, int N);
7872
//
7973
template <typename T>
8074
void printArray(const T* k, int N);
@@ -493,11 +487,8 @@ void checkUnstableSortResult(const T* in, const T* out, int N)
493487
}
494488

495489
template <typename Comparator, typename T, typename U>
496-
void checkUnstableSortResult(const T* in,
497-
const T* out,
498-
const U* in_vals,
499-
const U* out_vals,
500-
int N)
490+
void checkUnstableSortResult(const T* in, const T* out, const U* in_vals,
491+
const U* out_vals, int N)
501492
{
502493
Comparator comp;
503494
bool correct = true;
@@ -622,11 +613,8 @@ void checkStableSortResult(const T* in, const T* out, int N)
622613
}
623614

624615
template <typename Comparator, typename T, typename U>
625-
void checkStableSortResult(const T* in,
626-
const T* out,
627-
const U* in_vals,
628-
const U* out_vals,
629-
int N)
616+
void checkStableSortResult(const T* in, const T* out, const U* in_vals,
617+
const U* out_vals, int N)
630618
{
631619
Comparator comp;
632620
bool correct = true;

exercises/sort_solution.cpp

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,14 @@ constexpr int HIP_BLOCK_SIZE = 16;
6161
template <typename Function, typename T>
6262
void checkUnstableSortResult(const T* in, const T* out, int N);
6363
template <typename Function, typename T, typename U>
64-
void checkUnstableSortResult(const T* in,
65-
const T* out,
66-
const U* in_vals,
67-
const U* out_vals,
68-
int N);
64+
void checkUnstableSortResult(const T* in, const T* out, const U* in_vals,
65+
const U* out_vals, int N);
6966
//
7067
template <typename Function, typename T>
7168
void checkStableSortResult(const T* in, const T* out, int N);
7269
template <typename Function, typename T, typename U>
73-
void checkStableSortResult(const T* in,
74-
const T* out,
75-
const U* in_vals,
76-
const U* out_vals,
77-
int N);
70+
void checkStableSortResult(const T* in, const T* out, const U* in_vals,
71+
const U* out_vals, int N);
7872
//
7973
template <typename T>
8074
void printArray(const T* k, int N);
@@ -455,11 +449,8 @@ void checkUnstableSortResult(const T* in, const T* out, int N)
455449
}
456450

457451
template <typename Comparator, typename T, typename U>
458-
void checkUnstableSortResult(const T* in,
459-
const T* out,
460-
const U* in_vals,
461-
const U* out_vals,
462-
int N)
452+
void checkUnstableSortResult(const T* in, const T* out, const U* in_vals,
453+
const U* out_vals, int N)
463454
{
464455
Comparator comp;
465456
bool correct = true;
@@ -584,11 +575,8 @@ void checkStableSortResult(const T* in, const T* out, int N)
584575
}
585576

586577
template <typename Comparator, typename T, typename U>
587-
void checkStableSortResult(const T* in,
588-
const T* out,
589-
const U* in_vals,
590-
const U* out_vals,
591-
int N)
578+
void checkStableSortResult(const T* in, const T* out, const U* in_vals,
579+
const U* out_vals, int N)
592580
{
593581
Comparator comp;
594582
bool correct = true;

0 commit comments

Comments
 (0)