Skip to content

Commit 9cae7d7

Browse files
author
Peiming Liu
committed
(possibly) fix build error.
1 parent 69f9d2c commit 9cae7d7

File tree

1 file changed

+3
-3
lines changed
  • mlir/include/mlir/Dialect/SparseTensor/IR

1 file changed

+3
-3
lines changed

mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ struct LevelType {
295295
}
296296

297297
/// Get the `LevelFormat` of the `LevelType`.
298-
LevelFormat getLvlFmt() const {
298+
constexpr LevelFormat getLvlFmt() const {
299299
return static_cast<LevelFormat>(lvlBits & 0xffff0000);
300300
}
301301

@@ -307,12 +307,12 @@ struct LevelType {
307307

308308
/// Check if the `LevelType` has the properties
309309
template <LevelPropNonDefault p>
310-
bool isa() const {
310+
constexpr bool isa() const {
311311
return lvlBits & static_cast<uint64_t>(p);
312312
}
313313

314314
/// Check if the `LevelType` needs positions array.
315-
bool isWithPosLT() const {
315+
constexpr bool isWithPosLT() const {
316316
return isa<LevelFormat::Compressed>() ||
317317
isa<LevelFormat::LooseCompressed>();
318318
}

0 commit comments

Comments
 (0)