Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit c30d850

Browse files
author
Sven Verdoolaege
committed
ScheduleTreeElemBand::drop: change type of position and number to size_t
This is a more natural type for a position and a number.
1 parent 5389454 commit c30d850

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tc/core/polyhedral/schedule_tree_elem.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ size_t ScheduleTreeElemBand::nOuterCoincident() const {
151151
return i;
152152
}
153153

154-
void ScheduleTreeElemBand::drop(int pos, int n) {
155-
CHECK_LE(0, n) << "range out of bounds";
156-
CHECK_LE(0, pos) << "range out of bounds";
154+
void ScheduleTreeElemBand::drop(size_t pos, size_t n) {
155+
CHECK_LE(0u, n) << "range out of bounds";
156+
CHECK_LE(0u, pos) << "range out of bounds";
157157
CHECK_GE(nMember(), pos + n) << "range out of bounds";
158158
int nBegin = nMember();
159159

tc/core/polyhedral/schedule_tree_elem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ struct ScheduleTreeElemBand : public ScheduleTreeElemBase {
270270
// We apply the transformation even if "n" is zero to ensure consistent
271271
// behavior with respect to changes in the schedule space.
272272
// The caller is responsible for updating the isolate option (Note: why?)
273-
void drop(int pos, int n);
273+
void drop(size_t pos, size_t n);
274274

275275
public:
276276
bool permutable_{false};

0 commit comments

Comments
 (0)