|
LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
|
Public Member Functions | |
| std::optional<::llvm::SmallVector<::mlir::ArrayAttr > > | getSubelementIndices () const |
| Return a list of all valid indices for this ArrayType. | |
| bool | hasRank () const |
| Returns if this type is ranked, i.e., it has a known number of dimensions. | |
| ::mlir::Type | getSelectionType (size_t numIndices) const |
| Return the type produced by selecting/removing numIndices leading dimensions. | |
| ArrayType | cloneWith (std::optional<::llvm::ArrayRef< int64_t > > shape, ::mlir::Type elementType) const |
| Clone this type with the given shape and element type. | |
| ArrayType | cloneWith (::mlir::Type elementType, std::optional<::llvm::ArrayRef<::mlir::Attribute > > dimensions=std::nullopt) const |
| Clone this type with the given dimensions and element type. | |
| void | print (::mlir::AsmPrinter &odsPrinter) const |
| ::mlir::Type | getElementType () const |
| ::llvm::ArrayRef<::mlir::Attribute > | getDimensionSizes () const |
| ::llvm::ArrayRef< int64_t > | getShape () const |
| ::std::optional<::llvm::DenseMap<::mlir::Attribute, ::mlir::Type > > | getSubelementIndexMap () const |
| Required by DestructurableTypeInterface / SROA pass. | |
| ::mlir::Type | getTypeAtIndex (::mlir::Attribute index) const |
| Required by DestructurableTypeInterface / SROA pass. | |
Static Public Member Functions | |
| static ArrayType | get (::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes) |
| static ArrayType | getChecked (::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes) |
| static ArrayType | get (::mlir::Type elementType, ::llvm::ArrayRef< int64_t > shape) |
| static ArrayType | getChecked (::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef< int64_t > shape) |
| ::llvm::LogicalResult | verify (::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes, ::llvm::ArrayRef< int64_t > shape) |
| ::llvm::LogicalResult | verifyInvariants (::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes, ::llvm::ArrayRef< int64_t > shape) |
| static constexpr ::llvm::StringLiteral | getMnemonic () |
| ::mlir::Type | parse (::mlir::AsmParser &odsParser) |
Static Public Attributes | |
| static constexpr ::llvm::StringLiteral | name = "array.type" |
| static constexpr ::llvm::StringLiteral | dialectName = "array" |
Definition at line 23 of file Types.h.inc.
| ArrayType llzk::array::ArrayType::cloneWith | ( | ::mlir::Type | elementType, |
| std::optional<::llvm::ArrayRef<::mlir::Attribute > > | dimensions = std::nullopt ) const |
Clone this type with the given dimensions and element type.
If the provided dimensions are std::nullopt, the current dimensions of the type are used. Note: This is preferred over cloneWith(..int64_t..) because this Attribute version can carry more information than the int64_t which must default to kDynamic when the Attribute is anything other than an integer constant.
| ArrayType llzk::array::ArrayType::cloneWith | ( | std::optional<::llvm::ArrayRef< int64_t > > | shape, |
| ::mlir::Type | elementType ) const |
Clone this type with the given shape and element type.
If the provided shape is std::nullopt, the current shape of the type is used. Required by the ShapedTypeInterface interface.
|
static |
Definition at line 109 of file Types.cpp.inc.
|
static |
Definition at line 83 of file Types.cpp.inc.
|
static |
Definition at line 118 of file Types.cpp.inc.
|
static |
Definition at line 96 of file Types.cpp.inc.
| llvm::ArrayRef<::mlir::Attribute > llzk::array::ArrayType::getDimensionSizes | ( | ) | const |
Definition at line 203 of file Types.cpp.inc.
| mlir::Type llzk::array::ArrayType::getElementType | ( | ) | const |
Definition at line 199 of file Types.cpp.inc.
|
inlinestatic |
Definition at line 65 of file Types.h.inc.
| Type llzk::array::ArrayType::getSelectionType | ( | size_t | numIndices | ) | const |
| llvm::ArrayRef< int64_t > llzk::array::ArrayType::getShape | ( | ) | const |
Definition at line 207 of file Types.cpp.inc.
| std::optional< DenseMap< Attribute, Type > > llzk::array::ArrayType::getSubelementIndexMap | ( | ) | const |
| std::optional< SmallVector< ArrayAttr > > llzk::array::ArrayType::getSubelementIndices | ( | ) | const |
| Type llzk::array::ArrayType::getTypeAtIndex | ( | ::mlir::Attribute | index | ) | const |
|
inline |
Returns if this type is ranked, i.e., it has a known number of dimensions.
LLZK arrays are always ranked, i.e., the number of dimensions is known. Required by the ShapedTypeInterface interface.
Definition at line 38 of file Types.h.inc.
|
static |
Definition at line 133 of file Types.cpp.inc.
| void llzk::array::ArrayType::print | ( | ::mlir::AsmPrinter & | odsPrinter | ) | const |
Definition at line 185 of file Types.cpp.inc.
|
static |
|
static |
Definition at line 127 of file Types.cpp.inc.
|
static |
Definition at line 57 of file Types.h.inc.
|
static |
Definition at line 56 of file Types.h.inc.