LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
POD.h File Reference
#include "llzk-c/Support.h"
#include <mlir-c/BuiltinAttributes.h>
#include <mlir-c/IR.h>
#include <mlir-c/Support.h>
#include <stdint.h>
#include "llzk/Dialect/POD/IR/Attrs.capi.h.inc"
#include "llzk/Dialect/POD/IR/Ops.capi.h.inc"
#include "llzk/Dialect/POD/IR/Types.capi.h.inc"
Include dependency graph for POD.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LlzkRecordValue
 Information needed to define a pod RecordAttr given a name and a value that will be stored in the record. More...

Typedefs

typedef struct LlzkRecordValue LlzkRecordValue
 Information needed to define a pod RecordAttr given a name and a value that will be stored in the record.

Functions

 MLIR_DECLARE_CAPI_DIALECT_REGISTRATION (POD, llzk__pod)
 Get reference to the LLZK pod dialect.
MLIR_CAPI_EXPORTED MlirAttribute llzkPod_RecordAttrGetInferredContext (MlirIdentifier name, MlirType type)
 Creates a new llzk::pod::RecordAttr using the MlirContext of the given type.
MLIR_CAPI_EXPORTED MlirType llzkPod_PodTypeGetFromInitialValues (MlirContext context, intptr_t nRecords, LlzkRecordValue const *records)
 Creates an llzk::pod::PodType using a list of values for inferring the records.
MLIR_CAPI_EXPORTED void llzkPod_PodTypeGetRecords (MlirType type, MlirAttribute *dst)
 Writes the records into the given array that must have been previously allocated with enough space.
MLIR_CAPI_EXPORTED MlirType llzkPod_PodTypeLookupRecord (MlirType type, MlirStringRef name)
 Lookups a record type by name.
MLIR_CAPI_EXPORTED MlirType llzkPod_PodTypeLookupRecordWithinLocation (MlirType type, MlirStringRef name, MlirLocation loc)
 Lookups a record type by name.
MLIR_CAPI_EXPORTED MlirType llzkPod_PodTypeLookupRecordWithinOperation (MlirType type, MlirStringRef name, MlirOperation op)
 Lookups a record type by name.
 LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD (Pod, NewPodOp, InferredFromInitialValues, intptr_t nValues, LlzkRecordValue const *values)
 Creates a NewPodOp from a list of initialization values.
 LLZK_DECLARE_OP_BUILD_METHOD (Pod, NewPodOp, MlirType type, intptr_t nValues, LlzkRecordValue const *values)
 Creates a NewPodOp from a list of initialization values and a PodType.
 LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD (Pod, NewPodOp, WithMapOperands, MlirType type, intptr_t nValues, LlzkRecordValue const *values, LlzkAffineMapOperandsBuilder mapOperands)
 Creates a NewPodOp with a list of initialization values, a PodType, and map operands.

Typedef Documentation

◆ LlzkRecordValue

typedef struct LlzkRecordValue LlzkRecordValue

Information needed to define a pod RecordAttr given a name and a value that will be stored in the record.

Function Documentation

◆ LLZK_DECLARE_OP_BUILD_METHOD()

LLZK_DECLARE_OP_BUILD_METHOD ( Pod ,
NewPodOp ,
MlirType type,
intptr_t nValues,
LlzkRecordValue const * values )

Creates a NewPodOp from a list of initialization values and a PodType.

The initial values can partially initialize the struct.

◆ LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD() [1/2]

LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD ( Pod ,
NewPodOp ,
InferredFromInitialValues ,
intptr_t nValues,
LlzkRecordValue const * values )

Creates a NewPodOp from a list of initialization values.

The type of the struct gets inferred from the initial values.

◆ LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD() [2/2]

LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD ( Pod ,
NewPodOp ,
WithMapOperands ,
MlirType type,
intptr_t nValues,
LlzkRecordValue const * values,
LlzkAffineMapOperandsBuilder mapOperands )

Creates a NewPodOp with a list of initialization values, a PodType, and map operands.

The initial values can partially initialize the struct.

◆ llzkPod_PodTypeGetFromInitialValues()

MLIR_CAPI_EXPORTED MlirType llzkPod_PodTypeGetFromInitialValues ( MlirContext context,
intptr_t nRecords,
LlzkRecordValue const * records )

Creates an llzk::pod::PodType using a list of values for inferring the records.

Definition at line 69 of file POD.cpp.

◆ llzkPod_PodTypeGetRecords()

MLIR_CAPI_EXPORTED void llzkPod_PodTypeGetRecords ( MlirType type,
MlirAttribute * dst )

Writes the records into the given array that must have been previously allocated with enough space.

See llzkPod_PodTypeGetRecordsCount

Definition at line 76 of file POD.cpp.

◆ llzkPod_PodTypeLookupRecord()

MLIR_CAPI_EXPORTED MlirType llzkPod_PodTypeLookupRecord ( MlirType type,
MlirStringRef name )

Lookups a record type by name.

If the record is not found reports an error without any location information and the returned type is NULL.

Definition at line 95 of file POD.cpp.

◆ llzkPod_PodTypeLookupRecordWithinLocation()

MLIR_CAPI_EXPORTED MlirType llzkPod_PodTypeLookupRecordWithinLocation ( MlirType type,
MlirStringRef name,
MlirLocation loc )

Lookups a record type by name.

If the record is not found reports an error at the given location information and the returned type is NULL.

Definition at line 104 of file POD.cpp.

◆ llzkPod_PodTypeLookupRecordWithinOperation()

MLIR_CAPI_EXPORTED MlirType llzkPod_PodTypeLookupRecordWithinOperation ( MlirType type,
MlirStringRef name,
MlirOperation op )

Lookups a record type by name.

If the record is not found reports an error using the given operation for location information and the returned type is NULL.

Definition at line 112 of file POD.cpp.

◆ llzkPod_RecordAttrGetInferredContext()

MLIR_CAPI_EXPORTED MlirAttribute llzkPod_RecordAttrGetInferredContext ( MlirIdentifier name,
MlirType type )

Creates a new llzk::pod::RecordAttr using the MlirContext of the given type.

Definition at line 60 of file POD.cpp.

◆ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION()

MLIR_DECLARE_CAPI_DIALECT_REGISTRATION ( POD ,
llzk__pod  )

Get reference to the LLZK pod dialect.