[Mlir-commits] [mlir] [mlir][vector] Make the in_bounds attribute mandatory (PR #97049)

Han-Chung Wang llvmlistbot at llvm.org
Thu Jul 11 10:05:03 PDT 2024


================
@@ -187,6 +187,22 @@ bool AffineMap::isMinorIdentityWithBroadcasting(
   return true;
 }
 
+SmallVector<unsigned> AffineMap::getBroadcastDims() const {
+  SmallVector<unsigned> broadcastedDims = {};
+  for (const auto &idxAndExpr : llvm::enumerate(getResults())) {
+    unsigned resIdx = idxAndExpr.index();
+    AffineExpr expr = idxAndExpr.value();
----------------
hanhanW wrote:

nit: can we use structured binding declaration here?

```suggestion
  for (const auto &[resIdx, expr]: llvm::enumerate(getResults())) {
```

https://github.com/llvm/llvm-project/pull/97049


More information about the Mlir-commits mailing list