MLIR  16.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 numDimLevelTypes, MlirSparseTensorDimLevelType const *dimLevelTypes, MlirAffineMap dimOrdering, int pointerBitWidth, int indexBitWidth)
 
MlirAffineMap mlirSparseTensorEncodingAttrGetDimOrdering (MlirAttribute attr)
 Returns the dimension ordering in a sparse_tensor.encoding attribute. More...
 
intptr_t mlirSparseTensorEncodingGetNumDimLevelTypes (MlirAttribute attr)
 Returns the number of dim level types in a sparse_tensor.encoding attribute. More...
 
MlirSparseTensorDimLevelType mlirSparseTensorEncodingAttrGetDimLevelType (MlirAttribute attr, intptr_t pos)
 Returns a specified dim level type in a sparse_tensor.encoding attribute. More...
 
int mlirSparseTensorEncodingAttrGetPointerBitWidth (MlirAttribute attr)
 Returns the pointer bit width in a sparse_tensor.encoding attribute. More...
 
int mlirSparseTensorEncodingAttrGetIndexBitWidth (MlirAttribute attr)
 Returns the index bit width in a 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 31 of file SparseTensor.cpp.

References unwrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ MlirSparseTensorDimLevelType()

◆ mlirSparseTensorEncodingAttrGet()

MlirAttribute mlirSparseTensorEncodingAttrGet ( MlirContext  ctx,
intptr_t  numDimLevelTypes,
MlirSparseTensorDimLevelType const *  dimLevelTypes,
MlirAffineMap  dimOrdering,
int  pointerBitWidth,
int  indexBitWidth 
)

Definition at line 35 of file SparseTensor.cpp.

References unwrap(), and wrap().

◆ mlirSparseTensorEncodingAttrGetDimLevelType()

MlirSparseTensorDimLevelType mlirSparseTensorEncodingAttrGetDimLevelType ( MlirAttribute  attr,
intptr_t  pos 
)

Returns a specified dim level type in a sparse_tensor.encoding attribute.

Definition at line 58 of file SparseTensor.cpp.

References unwrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ mlirSparseTensorEncodingAttrGetDimOrdering()

MlirAffineMap mlirSparseTensorEncodingAttrGetDimOrdering ( MlirAttribute  attr)

Returns the dimension ordering in a sparse_tensor.encoding attribute.

Definition at line 49 of file SparseTensor.cpp.

References unwrap(), and wrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ mlirSparseTensorEncodingAttrGetIndexBitWidth()

int mlirSparseTensorEncodingAttrGetIndexBitWidth ( MlirAttribute  attr)

Returns the index bit width in a sparse_tensor.encoding attribute.

Definition at line 67 of file SparseTensor.cpp.

References unwrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ mlirSparseTensorEncodingAttrGetPointerBitWidth()

int mlirSparseTensorEncodingAttrGetPointerBitWidth ( MlirAttribute  attr)

Returns the pointer bit width in a sparse_tensor.encoding attribute.

Definition at line 63 of file SparseTensor.cpp.

References unwrap().

Referenced by populateDialectSparseTensorSubmodule().

◆ mlirSparseTensorEncodingGetNumDimLevelTypes()

intptr_t mlirSparseTensorEncodingGetNumDimLevelTypes ( MlirAttribute  attr)

Returns the number of dim level types in a sparse_tensor.encoding attribute.

Definition at line 53 of file SparseTensor.cpp.

References unwrap().

Referenced by populateDialectSparseTensorSubmodule().