LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
StaticLoop.h
Go to the documentation of this file.
1//===-- StaticLoop.h -------------------------------------------*- 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 <cstdint>
13
14namespace llzk::polymorphic {
19inline bool hasNextStaticIteration(int64_t current, int64_t upper, int64_t step) {
20 return uint64_t(upper) - uint64_t(current) > uint64_t(step);
21}
22} // namespace llzk::polymorphic
bool hasNextStaticIteration(int64_t current, int64_t upper, int64_t step)
Whether another signed iteration exists after current, for current < upper and a positive step.
Definition StaticLoop.h:19