[Mlir-commits] [mlir] [mlir][sparse] cleanup of enums header (PR #71090)
Aart Bik
llvmlistbot at llvm.org
Thu Nov 2 11:37:48 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);
+}
+
----------------
aartbik wrote:
Good point!
https://github.com/llvm/llvm-project/pull/71090
More information about the Mlir-commits
mailing list