|
LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
|
#include "llzk-c/Dialect/Felt.h"#include "llzk-c/Dialect/LLZK.h"#include "llzk/CAPI/Support.h"#include "llzk/Dialect/Felt/IR/Attrs.h"#include "llzk/Dialect/Felt/IR/Dialect.h"#include "llzk/Dialect/Felt/IR/Ops.h"#include "llzk/Dialect/Felt/IR/Types.h"#include "llzk/Dialect/LLZK/IR/AttributeHelper.h"#include "llzk/Util/DynamicAPIntHelper.h"#include <mlir/CAPI/Registration.h>#include <mlir/CAPI/Wrap.h>#include "llzk/Dialect/Felt/IR/Attrs.capi.cpp.inc"#include "llzk/Dialect/Felt/IR/Ops.capi.cpp.inc"#include "llzk/Dialect/Felt/IR/Types.capi.cpp.inc"Go to the source code of this file.
Functions | |
| MlirAttribute | llzkFelt_FeltConstAttrGetFromInt64 (MlirContext ctx, int64_t value, MlirType type) |
| Creates a llzk::felt::FeltConstAttr from a signed 64-bit integer in the specified field. | |
| MlirAttribute | llzkFelt_FeltConstAttrGetFromInt64InField (MlirContext ctx, int64_t value, MlirStringRef fieldName) |
| Creates a llzk::felt::FeltConstAttr from a signed 64-bit integer in the specified field. | |
| MlirAttribute | llzkFelt_FeltConstAttrGetFromInt64Unspecified (MlirContext ctx, int64_t value) |
| Creates a llzk::felt::FeltConstAttr from a signed 64-bit integer in an unspecified field. | |
| MlirAttribute | llzkFelt_FeltConstAttrGetFromString (MlirContext ctx, MlirStringRef str, MlirType type) |
| Creates a llzk::felt::FeltConstAttr from a base-10 representation of a signed integer in the specified field. | |
| MlirAttribute | llzkFelt_FeltConstAttrGetFromStringInField (MlirContext ctx, MlirStringRef str, MlirStringRef fieldName) |
| Creates a llzk::felt::FeltConstAttr from a base-10 representation of a signed integer in the specified field. | |
| MlirAttribute | llzkFelt_FeltConstAttrGetFromStringUnspecified (MlirContext ctx, MlirStringRef str) |
| Creates a llzk::felt::FeltConstAttr from a base-10 representation of a signed integer in an unspecified field. | |
| MlirAttribute | llzkFelt_FeltConstAttrGetFromParts (MlirContext ctx, const uint64_t *parts, intptr_t nParts, MlirType type) |
| Creates a llzk::felt::FeltConstAttr from 64-bit parts in LSB order. | |
| MlirAttribute | llzkFelt_FeltConstAttrGetFromPartsInField (MlirContext ctx, const uint64_t *parts, intptr_t nParts, MlirStringRef fieldName) |
| Creates a llzk::felt::FeltConstAttr from 64-bit parts in LSB order. | |
| MlirAttribute | llzkFelt_FeltConstAttrGetFromPartsUnspecified (MlirContext ctx, const uint64_t *parts, intptr_t nParts) |
| Creates a llzk::felt::FeltConstAttr from 64-bit parts in LSB order. | |
| MlirAttribute | llzkFelt_FieldSpecAttrGetFromString (MlirContext ctx, MlirIdentifier fieldName, MlirStringRef primeStr) |
| Creates a llzk::felt::FieldSpecAttr from a base-10 representation of the prime. | |
| MlirAttribute | llzkFelt_FieldSpecAttrGetFromParts (MlirContext ctx, MlirIdentifier fieldName, const uint64_t *parts, intptr_t nParts) |
| Creates a llzk::felt::FieldSpecAttr from 64-bit parts in LSB order. | |
| MlirType | llzkFelt_FeltTypeGetUnspecified (MlirContext ctx) |
| Gets the llzk::felt::FeltType without the field specified. | |
| MlirType | llzkFelt_FeltTypeGetFromRef (MlirContext ctx, MlirStringRef fieldName) |
| Gets a llzk::felt::FeltType referring to an already defined field. | |
| MlirAttribute llzkFelt_FeltConstAttrGetFromInt64 | ( | MlirContext | ctx, |
| int64_t | value, | ||
| MlirType | type ) |
Creates a llzk::felt::FeltConstAttr from a signed 64-bit integer in the specified field.
The provided MlirType must be a llzk::felt::FeltType.
| MlirAttribute llzkFelt_FeltConstAttrGetFromInt64InField | ( | MlirContext | ctx, |
| int64_t | value, | ||
| MlirStringRef | fieldName ) |
| MlirAttribute llzkFelt_FeltConstAttrGetFromInt64Unspecified | ( | MlirContext | ctx, |
| int64_t | value ) |
| MlirAttribute llzkFelt_FeltConstAttrGetFromParts | ( | MlirContext | ctx, |
| const uint64_t * | parts, | ||
| intptr_t | nParts, | ||
| MlirType | type ) |
Creates a llzk::felt::FeltConstAttr from 64-bit parts in LSB order.
The most significant bit is treated as the sign bit. The value is 0 when nParts == 0. The constant is created with the specified llzk::felt::FeltType.
Requirements: nParts must be non-negative and parts must be non-null when nParts > 0. The provided MlirType must be a llzk::felt::FeltType.
| MlirAttribute llzkFelt_FeltConstAttrGetFromPartsInField | ( | MlirContext | ctx, |
| const uint64_t * | parts, | ||
| intptr_t | nParts, | ||
| MlirStringRef | fieldName ) |
Creates a llzk::felt::FeltConstAttr from 64-bit parts in LSB order.
The most significant bit is treated as the sign bit. The value is 0 when nParts == 0. The constant is created with the llzk::felt::FeltType for the specified field name. An undefined field name emits a diagnostic and returns a null attribute. See llzkFelt_FeltTypeGetFromRef for the requirements on fieldName.
Requirements: nParts must be non-negative and parts must be non-null when nParts > 0.
| MlirAttribute llzkFelt_FeltConstAttrGetFromPartsUnspecified | ( | MlirContext | ctx, |
| const uint64_t * | parts, | ||
| intptr_t | nParts ) |
Creates a llzk::felt::FeltConstAttr from 64-bit parts in LSB order.
The most significant bit is treated as the sign bit. The value is 0 when nParts == 0. The constant is created with the unspecified-field llzk::felt::FeltType.
Requirements: nParts must be non-negative and parts must be non-null when nParts > 0.
| MlirAttribute llzkFelt_FeltConstAttrGetFromString | ( | MlirContext | ctx, |
| MlirStringRef | str, | ||
| MlirType | type ) |
Creates a llzk::felt::FeltConstAttr from a base-10 representation of a signed integer in the specified field.
Returns a null attribute for malformed decimal input. The provided MlirType must be a llzk::felt::FeltType.
| MlirAttribute llzkFelt_FeltConstAttrGetFromStringInField | ( | MlirContext | ctx, |
| MlirStringRef | str, | ||
| MlirStringRef | fieldName ) |
Creates a llzk::felt::FeltConstAttr from a base-10 representation of a signed integer in the specified field.
Returns a null attribute for malformed decimal input. An undefined field name emits a diagnostic and returns a null attribute. See llzkFelt_FeltTypeGetFromRef for the requirements on fieldName.
| MlirAttribute llzkFelt_FeltConstAttrGetFromStringUnspecified | ( | MlirContext | ctx, |
| MlirStringRef | str ) |
| MlirType llzkFelt_FeltTypeGetFromRef | ( | MlirContext | ctx, |
| MlirStringRef | fieldName ) |
Gets a llzk::felt::FeltType referring to an already defined field.
Requirements: fieldName must exactly match a built-in field name (e.g., "bn254") or a custom field registered with LLZK. Pass the name itself, without quotes or an '@' prefix. The string must contain fieldName.length readable bytes; it need not be null-terminated and is copied into ctx, so its storage need only remain valid for this call.
A fieldName that has not been defined emits a diagnostic and returns a null type. Use llzkFelt_FeltTypeGetUnspecified for an unspecified field, rather than an empty name here.
| MlirType llzkFelt_FeltTypeGetUnspecified | ( | MlirContext | ctx | ) |
Gets the llzk::felt::FeltType without the field specified.
| MlirAttribute llzkFelt_FieldSpecAttrGetFromParts | ( | MlirContext | ctx, |
| MlirIdentifier | fieldName, | ||
| const uint64_t * | parts, | ||
| intptr_t | nParts ) |
Creates a llzk::felt::FieldSpecAttr from 64-bit parts in LSB order.
The most significant bit is treated as the sign bit. The value is 0 when nParts == 0. A modulus below two produces a diagnostic and a null attribute.
Requirements: nParts must be non-negative and parts must be non-null when nParts > 0.