Class OutputType
Defined in File DFGTypes.h.inc
Inheritance Relationships
Base Type
public mlir::Type::TypeBase< OutputType, ::mlir::Type, detail::OutputTypeStorage, ::mlir::dfg::TypeInterface::Trait >
Class Documentation
-
class OutputType : public mlir::Type::TypeBase<OutputType, ::mlir::Type, detail::OutputTypeStorage, ::mlir::dfg::TypeInterface::Trait>
Public Functions
-
void print(::mlir::AsmPrinter &odsPrinter) const
Prints an OutputType in its assembly format
<[shape x] type>.Emits
<, the dimension list (omitting the trailingxfor scalar types), the element type, and>.
-
::llvm::ArrayRef<int64_t> getShape() const
-
Type getElementType() const
Public Static Functions
-
static OutputType get(::mlir::MLIRContext *context, ::llvm::ArrayRef<int64_t> shape, Type elementType)
-
static OutputType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::llvm::ArrayRef<int64_t> shape, Type elementType)
-
static OutputType get(Type elementType)
Creates an OutputType for a scalar element type with no shape dimensions.
This is the simplest form of OutputType where the channel carries a single scalar value of the given
elementType. Equivalent to calling OutputType::get({}, elementType).
-
static OutputType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, Type elementType)
-
static OutputType get(ArrayRef<int64_t> shape, Type elementType)
Creates an OutputType with an explicit shape and element type.
The
shapedefines the number of elements along each dimension. All dimensions must be static (non-negative). Pass an empty shape for a scalar channel.
-
static OutputType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ArrayRef<int64_t> shape, Type elementType)
-
static OutputType get(ShapedType shapedType)
Creates an OutputType from an existing ShapedType.
Convenience builder that decomposes
shapedTypeinto its shape and scalar element type, then constructs the corresponding OutputType. Useful when adapting memref or tensor types to DFG channel types.
-
static OutputType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ShapedType shapedType)
-
static ::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::llvm::ArrayRef<int64_t> shape, Type elementType)
Verifies the invariants of an OutputType.
Checks that
elementTypeis a scalar (not a ShapedType) and that every dimension inshapeis non-negative (i.e. static).
-
static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::llvm::ArrayRef<int64_t> shape, Type elementType)
-
static inline constexpr ::llvm::StringLiteral getMnemonic()
-
static ::mlir::Type parse(::mlir::AsmParser &odsParser)
Parses an OutputType from its assembly format
<[shape x] type>.Expects a
<delimiter, an optional dimension list (e.g.2x3x), a scalar element type, and a closing>. Returns an empty Type on any parse failure.
-
void print(::mlir::AsmPrinter &odsPrinter) const