Skip to content

Commit c723b84

Browse files
raphael-s-steinertonibohnleinpapp-pal-andras
authored
Clang tidy naming convention (#69)
* clang-tidy file * added regex exceptions to clang-tidy for std compatability * applied clang-tidy * coin flips * fixed divisors * concepts * PairHash * glob concepts replace * glob concepts replace * glob concepts replace * heaps fixed * intpower * iterators * glob numedges numVertices * permutations * setoperatiosn * glob vertex type * glob vertex weights * sorts and arrangements * glob edge weights * union find * glob edge source target access * cdag construction * graph algorithms visual, in/out_degree glob * graph algorithms * bsp model visual * concepts CamelCase * dotfile writeer * more concepts * concepts * instance, proc, steps glob * getarch, synch, comm glob * numberOfVertices. getinstance glob * parents, children glob * architecture * glob v_workw_t * glob work,mem * glob Graph_t, vertex_idx_t * misc * glob hash_combine * return status glob, removed kl * glob edge_desc_t * concepts * Graph_t_out, in vtype t glob * bsp sched file writer * dot graph reader * added static for compile time optimisation * hdag file reader * coarser stuff * mtx reader and writer * pebbling file writer * divisors * graph generators * misc * sptrsv * kl stuff * assigned superstep * assigned processor * getnum processor types * in degree * serial progress * setassigned processor * set assigned superstep * serial * set number of supersteps * scheduler * bsp_instance test build * ml coarse and schedule * satisfies precedence constraints * architecture test build * vertices * compute schedule * arch * kl_v2 -> kl * misc * misc * misc * misc * getstaleness * misc * misc * misc * architecture fixes * assigned processors * get Scheduler name * compute schedule CS * set auto communicate schedule * get coarser name * get comm schedule * sendCosts * send costs2 * to maxbsp converter * some greedt schedulers * partitioning * variance ssp * pebblingSchedule * misc * growlocal * copt comm * pebbling * partial ilp * improve schedule * total comm scheduler ilp * light edge variance * variance partitioner * graph_algorithms * glob constructComputationalDag * coarsers * Sarkar * glob csc/csr * coarser util * in out edges * edges * hashcombine * compdag vert impl T * vertex indx * dag_divider * add vertex * add edge * edge view * compact sparse graph * compact sparse graph edge descriptor * what a waste of time * read graph and architecture * coarser * graph type * ComputationalDagVectorImplDefUnsignedT * coarser * some setters * bsp schedule progress * fix * bsp schedule * read * bsp recompute * local search * bsp schedulers * hypergraphimpl * partitioning * compiling * boost graph int * graph generator * fix * subgraphs * graph tests * wave front divider * divide component * dag_divider * directed graph tests * misc * misc * subgraph * random graph gen * pebbling schedule * kl_util * orbit graph processor * kl_lambda * merkle hash * kl_total * Variance ssp * max bsp converter * iso mapper * iso subgraph * mckee * bsp mem schedulers * kl test * minor updates to tests * misc * kl_affinity_test * kl_bsp_cost * kl bsp improver test * kl mem constr * building * debug build * fix top order test * hill climbing * kl fix * stepbystep * hill climbing * hill climbing comm * extra tests * wavefrot scheduler fix * bug * fixed namespace * somefixes * kl move * step by step coarser * some fixes * more small fixes * small changes * small fix * small fix * small fix * update bool flags * bool flags update * bool flasg update * small fix * small fixes * small fixes * small fixes * progress ilps * small fixes * minor fixes * minor fix * minor fix * small fix * minor fix * ilp_pebbling_scheduler * ilp tests, removed run-clang-tidy * apply clang-format * removed duplicate lines * ilp files/tests fix --------- Co-authored-by: tonibohnlein <[email protected]> Co-authored-by: papp-pal-andras <[email protected]>
1 parent 95c5d77 commit c723b84

File tree

294 files changed

+36111
-42451
lines changed

Some content is hidden

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

294 files changed

+36111
-42451
lines changed

.clang-tidy

Lines changed: 87 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,101 @@
11
Checks: '-*,readability-identifier-naming'
22

33
CheckOptions:
4-
# 1. Member Variables: camelBack with a trailing underscore (e.g., memberVariableTest_)
5-
- key: readability-identifier-naming.MemberCase
4+
- key: readability-identifier-naming.AggressiveDependentMemberLookup
5+
value: 1
6+
7+
- key: readability-identifier-naming.AbstractClassCase
8+
value: CamelCase
9+
10+
- key: readability-identifier-naming.ClassCase
11+
value: CamelCase
12+
13+
- key: readability-identifier-naming.ClassConstexprCase
614
value: camelBack
7-
- key: readability-identifier-naming.MemberSuffix
15+
- key: readability-identifier-naming.ClassConstexprSuffix
16+
value: _
17+
18+
- key: readability-identifier-naming.ClassConstantCase
19+
value: camelBack
20+
- key: readability-identifier-naming.ClassConstantSuffix
21+
value: _
22+
23+
- key: readability-identifier-naming.ClassMemberCase
24+
value: camelBack
25+
- key: readability-identifier-naming.ClassMemberSuffix
826
value: _
927

10-
# 2. Functions: CamelCase (e.g., CalculateTotal)
28+
- key: readability-identifier-naming.ClassMethodCase
29+
value: CamelCase
30+
- key: readability-identifier-naming.ClassMethodIgnoredRegexp
31+
value: "^(begin|cbegin|end|cend|rbegin|crbegin|rend|crend|size|empty)$"
32+
33+
- key: readability-identifier-naming.EnumCase
34+
value: CamelCase
35+
36+
- key: readability-identifier-naming.EnumConstantCase
37+
value: UPPER_CASE
38+
1139
- key: readability-identifier-naming.FunctionCase
1240
value: CamelCase
1341

14-
# 3. Local Variables/Parameters: camelBack (e.g., totalValue)
15-
- key: readability-identifier-naming.VariableCase
42+
- key: readability-identifier-naming.GlobalConstexprVariableCase
43+
value: UPPER_CASE
44+
45+
- key: readability-identifier-naming.GlobalVariableCase
1646
value: camelBack
17-
- key: readability-identifier-naming.ParameterCase
47+
48+
- key: readability-identifier-naming.LocalVariableCase
1849
value: camelBack
1950

20-
# 4. Classes/Structs: CamelCase (e.g., MyClass)
21-
- key: readability-identifier-naming.ClassCase
51+
- key: readability-identifier-naming.MacroDefinitionCase
52+
value: UPPER_CASE
53+
54+
- key: readability-identifier-naming.MacroDefinitionIgnoredRegexp
55+
value: '^[A-Z]+(_[A-Z]+)*_$'
56+
57+
- key: readability-identifier-naming.MemberCase
58+
value: camelBack
59+
- key: readability-identifier-naming.MemberSuffix
60+
value: _
61+
62+
- key: readability-identifier-naming.MethodCase
2263
value: CamelCase
64+
- key: readability-identifier-naming.MethodIgnoredRegexp
65+
value: "^(begin|cbegin|end|cend|rbegin|crbegin|rend|crend|size|empty)$"
66+
67+
- key: readability-identifier-naming.NamespaceCase
68+
value: lower_case
69+
70+
- key: readability-identifier-naming.ParameterCase
71+
value: camelBack
72+
73+
- key: readability-identifier-naming.ScopedEnumConstantCase
74+
value: UPPER_CASE
75+
2376
- key: readability-identifier-naming.StructCase
24-
value: CamelCase
77+
value: CamelCase
78+
79+
- key: readability-identifier-naming.TemplateParameterCase
80+
value: CamelCase
81+
82+
# Includes the fix for std::iterator_traits compatibility
83+
- key: readability-identifier-naming.TypeAliasCase
84+
value: CamelCase
85+
- key: readability-identifier-naming.TypeAliasIgnoredRegexp
86+
value: "^(iterator_category|difference_type|value_type|pointer|reference|const_pointer|const_reference)$"
87+
88+
- key: readability-identifier-naming.TypedefCase
89+
value: CamelCase
90+
91+
- key: readability-identifier-naming.TypeTemplateParameterCase
92+
value: CamelCase
93+
94+
- key: readability-identifier-naming.ValueTemplateParameterCase
95+
value: camelBack
96+
97+
- key: readability-identifier-naming.VariableCase
98+
value: camelBack
99+
100+
- key: readability-identifier-naming.IgnoreMainLikeFunctions
101+
value: 1

apps/bsp_test_suite.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ limitations under the License.
2323
#include "osp/graph_implementations/adj_list_impl/computational_dag_edge_idx_vector_impl.hpp"
2424
#include "test_suite_runner/BspScheduleRecompTestSuiteRunner.hpp"
2525

26-
using graph_t = osp::computational_dag_edge_idx_vector_impl_def_int_t;
26+
using GraphT = osp::ComputationalDagEdgeIdxVectorImplDefIntT;
2727

2828
int main(int argc, char *argv[]) {
29-
osp::BspScheduleRecompTestSuiteRunner<graph_t> runner;
30-
return runner.run(argc, argv);
29+
osp::BspScheduleRecompTestSuiteRunner<GraphT> runner;
30+
return runner.Run(argc, argv);
3131

3232
return 0;
3333
}

apps/coarser_plotter.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,74 +26,74 @@ limitations under the License.
2626
#include "osp/graph_implementations/adj_list_impl/computational_dag_edge_idx_vector_impl.hpp"
2727

2828
using namespace osp;
29-
using Graph_t = computational_dag_edge_idx_vector_impl_def_int_t;
29+
using GraphT = ComputationalDagEdgeIdxVectorImplDefIntT;
3030

3131
int main(int argc, char *argv[]) {
3232
if (argc < 3) {
3333
std::cerr << "Usage: " << argv[0] << " <graph> <output file>\n" << std::endl;
3434
return 1;
3535
}
3636

37-
std::string graph_file = argv[1];
38-
std::string graph_name = graph_file.substr(graph_file.rfind("/") + 1, graph_file.rfind(".") - graph_file.rfind("/") - 1);
37+
std::string graphFile = argv[1];
38+
std::string graphName = graphFile.substr(graphFile.rfind("/") + 1, graphFile.rfind(".") - graphFile.rfind("/") - 1);
3939

40-
Graph_t graph;
41-
bool status = file_reader::readGraph(graph_file, graph);
40+
GraphT graph;
41+
bool status = file_reader::ReadGraph(graphFile, graph);
4242
if (!status) {
4343
std::cout << "Failed to read graph\n";
4444
return 1;
4545
}
4646

47-
SarkarParams::MulParameters<v_workw_t<Graph_t>> params;
48-
params.commCostVec = std::vector<v_workw_t<Graph_t>>({1, 2, 5, 10, 20, 50, 100, 200, 500, 1000});
49-
params.max_num_iteration_without_changes = 3;
50-
params.leniency = 0.005;
51-
params.maxWeight = 15000;
52-
params.smallWeightThreshold = 4000;
53-
params.buffer_merge_mode = SarkarParams::BufferMergeMode::FULL;
47+
sarkar_params::MulParameters<VWorkwT<GraphT>> params;
48+
params.commCostVec_ = std::vector<VWorkwT<GraphT>>({1, 2, 5, 10, 20, 50, 100, 200, 500, 1000});
49+
params.maxNumIterationWithoutChanges_ = 3;
50+
params.leniency_ = 0.005;
51+
params.maxWeight_ = 15000;
52+
params.smallWeightThreshold_ = 4000;
53+
params.bufferMergeMode_ = sarkar_params::BufferMergeMode::FULL;
5454

55-
SarkarMul<Graph_t, Graph_t> coarser;
56-
coarser.setParameters(params);
55+
SarkarMul<GraphT, GraphT> coarser;
56+
coarser.SetParameters(params);
5757

58-
Graph_t coarse_graph;
59-
std::vector<vertex_idx_t<Graph_t>> contraction_map;
58+
GraphT coarseGraph;
59+
std::vector<VertexIdxT<GraphT>> contractionMap;
6060

61-
Graph_t graph_copy = graph;
62-
bool ignore_vertex_types = false;
61+
GraphT graphCopy = graph;
62+
bool ignoreVertexTypes = false;
6363

64-
if (ignore_vertex_types) {
65-
for (const auto &vert : graph_copy.vertices()) {
66-
graph_copy.set_vertex_type(vert, 0);
64+
if (ignoreVertexTypes) {
65+
for (const auto &vert : graphCopy.Vertices()) {
66+
graphCopy.SetVertexType(vert, 0);
6767
}
6868
}
6969

70-
coarser.coarsenDag(graph_copy, coarse_graph, contraction_map);
70+
coarser.CoarsenDag(graphCopy, coarseGraph, contractionMap);
7171

72-
std::vector<unsigned> colours(contraction_map.size());
73-
for (std::size_t i = 0; i < contraction_map.size(); ++i) {
74-
colours[i] = static_cast<unsigned>(contraction_map[i]);
72+
std::vector<unsigned> colours(contractionMap.size());
73+
for (std::size_t i = 0; i < contractionMap.size(); ++i) {
74+
colours[i] = static_cast<unsigned>(contractionMap[i]);
7575
}
7676

77-
std::ofstream out_dot(argv[2]);
78-
if (!out_dot.is_open()) {
77+
std::ofstream outDot(argv[2]);
78+
if (!outDot.is_open()) {
7979
std::cout << "Unable to write/open output file.\n";
8080
return 1;
8181
}
8282

8383
DotFileWriter writer;
84-
writer.write_colored_graph(out_dot, graph, colours);
84+
writer.WriteColoredGraph(outDot, graph, colours);
8585

8686
if (argc >= 4) {
87-
std::ofstream coarse_out_dot(argv[3]);
88-
if (!coarse_out_dot.is_open()) {
87+
std::ofstream coarseOutDot(argv[3]);
88+
if (!coarseOutDot.is_open()) {
8989
std::cout << "Unable to write/open output file.\n";
9090
return 1;
9191
}
9292

93-
std::vector<unsigned> coarse_colours(coarse_graph.num_vertices());
94-
std::iota(coarse_colours.begin(), coarse_colours.end(), 0);
93+
std::vector<unsigned> coarseColours(coarseGraph.NumVertices());
94+
std::iota(coarseColours.begin(), coarseColours.end(), 0);
9595

96-
writer.write_colored_graph(coarse_out_dot, coarse_graph, coarse_colours);
96+
writer.WriteColoredGraph(coarseOutDot, coarseGraph, coarseColours);
9797
}
9898

9999
return 0;

0 commit comments

Comments
 (0)