Skip to content

Commit b7a0aba

Browse files
use typedef
1 parent 2b54da1 commit b7a0aba

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

mlir/include/mlir-c/Dialect/SparseTensor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include "mlir-c/AffineMap.h"
1414
#include "mlir-c/IR.h"
15-
#include <assert.h>
1615

1716
#ifdef __cplusplus
1817
extern "C" {

mlir/lib/CAPI/Dialect/SparseTensor.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ bool mlirAttributeIsASparseTensorEncodingAttr(MlirAttribute attr) {
5555
return isa<SparseTensorEncodingAttr>(unwrap(attr));
5656
}
5757

58-
MlirAttribute
59-
mlirSparseTensorEncodingAttrGet(MlirContext ctx, intptr_t lvlRank,
60-
MlirSparseTensorLevelType const *lvlTypes,
61-
MlirAffineMap dimToLvl, MlirAffineMap lvlToDim,
62-
int posWidth, int crdWidth) {
58+
MlirAttribute mlirSparseTensorEncodingAttrGet(MlirContext ctx, intptr_t lvlRank,
59+
level_type const *lvlTypes,
60+
MlirAffineMap dimToLvl,
61+
MlirAffineMap lvlToDim,
62+
int posWidth, int crdWidth) {
6363
SmallVector<LevelType> cppLvlTypes;
6464
cppLvlTypes.reserve(lvlRank);
6565
for (intptr_t l = 0; l < lvlRank; ++l)
@@ -81,9 +81,9 @@ intptr_t mlirSparseTensorEncodingGetLvlRank(MlirAttribute attr) {
8181
return cast<SparseTensorEncodingAttr>(unwrap(attr)).getLvlRank();
8282
}
8383

84-
MlirSparseTensorLevelType
85-
mlirSparseTensorEncodingAttrGetLvlType(MlirAttribute attr, intptr_t lvl) {
86-
return static_cast<MlirSparseTensorLevelType>(
84+
level_type mlirSparseTensorEncodingAttrGetLvlType(MlirAttribute attr,
85+
intptr_t lvl) {
86+
return static_cast<level_type>(
8787
cast<SparseTensorEncodingAttr>(unwrap(attr)).getLvlType(lvl));
8888
}
8989

0 commit comments

Comments
 (0)