[Mlir-commits] [mlir] [mlir][sparse] cleanup of enums header (PR #71090)
Peiming Liu
llvmlistbot at llvm.org
Thu Nov 2 11:36:29 PDT 2023
================
@@ -295,6 +281,17 @@ constexpr bool is2OutOf4DLT(DimLevelType dlt) {
static_cast<uint8_t>(DimLevelType::TwoOutOfFour);
}
+/// Check if the `DimLevelType` needs positions array.
+constexpr bool isDLTWithPos(DimLevelType dlt) {
+ return isLooseCompressedDLT(dlt) || isCompressedDLT(dlt);
+}
+
+/// Check if the `DimLevelType` needs coordinates array.
+constexpr bool isDLTWithCrd(DimLevelType dlt) {
+ return isSingletonDLT(dlt) || isLooseCompressedDLT(dlt) ||
+ isCompressedDLT(dlt);
+}
+
----------------
PeimingLiu wrote:
2OutOf4 also have crd, right?
https://github.com/llvm/llvm-project/pull/71090
More information about the Mlir-commits
mailing list