To make TensorExp clearer, this change refactors the e0/e1 fields into a union: e0/e1 for a binary op tensor expression, and tensor_num for a tensor-kinded tensor expression.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h | ||
---|---|---|
55–61 | can we make this an anonymous struct, defined inline, so that at least we don't need the xxx.params.yyy everywhere? |
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h | ||
---|---|---|
32 | also, just call this tensor (the _ in the name is against our style, but the use of just tensor is also consistent with comments and code elsewhere) |
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h | ||
---|---|---|
55–61 | I would remove this comment completely, since that is true for all fields of this struct You have adequate comments inside the union |
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h | ||
---|---|---|
55–61 | assuming clang tidy accepts this, this will need to move up in the struct (or perhaps even outside for readability), since within classes/structs, typedefs should go first |
also, just call this tensor
(the _ in the name is against our style, but the use of just tensor is also consistent with comments and code elsewhere)