Class InputType
Defined in File DFGTypes.h.inc
Inheritance Relationships
Base Type
public mlir::Type::TypeBase< InputType, ::mlir::Type, detail::InputTypeStorage, ::mlir::dfg::TypeInterface::Trait >
Class Documentation
-
class InputType : public mlir::Type::TypeBase<InputType, ::mlir::Type, detail::InputTypeStorage, ::mlir::dfg::TypeInterface::Trait>
Public Functions
-
void print(::mlir::AsmPrinter &odsPrinter) const
Prints an InputType 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 InputType get(::mlir::MLIRContext *context, ::llvm::ArrayRef<int64_t> shape, Type elementType)
-
static InputType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::llvm::ArrayRef<int64_t> shape, Type elementType)
-
static InputType get(Type elementType)
Creates an InputType for a scalar element type with no shape dimensions.
This is the simplest form of InputType where the channel carries a single scalar value of the given
elementType. Equivalent to calling InputType::get({}, elementType).
-
static InputType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, Type elementType)
-
static InputType get(ArrayRef<int64_t> shape, Type elementType)
Creates an InputType 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 InputType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ArrayRef<int64_t> shape, Type elementType)
-
static InputType get(ShapedType shapedType)
Creates an InputType from an existing ShapedType.
Convenience builder that decomposes
shapedTypeinto its shape and scalar element type, then constructs the corresponding InputType. Useful when adapting memref or tensor types to DFG channel types.
-
static InputType 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 InputType.
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()
-
void print(::mlir::AsmPrinter &odsPrinter) const