MLIR  17.0.0git
Functions
SparseTensor.cpp File Reference
#include "mlir-c/Dialect/SparseTensor.h"
#include "mlir-c/IR.h"
#include "mlir/CAPI/AffineMap.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
#include "mlir/Support/LLVM.h"
+ Include dependency graph for SparseTensor.cpp:

Go to the source code of this file.

Functions

 MLIR_DEFINE_CAPI_DIALECT_REGISTRATION (SparseTensor, sparse_tensor, mlir::sparse_tensor::SparseTensorDialect) static_assert(static_cast< int >(MLIR_SPARSE_TENSOR_DIM_LEVEL_DENSE)
 
 MlirSparseTensorDimLevelType (C-API) and DimLevelType(C++) mismatch")
 
bool mlirAttributeIsASparseTensorEncodingAttr (MlirAttribute attr)
 Checks whether the given attribute is a sparse_tensor.encoding attribute. More...
 
MlirAttribute mlirSparseTensorEncodingAttrGet (MlirContext ctx, intptr_t lvlRank, MlirSparseTensorDimLevelType const *dimLevelTypes, MlirAffineMap dimOrdering, MlirAffineMap higherOrdering, int posWidth, int crdWidth)
 
MlirAffineMap mlirSparseTensorEncodingAttrGetDimOrdering (MlirAttribute attr)
 Returns the dimension-ordering of the sparse_tensor.encoding attribute. More...
 
MlirAffineMap mlirSparseTensorEncodingAttrGetHigherOrdering (MlirAttribute attr)
 Returns the higher-ordering of the sparse_tensor.encoding attribute. More...
 
intptr_t mlirSparseTensorEncodingGetLvlRank (MlirAttribute attr)
 Returns the level-rank of the sparse_tensor.encoding attribute. More...
 
MlirSparseTensorDimLevelType mlirSparseTensorEncodingAttrGetDimLevelType (MlirAttribute attr, intptr_t lvl)
 Returns a specified level-type of the sparse_tensor.encoding attribute. More...
 
int mlirSparseTensorEncodingAttrGetPosWidth (MlirAttribute attr)
 Returns the position bitwidth of the sparse_tensor.encoding attribute. More...
 
int mlirSparseTensorEncodingAttrGetCrdWidth (MlirAttribute attr)
 Returns the coordinate bitwidth of the sparse_tensor.encoding attribute. More...
 

Function Documentation

◆ MLIR_DEFINE_CAPI_DIALECT_REGISTRATION()

MLIR_DEFINE_CAPI_DIALECT_REGISTRATION ( SparseTensor  ,
sparse_tensor  ,
mlir::sparse_tensor::SparseTensorDialect   
)

◆ mlirAttributeIsASparseTensorEncodingAttr()

bool mlirAttributeIsASparseTensorEncodingAttr ( MlirAttribute  attr)

Checks whether the given attribute is a sparse_tensor.encoding attribute.

Definition at line 44 of file SparseTensor.cpp.

References unwrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ MlirSparseTensorDimLevelType()

◆ mlirSparseTensorEncodingAttrGet()

MlirAttribute mlirSparseTensorEncodingAttrGet ( MlirContext  ctx,
intptr_t  lvlRank,
MlirSparseTensorDimLevelType const *  dimLevelTypes,
MlirAffineMap  dimOrdering,
MlirAffineMap  higherOrdering,
int  posWidth,
int  crdWidth 
)

Definition at line 48 of file SparseTensor.cpp.

References unwrap(), and wrap().

◆ mlirSparseTensorEncodingAttrGetCrdWidth()

int mlirSparseTensorEncodingAttrGetCrdWidth ( MlirAttribute  attr)

Returns the coordinate bitwidth of the sparse_tensor.encoding attribute.

Definition at line 86 of file SparseTensor.cpp.

References unwrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ mlirSparseTensorEncodingAttrGetDimLevelType()

MlirSparseTensorDimLevelType mlirSparseTensorEncodingAttrGetDimLevelType ( MlirAttribute  attr,
intptr_t  lvl 
)

Returns a specified level-type of the sparse_tensor.encoding attribute.

Definition at line 77 of file SparseTensor.cpp.

References unwrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ mlirSparseTensorEncodingAttrGetDimOrdering()

MlirAffineMap mlirSparseTensorEncodingAttrGetDimOrdering ( MlirAttribute  attr)

Returns the dimension-ordering of the sparse_tensor.encoding attribute.

Definition at line 62 of file SparseTensor.cpp.

References unwrap(), and wrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ mlirSparseTensorEncodingAttrGetHigherOrdering()

MlirAffineMap mlirSparseTensorEncodingAttrGetHigherOrdering ( MlirAttribute  attr)

Returns the higher-ordering of the sparse_tensor.encoding attribute.

Definition at line 67 of file SparseTensor.cpp.

References unwrap(), and wrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ mlirSparseTensorEncodingAttrGetPosWidth()

int mlirSparseTensorEncodingAttrGetPosWidth ( MlirAttribute  attr)

Returns the position bitwidth of the sparse_tensor.encoding attribute.

Definition at line 82 of file SparseTensor.cpp.

References unwrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ mlirSparseTensorEncodingGetLvlRank()

intptr_t mlirSparseTensorEncodingGetLvlRank ( MlirAttribute  attr)

Returns the level-rank of the sparse_tensor.encoding attribute.

Definition at line 72 of file SparseTensor.cpp.

References unwrap().

Referenced by populateDialectSparseTensorSubmodule().