|
LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
|
Namespaces | |
| namespace | detail |
Classes | |
| class | CastDialect |
| LLZK type conversion operations. More... | |
| class | FeltToIndexOp |
| class | FeltToIndexOpAdaptor |
| class | FeltToIndexOpGenericAdaptor |
| class | IntToFeltOp |
| class | IntToFeltOpAdaptor |
| class | IntToFeltOpGenericAdaptor |
Enumerations | |
| enum class | OverflowSemantics : uint32_t { ASSERT = 0 , SATURATE = 1 , WRAP = 2 , TRUNCATE = 3 } |
Functions | |
| std::optional< DynamicAPInt > | applyIntToFeltOverflow (const DynamicAPInt &value, const Field &field, OverflowSemantics overflow) |
| std::optional< DynamicAPInt > | applyFeltToIndexOverflow (const DynamicAPInt &value, unsigned indexBitWidth, OverflowSemantics overflow) |
| ::llvm::StringRef | stringifyOverflowSemantics (OverflowSemantics val) |
| ::std::optional< OverflowSemantics > | symbolizeOverflowSemantics (::llvm::StringRef str) |
| ::std::optional< OverflowSemantics > | symbolizeOverflowSemantics (uint32_t value) |
| constexpr unsigned | getMaxEnumValForOverflowSemantics () |
| inline ::llvm::StringRef | stringifyEnum (OverflowSemantics enumValue) |
| template<typename EnumType> | |
| ::std::optional< EnumType > | symbolizeEnum (::llvm::StringRef) |
| template<> | |
| inline ::std::optional< OverflowSemantics > | symbolizeEnum< OverflowSemantics > (::llvm::StringRef str) |
| std::optional< llvm::DynamicAPInt > | applyIntToFeltOverflow (const llvm::DynamicAPInt &value, const Field &field, OverflowSemantics overflow) |
| Apply overflow semantics for an integer-to-felt conversion. | |
| std::optional< llvm::DynamicAPInt > | applyFeltToIndexOverflow (const llvm::DynamicAPInt &value, unsigned indexBitWidth, OverflowSemantics overflow) |
| Apply overflow semantics for a felt-to-index conversion. | |
|
strong |
| Enumerator | |
|---|---|
| ASSERT | |
| SATURATE | |
| WRAP | |
| TRUNCATE | |
Definition at line 13 of file Enums.h.inc.
| std::optional< DynamicAPInt > llzk::cast::applyFeltToIndexOverflow | ( | const DynamicAPInt & | value, |
| unsigned | indexBitWidth, | ||
| OverflowSemantics | overflow ) |
Definition at line 41 of file OverflowSemantics.cpp.
| std::optional< llvm::DynamicAPInt > llzk::cast::applyFeltToIndexOverflow | ( | const llvm::DynamicAPInt & | value, |
| unsigned | indexBitWidth, | ||
| OverflowSemantics | overflow ) |
Apply overflow semantics for a felt-to-index conversion.
indexBitWidth is the storage width; results are always in its nonnegative safe range. Returns nullopt when assert semantics reject the input.
| std::optional< DynamicAPInt > llzk::cast::applyIntToFeltOverflow | ( | const DynamicAPInt & | value, |
| const Field & | field, | ||
| OverflowSemantics | overflow ) |
Definition at line 27 of file OverflowSemantics.cpp.
| std::optional< llvm::DynamicAPInt > llzk::cast::applyIntToFeltOverflow | ( | const llvm::DynamicAPInt & | value, |
| const Field & | field, | ||
| OverflowSemantics | overflow ) |
Apply overflow semantics for an integer-to-felt conversion.
Returns nullopt when assert semantics reject the input. Otherwise, the result is always in [0, p).
|
inlineconstexpr |
Definition at line 23 of file Enums.h.inc.
| inline ::llvm::StringRef llzk::cast::stringifyEnum | ( | OverflowSemantics | enumValue | ) |
Definition at line 28 of file Enums.h.inc.
| llvm::StringRef llzk::cast::stringifyOverflowSemantics | ( | OverflowSemantics | val | ) |
Definition at line 12 of file Enums.cpp.inc.
| ::std::optional< EnumType > llzk::cast::symbolizeEnum | ( | ::llvm::StringRef | ) |
| inline ::std::optional< OverflowSemantics > llzk::cast::symbolizeEnum< OverflowSemantics > | ( | ::llvm::StringRef | str | ) |
Definition at line 33 of file Enums.h.inc.
| std::optional< OverflowSemantics > llzk::cast::symbolizeOverflowSemantics | ( | ::llvm::StringRef | str | ) |
Definition at line 22 of file Enums.cpp.inc.
| std::optional< OverflowSemantics > llzk::cast::symbolizeOverflowSemantics | ( | uint32_t | value | ) |
Definition at line 30 of file Enums.cpp.inc.