File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
mlir/include/mlir-c/Dialect Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 12
12
13
13
#include "mlir-c/AffineMap.h"
14
14
#include "mlir-c/IR.h"
15
+ #include <assert.h>
15
16
16
17
#ifdef __cplusplus
17
18
extern "C" {
@@ -25,7 +26,11 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(SparseTensor, sparse_tensor);
25
26
/// These correspond to SparseTensorEncodingAttr::LevelType in the C++ API.
26
27
/// If updating, keep them in sync and update the static_assert in the impl
27
28
/// file.
28
- enum MlirSparseTensorLevelType {
29
+
30
+ #pragma GCC diagnostic push
31
+ #pragma GCC diagnostic ignored "-Wfixed-enum-extension"
32
+
33
+ enum MlirSparseTensorLevelType : uint64_t {
29
34
MLIR_SPARSE_TENSOR_LEVEL_DENSE = 0x000000010000 ,
30
35
MLIR_SPARSE_TENSOR_LEVEL_COMPRESSED = 0x000000020000 ,
31
36
MLIR_SPARSE_TENSOR_LEVEL_COMPRESSED_NU = 0x000000020001 ,
@@ -42,6 +47,11 @@ enum MlirSparseTensorLevelType {
42
47
MLIR_SPARSE_TENSOR_LEVEL_N_OUT_OF_M = 0x000000100000 ,
43
48
};
44
49
50
+ static_assert ((sizeof (enum MlirSparseTensorLevelType ) == 8 ),
51
+ "MlirSparseTensorLevelType must be 8 bytes" );
52
+
53
+ #pragma GCC diagnostic pop
54
+
45
55
//===----------------------------------------------------------------------===//
46
56
// SparseTensorEncodingAttr
47
57
//===----------------------------------------------------------------------===//
You can’t perform that action at this time.
0 commit comments