Skip to content

Commit b59be37

Browse files
committed
update
1 parent e01468a commit b59be37

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

include/osp/bsp/model/BspInstance.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class BspInstance {
150150
*/
151151
inline Graph_t &getComputationalDag() { return cdag; }
152152

153-
inline std::size_t numberOfVertices() const { return cdag.num_vertices(); }
153+
inline vertex_idx_t<Graph_t> numberOfVertices() const { return cdag.num_vertices(); }
154154

155155
inline auto vertices() const { return cdag.vertices(); }
156156

include/osp/coarser/coarser_util.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ invert_vertex_expansion_map(const std::vector<std::vector<vertex_idx_t<Graph_t_i
419419
std::vector<vertex_idx_t<Graph_t_out>> vertex_contraction_map(num_vert);
420420
for (std::size_t i = 0; i < vertex_expansion_map.size(); i++) {
421421
for (const vertex_idx_t<Graph_t_in> &vert : vertex_expansion_map[i]) {
422-
vertex_contraction_map[vert] = i;
422+
vertex_contraction_map[vert] = static_cast<vertex_idx_t<Graph_t_out>>(i);
423423
}
424424
}
425425

include/osp/dag_divider/isomorphism_divider/MerkleHashComputer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class MerkleHashComputer : public HashComputer<vertex_idx_t<Graph_t>> {
6262
std::sort(parent_child_hashes.begin(),parent_child_hashes.end());
6363

6464
std::size_t hash = node_hash_func(v);
65-
for (const VertexType& pc_hash : parent_child_hashes) {
65+
for (const auto& pc_hash : parent_child_hashes) {
6666
hash_combine(hash, pc_hash);
6767
}
6868

include/osp/graph_implementations/adj_list_impl/computational_dag_edge_idx_vector_impl.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ class computational_dag_edge_idx_vector_impl {
149149

150150
virtual ~computational_dag_edge_idx_vector_impl() = default;
151151

152-
inline vertex_idx num_edges() const { return edges_.size(); }
153-
inline vertex_idx num_vertices() const { return vertices_.size(); }
152+
inline vertex_idx num_edges() const { return static_cast<vertex_idx>(edges_.size()); }
153+
inline vertex_idx num_vertices() const { return static_cast<vertex_idx>(vertices_.size()); }
154154

155155
inline auto edges() const { return edge_range_vector_impl<ThisT>(*this); }
156156

@@ -162,8 +162,8 @@ class computational_dag_edge_idx_vector_impl {
162162
inline const std::vector<directed_edge_descriptor> &in_edges(vertex_idx v) const { return in_edges_[v]; }
163163
inline const std::vector<directed_edge_descriptor> &out_edges(vertex_idx v) const { return out_edges_[v]; }
164164

165-
inline vertex_idx in_degree(vertex_idx v) const { return in_edges_[v].size(); }
166-
inline vertex_idx out_degree(vertex_idx v) const { return out_edges_[v].size(); }
165+
inline vertex_idx in_degree(vertex_idx v) const { return static_cast<vertex_idx>(in_edges_[v].size()); }
166+
inline vertex_idx out_degree(vertex_idx v) const { return static_cast<vertex_idx>(out_edges_[v].size()); }
167167

168168
inline edge_comm_weight_type edge_comm_weight(directed_edge_descriptor e) const {
169169
return edges_[e.idx].comm_weight;

include/osp/graph_implementations/adj_list_impl/computational_dag_vector_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ class computational_dag_vector_impl {
125125

126126
inline const std::vector<vertex_idx> &children(const vertex_idx v) const { return out_neigbors[v]; }
127127

128-
inline vertex_idx in_degree(const vertex_idx v) const { return in_neigbors[v].size(); }
128+
inline vertex_idx in_degree(const vertex_idx v) const { return static_cast<vertex_idx>(in_neigbors[v].size()); }
129129

130-
inline vertex_idx out_degree(const vertex_idx v) const { return out_neigbors[v].size(); }
130+
inline vertex_idx out_degree(const vertex_idx v) const { return static_cast<vertex_idx>(out_neigbors[v].size()); }
131131

132132
inline vertex_work_weight_type vertex_work_weight(const vertex_idx v) const { return vertices_[v].work_weight; }
133133

include/osp/graph_implementations/adj_list_impl/dag_vector_adapter.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ class dag_vector_adapter {
137137

138138
inline auto children(const vertex_idx v) const { return vector_cast_view<index_t, vertex_idx>(out_neigbors->at(v)); }
139139

140-
inline std::size_t in_degree(const vertex_idx v) const { return in_neigbors->at(v).size(); }
140+
inline vertex_idx in_degree(const vertex_idx v) const { return static_cast<vertex_idx>(in_neigbors->at(v).size()); }
141141

142-
inline std::size_t out_degree(const vertex_idx v) const { return out_neigbors->at(v).size(); }
142+
inline vertex_idx out_degree(const vertex_idx v) const { return static_cast<vertex_idx>(out_neigbors->at(v).size()); }
143143

144144
inline vertex_work_weight_type vertex_work_weight(const vertex_idx v) const { return vertices_[v].work_weight; }
145145

tests/graph_vector_adapter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(test_dag_vector_adapter) {
7979

8080
auto partition = iso_scheduler.compute_partition(instance);
8181

82-
graph_t corase_graph;
82+
graph_constr_t corase_graph;
8383
coarser_util::construct_coarse_dag(instance.getComputationalDag(), corase_graph, partition);
8484
bool acyc = is_acyclic(corase_graph);
8585
BOOST_CHECK(acyc);

0 commit comments

Comments
 (0)