[Mlir-commits] [mlir] [mlir][TilingInterface] NFC code changes separated out from introduction of `scf::tileUsingSCFForallop`. (PR #67081)
    lorenzo chelini 
    llvmlistbot at llvm.org
       
    Fri Sep 22 05:48:14 PDT 2023
    
    
  
================
@@ -55,6 +55,30 @@ fillInterchangeVector(ArrayRef<int64_t> interchangeVector,
   return filledVector;
 }
 
+/// Convert a list of ops of type `SrcOpTy` to list of `Operation *`.
+template <typename SrcOpTy>
+static SmallVector<Operation *> getAsOperations(ArrayRef<SrcOpTy> ops) {
+  return llvm::to_vector(
+      llvm::map_range(ops, [](auto op) -> Operation * { return op; }));
+}
+template <typename SrcOpTy>
+static SmallVector<Operation *>
+getAsOperations(const SmallVector<SrcOpTy> &ops) {
+  return getAsOperations(ArrayRef<SrcOpTy>(ops));
+}
+
+/// Convert a list of `Operation *` to a list of `DstOpTy`
----------------
chelini wrote:
nit: "." at the end of the sentence.
https://github.com/llvm/llvm-project/pull/67081
    
    
More information about the Mlir-commits
mailing list