MLIR  16.0.0git
SparseTensor.h
Go to the documentation of this file.
1 //===- SparseTensor.h - Sparse tensor dialect -------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef MLIR_DIALECT_SPARSETENSOR_IR_SPARSETENSOR_H_
10 #define MLIR_DIALECT_SPARSETENSOR_IR_SPARSETENSOR_H_
11 
12 #include "mlir/IR/BuiltinTypes.h"
13 #include "mlir/IR/Dialect.h"
14 #include "mlir/IR/OpDefinition.h"
16 #include "mlir/IR/TensorEncoding.h"
19 
20 #define GET_ATTRDEF_CLASSES
21 #include "mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.h.inc"
22 
23 #define GET_OP_CLASSES
24 #include "mlir/Dialect/SparseTensor/IR/SparseTensorOps.h.inc"
25 
26 #include "mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.h.inc"
27 
28 namespace mlir {
29 namespace sparse_tensor {
30 /// Convenience method to get a sparse encoding attribute from a type.
31 /// Returns null-attribute for any type without an encoding.
32 SparseTensorEncodingAttr getSparseTensorEncoding(Type type);
33 } // namespace sparse_tensor
34 } // namespace mlir
35 
36 #endif // MLIR_DIALECT_SPARSETENSOR_IR_SPARSETENSOR_H_
Include the generated interface declarations.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
Definition: Types.h:72
SparseTensorEncodingAttr getSparseTensorEncoding(Type type)
Convenience method to get a sparse encoding attribute from a type.