@@ -136,21 +136,20 @@ class SparseIterator {
136
136
//
137
137
138
138
// Whether the iterator support random access (i.e., support look up by
139
- // *coordinate*). A random access iterator must also traverses a dense
140
- // space.
139
+ // *coordinate*). A random access iterator must also traverses a dense space.
141
140
virtual bool randomAccessible () const = 0;
142
141
143
142
// Whether the iterator can simply traversed by a for loop.
144
143
virtual bool iteratableByFor () const { return false ; };
145
144
146
- // Get the upper bound of the sparse space that the iterator might visited.
147
- // A sparse space is a subset of a dense space [0, bound), this function
148
- // returns *bound*.
145
+ // Get the upper bound of the sparse space that the iterator might visited. A
146
+ // sparse space is a subset of a dense space [0, bound), this function returns
147
+ // *bound*.
149
148
virtual Value upperBound (OpBuilder &b, Location l) const = 0;
150
149
151
- // Serializes and deserializes the current status to/from a set of values.
152
- // The ValueRange should contain values that are sufficient to recover the
153
- // current iterating postion (i.e., itVals) as well as loop bound.
150
+ // Serializes and deserializes the current status to/from a set of values. The
151
+ // ValueRange should contain values that are sufficient to recover the current
152
+ // iterating postion (i.e., itVals) as well as loop bound.
154
153
//
155
154
// Not every type of iterator supports the operations, e.g., non-empty
156
155
// subsection iterator does not because the the number of non-empty
@@ -227,8 +226,8 @@ class SparseIterator {
227
226
// yield it
228
227
//
229
228
// The function is virtual to allow alternative implementation. For example,
230
- // if it.next() is trivial to compute, we can use a select operation
231
- // instead. E.g.,
229
+ // if it.next() is trivial to compute, we can use a select operation instead.
230
+ // E.g.,
232
231
//
233
232
// it = select cond ? it+1 : it
234
233
virtual ValueRange forwardIf (OpBuilder &b, Location l, Value cond);
@@ -260,12 +259,12 @@ class SparseIterator {
260
259
// A range of value that together defines the current state of the
261
260
// iterator. Only loop variants should be included.
262
261
//
263
- // For trivial iterators, it is the position; for dedup iterators, it
264
- // consists of the positon and the segment high, for non-empty subsection
265
- // iterator, it is the metadata that specifies the subsection. Note that the
266
- // wrapped iterator shares the same storage to maintain itVals with it
267
- // wrapper, which means the wrapped iterator might only own a subset of all
268
- // the values stored in itValStorage.
262
+ // For trivial iterators, it is the position; for dedup iterators, it consists
263
+ // of the positon and the segment high, for non-empty subsection iterator, it
264
+ // is the metadata that specifies the subsection.
265
+ // Note that the wrapped iterator shares the same storage to maintain itVals
266
+ // with it wrapper, which means the wrapped iterator might only own a subset
267
+ // of all the values stored in itValStorage.
269
268
const unsigned cursorValsCnt;
270
269
SmallVectorImpl<Value> &cursorValsStorageRef;
271
270
};
0 commit comments