Skip to content

Commit fdf3d93

Browse files
committed
Wsign-compare
1 parent e194457 commit fdf3d93

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

include/osp/bsp/model/BspSchedule.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class BspSchedule : public IBspSchedule<Graph_t>, public IBspScheduleEval<Graph_
237237
*/
238238
void updateNumberOfSupersteps() {
239239
number_of_supersteps = 0;
240-
for (unsigned i = 0; i < instance->numberOfVertices(); ++i) {
240+
for (vertex_idx_t<Graph_t> i = 0; i < instance->numberOfVertices(); ++i) {
241241
if (node_to_superstep_assignment[i] >= number_of_supersteps) {
242242
number_of_supersteps = node_to_superstep_assignment[i] + 1;
243243
}
@@ -327,7 +327,7 @@ class BspSchedule : public IBspSchedule<Graph_t>, public IBspScheduleEval<Graph_
327327

328328
number_of_supersteps = 0;
329329

330-
for (unsigned i = 0; i < instance->numberOfVertices(); ++i) {
330+
for (vertex_idx_t<Graph_t> i = 0; i < instance->numberOfVertices(); ++i) {
331331

332332
if (vec[i] >= number_of_supersteps) {
333333
number_of_supersteps = vec[i] + 1;
@@ -550,8 +550,8 @@ class BspSchedule : public IBspSchedule<Graph_t>, public IBspScheduleEval<Graph_
550550
*/
551551
inline bool satisfiesPrecedenceConstraints() const {
552552

553-
if (node_to_processor_assignment.size() != instance->numberOfVertices() ||
554-
node_to_superstep_assignment.size() != instance->numberOfVertices()) {
553+
if (static_cast<vertex_idx_t<Graph_t>>(node_to_processor_assignment.size()) != instance->numberOfVertices() ||
554+
static_cast<vertex_idx_t<Graph_t>>(node_to_superstep_assignment.size()) != instance->numberOfVertices()) {
555555
return false;
556556
}
557557

include/osp/bsp/model/VectorSchedule.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class VectorSchedule : public IBspSchedule<Graph_t> {
5858
node_to_superstep_assignment =
5959
std::vector<unsigned>(schedule.getInstance().numberOfVertices(), schedule.numberOfSupersteps());
6060

61-
for (unsigned i = 0; i < schedule.getInstance().numberOfVertices(); i++) {
61+
for (vertex_idx_t<Graph_t> i = 0; i < schedule.getInstance().numberOfVertices(); i++) {
6262

6363
node_to_processor_assignment[i] = schedule.assignedProcessor(i);
6464
node_to_superstep_assignment[i] = schedule.assignedSuperstep(i);
@@ -78,7 +78,7 @@ class VectorSchedule : public IBspSchedule<Graph_t> {
7878
std::vector<unsigned>(instance->numberOfVertices(), instance->numberOfProcessors());
7979
node_to_superstep_assignment = std::vector<unsigned>(instance->numberOfVertices(), number_of_supersteps);
8080

81-
for (unsigned i = 0; i < instance->numberOfVertices(); i++) {
81+
for (vertex_idx_t<Graph_t> i = 0; i < instance->numberOfVertices(); i++) {
8282
node_to_processor_assignment[i] = other.assignedProcessor(i);
8383
node_to_superstep_assignment[i] = other.assignedSuperstep(i);
8484
}

include/osp/bsp/scheduler/Serial.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class Serial : public Scheduler<Graph_t> {
101101
}
102102
}
103103

104-
size_t scheduled_nodes_count = 0;
104+
vertex_idx_t<Graph_t> scheduled_nodes_count = 0;
105105
unsigned current_superstep = 0;
106106

107107
while (scheduled_nodes_count < num_vertices) {

0 commit comments

Comments
 (0)