LLZK
3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Toggle main menu visibility
Loading...
Searching...
No Matches
OverflowSemantics.h
Go to the documentation of this file.
1
//===-- OverflowSemantics.h - Cast overflow helpers -------------*- C++ -*-===//
2
//
3
// Part of the LLZK Project, under the Apache License v2.0.
4
// See LICENSE.txt for license information.
5
// Copyright 2026 Project LLZK
6
// SPDX-License-Identifier: Apache-2.0
7
//
8
//===----------------------------------------------------------------------===//
9
10
#pragma once
11
12
#include "
llzk/Dialect/Cast/IR/Enums.h
"
13
#include "
llzk/Util/Field.h
"
14
15
#include <llvm/ADT/DynamicAPInt.h>
16
17
#include <optional>
18
19
namespace
llzk::cast
{
20
23
std::optional<llvm::DynamicAPInt>
applyIntToFeltOverflow
(
24
const
llvm::DynamicAPInt &value,
const
Field
&field,
OverflowSemantics
overflow
25
);
26
30
std::optional<llvm::DynamicAPInt>
applyFeltToIndexOverflow
(
31
const
llvm::DynamicAPInt &value,
unsigned
indexBitWidth,
OverflowSemantics
overflow
32
);
33
34
}
// namespace llzk::cast
Enums.h
Field.h
llzk::Field
Information about the prime finite field used for the interval analysis.
Definition
Field.h:36
llzk::cast
Definition
Ops.cpp:71
llzk::cast::applyIntToFeltOverflow
std::optional< DynamicAPInt > applyIntToFeltOverflow(const DynamicAPInt &value, const Field &field, OverflowSemantics overflow)
Definition
OverflowSemantics.cpp:27
llzk::cast::applyFeltToIndexOverflow
std::optional< DynamicAPInt > applyFeltToIndexOverflow(const DynamicAPInt &value, unsigned indexBitWidth, OverflowSemantics overflow)
Definition
OverflowSemantics.cpp:41
llzk::cast::OverflowSemantics
OverflowSemantics
Definition
Enums.h.inc:13
include
llzk
Dialect
Cast
Util
OverflowSemantics.h
Generated by
1.17.0
Copyright 2025 Veridise Inc. under the Apache License v2.0. Copyright 2026 Project LLZK under the Apache License v2.0.