18#include <mlir/CAPI/IR.h>
19#include <mlir/CAPI/Pass.h>
20#include <mlir/CAPI/Registration.h>
21#include <mlir/CAPI/Wrap.h>
23#include <mlir-c/Pass.h>
40MlirType
llzkArrayTypeGet(MlirType elementType, intptr_t nDims, MlirAttribute const *dims) {
41 SmallVector<Attribute> dimsSto;
42 return wrap(
ArrayType::get(unwrap(elementType), unwrapList(nDims, dims, dimsSto)));
47 return wrap(
ArrayType::get(unwrap(elementType), ArrayRef(dims, nDims)));
69 CreateArrayOp, WithValues, MlirType arrayType, intptr_t nValues, MlirValue
const *values
71 SmallVector<Value> valueSto;
74 ValueRange(unwrapList(nValues, values, valueSto))
79 CreateArrayOp, WithMapOperands, MlirType arrayType, intptr_t nMapOperands,
91 CreateArrayOp, WithMapOperandsAndDims, MlirType arrayType, intptr_t nMapOperands,
92 MlirValueRange const *mapOperands, intptr_t nNumsDimsPerMap, int32_t
const *numDimsPerMap
97 ArrayRef(numDimsPerMap, nNumsDimsPerMap)
MlirAttribute llzkArrayTypeGetDim(MlirType type, intptr_t idx)
Returns the n-th dimention of an llzk::array::ArrayType.
bool llzkTypeIsAArrayType(MlirType type)
intptr_t llzkArrayTypeGetNumDims(MlirType type)
Returns the number of dimensions of an llzk::array::ArrayType.
MlirType llzkArrayTypeGetWithNumericDims(MlirType elementType, intptr_t nDims, int64_t const *dims)
Creates an llzk::array::ArrayType using a list of numbers as dimensions.
MlirType llzkArrayTypeGetElementType(MlirType type)
Returns the element type of an llzk::array::ArrayType.
MlirType llzkArrayTypeGet(MlirType elementType, intptr_t nDims, MlirAttribute const *dims)
Creates an llzk::array::ArrayType using a list of attributes as dimensions.
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Polymorphic, llzk__polymorphic, llzk::polymorphic::PolymorphicDialect) MlirType llzkTypeVarTypeGet(MlirContext ctx
Helper for unwrapping the C arguments for the map operands.
static ArrayType get(::mlir::Type elementType, ::llvm::ArrayRef<::mlir::Attribute > dimensionSizes)
#define LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD(op, suffix,...)
void registerTransformationPasses()
mlir::Operation * create(MlirOpBuilder cBuilder, MlirLocation cLocation, Args &&...args)
Creates a new operation using an ODS build method.
auto unwrap_cast(auto &from)