Skip to content

Commit d510fbc

Browse files
committed
update
1 parent 69f80eb commit d510fbc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/osp/auxiliary/permute.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void permute_inplace(std::vector<T> &vec, std::vector<Ind> &perm) {
4040
}
4141
return true;
4242
}());
43-
assert((void *)&vec != (void *)&perm);
43+
assert(reinterpret_cast<void*>(&vec) != reinterpret_cast<void*>(&perm));
4444

4545
for (Ind i = 0; i < perm.size(); ++i) {
4646
while (perm[i] != i) {
@@ -66,7 +66,7 @@ void inverse_permute_inplace(std::vector<T> &vec, std::vector<Ind> &perm) {
6666
}
6767
return true;
6868
}());
69-
assert((void *)&vec != (void *)&perm);
69+
assert(reinterpret_cast<void*>(&vec) != reinterpret_cast<void*>(&perm));
7070

7171
for (Ind i = 0; i < perm.size(); ++i) {
7272

include/osp/bsp/scheduler/MultilevelCoarseAndSchedule.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ RETURN_STATUS MultilevelCoarseAndSchedule<Graph_t, Graph_t_coarse>::improve_acti
122122

123123
template<typename Graph_t, typename Graph_t_coarse>
124124
RETURN_STATUS MultilevelCoarseAndSchedule<Graph_t, Graph_t_coarse>::expand_active_schedule() {
125-
assert((active_graph > 0L) && ( (long unsigned) active_graph < ml_coarser->dag_history.size()));
125+
assert((active_graph > 0L) && ( static_cast<long unsigned>(active_graph) < ml_coarser->dag_history.size()));
126126

127127
std::unique_ptr< BspInstance<Graph_t_coarse> > expanded_instance = std::make_unique< BspInstance<Graph_t_coarse> >( *(ml_coarser->dag_history.at( static_cast<std::size_t>(active_graph) - 1 )), original_inst->getArchitecture());
128128
std::unique_ptr< BspSchedule<Graph_t_coarse> > expanded_schedule = std::make_unique< BspSchedule<Graph_t_coarse> >( *expanded_instance );
@@ -175,7 +175,7 @@ RETURN_STATUS MultilevelCoarseAndSchedule<Graph_t, Graph_t_coarse>::expand_activ
175175

176176
template<typename Graph_t, typename Graph_t_coarse>
177177
RETURN_STATUS MultilevelCoarseAndSchedule<Graph_t, Graph_t_coarse>::run_expansions(BspSchedule<Graph_t>& schedule) {
178-
assert(active_graph >= 0L && (long unsigned) active_graph == ml_coarser->dag_history.size() - 1);
178+
assert(active_graph >= 0L && static_cast<long unsigned>(active_graph) == ml_coarser->dag_history.size() - 1);
179179

180180
RETURN_STATUS status = RETURN_STATUS::OSP_SUCCESS;
181181

0 commit comments

Comments
 (0)