Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
again bonus points for having a nice test
| mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp | ||
|---|---|---|
| 283 | Now that this has become more complex, let's also remove the rather expensive % operator i = i == 0 ? be - 1 : i -1; It probably also improves readability if you reverse the roles of b and i, since we always use "b" in the indexing, see e.g. L274 | |
| mlir/unittests/Dialect/SparseTensor/MergerTest.cpp | ||
| 412 | period at end | |
Now that this has become more complex, let's also remove the rather expensive % operator
Why not simply start i = be - 1 -offset in the loop header
and then at the end do
i = i == 0 ? be - 1 : i -1;
It probably also improves readability if you reverse the roles of b and i, since we always use "b" in the indexing, see e.g. L274