[Mlir-commits] [mlir] [mlir][sparse] Introduce batch level format. (PR #83082)
Aart Bik
llvmlistbot at llvm.org
Mon Feb 26 15:38:57 PST 2024
================
@@ -154,12 +154,27 @@ enum class Action : uint32_t {
enum class LevelFormat : uint64_t {
Undef = 0x00000000,
Dense = 0x00010000,
- Compressed = 0x00020000,
- Singleton = 0x00040000,
- LooseCompressed = 0x00080000,
- NOutOfM = 0x00100000,
+ Batch = 0x00020000,
+ Compressed = 0x00040000,
+ Singleton = 0x00080000,
+ LooseCompressed = 0x00100000,
+ NOutOfM = 0x00200000,
};
+constexpr bool encPowOfTwo(LevelFormat fmt) {
+ auto enc = static_cast<std::underlying_type_t<LevelFormat>>(fmt);
+ // http://www.graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2
----------------
aartbik wrote:
remove this reference
anyone coding chess engines knows this trick ;-)
https://github.com/llvm/llvm-project/pull/83082
More information about the Mlir-commits
mailing list