diff --git a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp --- a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp +++ b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp @@ -129,25 +129,29 @@ template struct mlir::linalg::GenerateLoopNest; template struct mlir::linalg::GenerateLoopNest; +namespace mlir { +namespace linalg { /// Specialization of loop nest generator for scf.parallel loops to handle /// iterator types that are not parallel. These are generated as sequential /// loops. template <> -void mlir::linalg::GenerateLoopNest::doit( - MutableArrayRef allIvs, ArrayRef loopRanges, - ArrayRef iteratorTypes, std::function fun) { +void GenerateLoopNest::doit(MutableArrayRef allIvs, + ArrayRef loopRanges, + ArrayRef iteratorTypes, + std::function fun) { edsc::GenericLoopNestRangeBuilder(allIvs, loopRanges)(fun); } template <> -void mlir::linalg::GenerateLoopNest::doit( - MutableArrayRef allIvs, ArrayRef loopRanges, - ArrayRef iteratorTypes, std::function fun) { +void GenerateLoopNest::doit(MutableArrayRef allIvs, + ArrayRef loopRanges, + ArrayRef iteratorTypes, + std::function fun) { edsc::GenericLoopNestRangeBuilder(allIvs, loopRanges)(fun); } template <> -void mlir::linalg::GenerateLoopNest::doit( +void GenerateLoopNest::doit( MutableArrayRef allIvs, ArrayRef loopRanges, ArrayRef iteratorTypes, std::function fun) { // Check if there is nothing to do here. This is also the recursion @@ -190,3 +194,5 @@ allIvs.take_front(nOuterPar), loopRanges.take_front(nOuterPar), iteratorTypes.take_front(nOuterPar), nestedFn); } +} // namespace linalg +} // namespace mlir