LLZK 2.1.1
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Array.cpp File Reference
#include "llzk-c/Dialect/Array.h"
#include "llzk-c/Support.h"
#include "llzk/CAPI/Builder.h"
#include "llzk/CAPI/Support.h"
#include "llzk/Dialect/Array/IR/Ops.h"
#include "llzk/Dialect/Array/IR/Types.h"
#include "llzk/Dialect/Array/Transforms/TransformationPasses.h"
#include <mlir-c/BuiltinAttributes.h>
#include <mlir-c/IR.h>
#include <mlir-c/Pass.h>
#include <mlir/CAPI/IR.h>
#include <mlir/CAPI/Pass.h>
#include <mlir/CAPI/Registration.h>
#include <mlir/CAPI/Wrap.h>
#include "llzk/Dialect/Array/IR/Ops.capi.cpp.inc"
#include "llzk/Dialect/Array/IR/Types.capi.cpp.inc"
#include "llzk/Dialect/Array/Transforms/TransformationPasses.capi.cpp.inc"
Include dependency graph for Array.cpp:

Go to the source code of this file.

Functions

MlirType llzkArray_ArrayTypeGetWithDims (MlirType elementType, intptr_t nDims, MlirAttribute const *dims)
 Creates an llzk::array::ArrayType using a list of attributes as dimensions.
MlirType llzkArray_ArrayTypeGetWithShape (MlirType elementType, intptr_t nDims, int64_t const *dims)
 Creates an llzk::array::ArrayType using a list of numbers as dimensions.
 LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (Array, CreateArrayOp, WithValues, MlirType arrayType, intptr_t nValues, MlirValue const *values)
 LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (Array, CreateArrayOp, WithMapOperands, MlirType arrayType, LlzkAffineMapOperandsBuilder mapOperands)

Function Documentation

◆ LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD() [1/2]

LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD ( Array ,
CreateArrayOp ,
WithMapOperands ,
MlirType arrayType,
LlzkAffineMapOperandsBuilder mapOperands )

Definition at line 73 of file Array.cpp.

◆ LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD() [2/2]

LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD ( Array ,
CreateArrayOp ,
WithValues ,
MlirType arrayType,
intptr_t nValues,
MlirValue const * values )

Definition at line 61 of file Array.cpp.

◆ llzkArray_ArrayTypeGetWithDims()

MlirType llzkArray_ArrayTypeGetWithDims ( MlirType type,
intptr_t nDims,
MlirAttribute const * dims )

Creates an llzk::array::ArrayType using a list of attributes as dimensions.

It can only be instantiated with the following element types:

  • Any LLZK type other than an ArrayType (i.e., arrays cannot be nested)
  • IndexType
  • Unsigned integers of 1 bit (aka booleans)

The dimensions of the array are specified using a list of attributes, one per dimension. Each attribute must be one of the following:

  • IntegerAttr (with IndexType), specifying a fixed dimension size
  • SymbolRefAttr, specifying a dimension size defined by a struct parameter or global constant
  • AffineMapAttr, specifying a dimension size computed from surrounding loop induction variables

Definition at line 47 of file Array.cpp.

◆ llzkArray_ArrayTypeGetWithShape()

MlirType llzkArray_ArrayTypeGetWithShape ( MlirType elementType,
intptr_t nDims,
int64_t const * dims )

Creates an llzk::array::ArrayType using a list of numbers as dimensions.

Definition at line 53 of file Array.cpp.