[Mlir-commits] [mlir] [mlir][Linalg] Allow more control in drop unit dims (PR #170104)
Lukas Sommer
llvmlistbot at llvm.org
Wed Dec 3 09:03:27 PST 2025
sommerlukas wrote:
The rationale to put the partial (or in case of `collapseValueFn` and `expandValueFn`, full) implementation into the `.cpp` file was to avoid "polluting" the header with that code. If you think it would avoid confusion, I can move the entire default implementations into the lambda instead.
I chose to use `std::function`/lambdas because the existing `controlFn` also uses a lambda and, in general, the use of `std::function` to customize behavior seems quite common in this header, so I tried to follow the existing style.
What you have in mind would be more along the lines of class inheritance and overriding, with virtual or static polymorphism?
https://github.com/llvm/llvm-project/pull/170104
More information about the Mlir-commits
mailing list