Skip to content

Commit

Permalink
Switch to using c++14 feature with auto in lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
erwei-xilinx committed Jan 23, 2025
1 parent 29be78b commit a39857a
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions mlir/lib/Util/Dependency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,17 +963,11 @@ getAllReadAccessedMemrefOperandsFromOp(Operation *op) {
std::get<2>(entry.second) = strides;
return entry;
};
auto pushMemrefEntryToVector =
[](std::pair<Value, std::tuple<SmallVector<Value>, SmallVector<Value>,
SmallVector<Value>>>
entry,
SmallVector<
std::pair<Value, std::tuple<SmallVector<Value>, SmallVector<Value>,
SmallVector<Value>>>> &vector) {
if (!isa<MemRefType>(entry.first.getType()))
return;
vector.push_back(entry);
};
auto pushMemrefEntryToVector = [](auto entry, auto &vector) {
if (!isa<MemRefType>(entry.first.getType()))
return;
vector.push_back(entry);
};
// Below is an incomplete list of common mlir ops that provide interfaces
// allowing for separating read and write accesses in its operands.
if (auto linalgop = dyn_cast<linalg::LinalgOp>(op)) {
Expand Down

0 comments on commit a39857a

Please sign in to comment.