diff options
| author | Justin Lebar <justin.lebar@gmail.com> | 2024-03-10 20:00:13 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-10 20:00:13 -0700 |
| commit | fab2bb8bfda865bd438dee981d7be7df8017b76d (patch) | |
| tree | 358f27c327a6eb2628f357f08910d3f6ee903ac9 /mlir/lib/Reducer | |
| parent | 6bec4fc76de50a090d1d0b36498da66c4a324851 (diff) | |
Add llvm::min/max_element and use it in llvm/ and mlir/ directories. (#84678)
For some reason this was missing from STLExtras.
Diffstat (limited to 'mlir/lib/Reducer')
| -rw-r--r-- | mlir/lib/Reducer/ReductionNode.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Reducer/ReductionNode.cpp b/mlir/lib/Reducer/ReductionNode.cpp index b4596419ed17..d57ee932bfca 100644 --- a/mlir/lib/Reducer/ReductionNode.cpp +++ b/mlir/lib/Reducer/ReductionNode.cpp @@ -74,8 +74,8 @@ ArrayRef<ReductionNode *> ReductionNode::generateNewVariants() { // the above example, we split the range {4, 9} into {4, 6}, {6, 9}, and // create two variants with range {{1, 3}, {4, 6}} and {{1, 3}, {6, 9}}. The // final ranges vector will be {{1, 3}, {4, 6}, {6, 9}}. - auto maxElement = std::max_element( - ranges.begin(), ranges.end(), [](const Range &lhs, const Range &rhs) { + auto maxElement = + llvm::max_element(ranges, [](const Range &lhs, const Range &rhs) { return (lhs.second - lhs.first) > (rhs.second - rhs.first); }); |
