repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/ast.rs
rust/src/ast.rs
use crate::{real::Real, vars::VarSet}; use inari::{const_dec_interval, Decoration}; use std::{ collections::hash_map::DefaultHasher, fmt, hash::{Hash, Hasher}, ops::Range, }; #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub enum ExplicitRelOp { Eq, Ge, Gt, Le, Lt, } #[derive(...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/fftw.rs
rust/src/fftw.rs
use graphest_fftw_sys::*; use std::ffi::c_void; use std::ops::{Index, IndexMut}; use std::slice::{from_raw_parts, from_raw_parts_mut}; // From https://www.fftw.org/fftw3_doc/Introduction.html // // On the other hand, if you need a single transform of a given size, // the one-time cost of the planner becomes signif...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/lib.rs
rust/src/lib.rs
#![allow(clippy::float_cmp)] #![feature(box_patterns)] pub use crate::{ fftw::FftImage, geom::Box2D, graph::{ explicit::Explicit, implicit::Implicit, parametric::Parametric, Graph, GraphingStatistics, Padding, }, image::{Image, PixelIndex}, relation::{Relation, RelationType}, ...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/vars.rs
rust/src/vars.rs
use bitflags::*; bitflags! { /// A set of free variables. #[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq, PartialOrd, Ord)] pub struct VarSet: u8 { const EMPTY = 0; const M = 1; const N = 2; const N_THETA = 4; const T = 8; const X = 16; con...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/interval_set_ops.rs
rust/src/interval_set_ops.rs
use crate::{ interval_set::{ Branch, BranchMap, DecSignSet, SignSet, Site, TupperInterval, TupperIntervalSet, }, Ternary, }; use gmp_mpfr_sys::mpfr; use inari::{ const_dec_interval, const_interval, dec_interval, interval, DecInterval, Decoration, Interval, }; use itertools::Itertools; use rug::F...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
true
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/parse.rs
rust/src/parse.rs
use crate::{ ast::{Expr, NaryOp}, context::{Context, InputWithContext}, real::Real, }; use inari::dec_interval; use nom::{ branch::alt, bytes::complete::{tag, take, take_while}, character::complete::{char, digit0, digit1, one_of, satisfy, space0}, combinator::{ all_consuming, consume...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/region.rs
rust/src/region.rs
use inari::Interval; /// The Cartesian product of two [`Interval`]s. #[derive(Clone, Debug, Eq, PartialEq)] pub struct Region(Interval, Interval); impl Region { /// The empty region. pub const EMPTY: Self = Self(Interval::EMPTY, Interval::EMPTY); /// Creates a new [`Region`]. pub fn new(x: Interval, ...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/image.rs
rust/src/image.rs
use crate::traits::BytesAllocated; use std::{ ops::{Index, IndexMut}, slice::{Iter, IterMut}, }; /// A two-dimensional image with a generic pixel type. #[derive(Clone, Debug, Eq, PartialEq)] pub struct Image<T: Clone + Copy + Default> { width: u32, height: u32, data: Vec<T>, } impl<T: Clone + Copy...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/interval_set.rs
rust/src/interval_set.rs
use crate::{ geom::{Transform, TransformInPlace, Transformation1D}, traits::BytesAllocated, }; use bitflags::*; use inari::{DecInterval, Decoration, Interval}; use smallvec::SmallVec; use std::{ convert::From, hash::{Hash, Hasher}, iter::{Extend, FromIterator}, mem::transmute, slice::Iter, }...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/relation.rs
rust/src/relation.rs
use crate::{ ast::{BinaryOp, ExplicitRelOp, Expr, NaryOp, TernaryOp, UnaryOp, ValueType}, binary, bool_constant, constant, context::Context, error, eval_cache::{EvalExplicitCache, EvalImplicitCache, EvalParametricCache, MaximalTermCache}, eval_result::{EvalArgs, EvalExplicitResult, EvalParametri...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
true
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/ternary.rs
rust/src/ternary.rs
use std::ops::{BitAnd, BitOr, Not}; use Ternary::*; /// A ternary value which could be either [`False`], [`Uncertain`], or [`True`]. /// /// The values are ordered as: [`False`] < [`Uncertain`] < [`True`]. /// /// The default value is [`Uncertain`]. #[derive(Clone, Copy, Debug, Default, Eq, Ord, PartialEq, PartialOrd)...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/arb_interval_set_ops.rs
rust/src/arb_interval_set_ops.rs
use crate::{ interval_set::{Site, TupperInterval, TupperIntervalSet}, interval_set_ops, Ternary, }; use inari::{const_interval, interval, DecInterval, Decoration, Interval}; use itertools::Itertools; macro_rules! ge { ($x:expr, $y:expr) => {{ const _: () = assert!(f64::NEG_INFINITY < $y && $y < f64...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
true
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/geom.rs
rust/src/geom.rs
use crate::region::Region; use inari::{interval, Interval}; /// A one-dimensional geometric region that represents a line segment. /// /// Conceptually, it is a pair of two [`Interval`]s `inner` and `outer` /// that satisfy `inner ⊆ outer`. `inner` can be empty, while `outer` cannot. #[derive(Clone, Debug)] pub struct...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/block.rs
rust/src/block.rs
use crate::{traits::BytesAllocated, vars::VarSet}; use inari::{interval, Interval}; use itertools::Itertools; use smallvec::SmallVec; use std::{collections::VecDeque, ptr::copy_nonoverlapping}; /// A component of a [`Block`] that corresponds to the horizontal or vertical axis of an [`Image`]. /// /// A [`Coordinate`] ...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/eval_cache.rs
rust/src/eval_cache.rs
use crate::{ eval_result::{EvalArgs, EvalExplicitResult, EvalParametricResult, EvalResult}, interval_set::TupperIntervalSet, ops::{OptionalValueStore, StaticTerm, StaticTermKind, StoreIndex}, traits::BytesAllocated, vars::VarSet, }; use inari::Interval; use std::{collections::HashMap, hash::Hash}; ...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/visit.rs
rust/src/visit.rs
use crate::{ ast::{BinaryOp, Expr, NaryOp, TernaryOp, UnaryOp, ValueType}, binary, bool_constant, constant, context::{Context, Def, VarProps}, error, interval_set::Site, nary, ops::{ FormIndex, RankedMinMaxOp, RelOp, ScalarBinaryOp, ScalarTernaryOp, ScalarUnaryOp, StaticForm,...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
true
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/rational_ops.rs
rust/src/rational_ops.rs
use gmp_mpfr_sys::{mpfr, mpfr::rnd_t}; use inari::{interval, Interval}; use rug::{Float, Rational}; pub fn cos_pi(x: Rational) -> Option<Rational> { match modulo(2 * x, 4.into()) { Some(r) if r == 0 => Some(1.into()), Some(r) if r == 1 => Some(0.into()), Some(r) if r == 2 => Some((-1).into(...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/real.rs
rust/src/real.rs
use crate::{interval_set::TupperIntervalSet, rational_ops}; use inari::{const_interval, DecInterval, Decoration, Interval}; use rug::Rational; use std::ops::{Add, Div, Mul, Neg, Sub}; #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub enum RealUnit { One, Pi, } /// Stores the value of an AST node of kind ...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/eval_result.rs
rust/src/eval_result.rs
use crate::{ interval_set::{DecSignSet, SignSet, TupperIntervalSet}, ops::{StaticForm, StaticFormKind}, traits::BytesAllocated, Ternary, }; use core::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, Not}; use inari::{Decoration, Interval}; use smallvec::SmallVec; /// A sequence of evaluation results of ...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/traits.rs
rust/src/traits.rs
use std::{ collections::{HashMap, VecDeque}, mem::size_of, }; pub trait BytesAllocated { /// Returns the approximate amount of memory allocated by `self` in bytes. fn bytes_allocated(&self) -> usize; } impl<K, V> BytesAllocated for HashMap<K, V> { fn bytes_allocated(&self) -> usize { self....
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/arb.rs
rust/src/arb.rs
use graphest_flint_sys::*; use inari::{interval, Interval}; use std::{mem::MaybeUninit, ops::Drop}; // Notes: // // - We always need to pass Arb pointers as `*_ptr` to Arb functions even if they expect `*_srcptr`, // due to: https://github.com/rust-lang/rust-bindgen/issues/1962 // // - Arb is thread-safe, thus we im...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/context.rs
rust/src/context.rs
use crate::{ ast::{BinaryOp, Expr, TernaryOp, UnaryOp, ValueType}, real::Real, vars::VarSet, visit::{Substitute, VisitMut}, }; use inari::{const_dec_interval, DecInterval}; use nom::{Compare, CompareResult, Input, Needed, Offset}; use std::{ collections::HashMap, ops::Range, str::{CharIndice...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/graph.rs
rust/src/graph.rs
use crate::{image::Image, traits::BytesAllocated, Ternary}; use std::{error, fmt, time::Duration}; #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum GraphingErrorKind { BlockIndexOverflow, ReachedMemLimit, ReachedSubdivisionLimit, } #[derive(Clone, Debug, Eq, PartialEq)] pub struct GraphingError { ...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/ops.rs
rust/src/ops.rs
use crate::{ interval_set::{DecSignSet, Site, TupperIntervalSet}, vars::{VarIndex, VarSet, VarType}, }; #[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)] pub struct StoreIndex(u32); impl StoreIndex { pub fn new(i: usize) -> Self { Self(u32::try_from(i).unwrap()) } pub fn get(&...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/graph/explicit.rs
rust/src/graph/explicit.rs
use crate::{ ast::ExplicitRelOp, block::{Block, BlockQueue, Coordinate}, eval_cache::{EvalCacheLevel, EvalExplicitCache}, eval_result::EvalArgs, geom::{Box1D, Box2D, Transform, Transformation1D, TransformationMode}, graph::{ common::*, Graph, GraphingError, GraphingErrorKind, GraphingSta...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/graph/implicit.rs
rust/src/graph/implicit.rs
use crate::{ block::{Block, BlockQueue, Coordinate, IntegerParameter, RealParameter}, eval_cache::{EvalCacheLevel, EvalImplicitCache}, eval_result::EvalArgs, geom::{Box2D, Transform, Transformation2D, TransformationMode}, graph::{ common::*, Graph, GraphingError, GraphingErrorKind, GraphingS...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/graph/parametric.rs
rust/src/graph/parametric.rs
use crate::{ block::{Block, BlockQueue, IntegerParameter, RealParameter}, eval_cache::{EvalCacheLevel, EvalParametricCache}, eval_result::EvalArgs, geom::{Box2D, Transformation1D, TransformationMode}, graph::{ common::*, Graph, GraphingError, GraphingErrorKind, GraphingStatistics, Padding, T...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/graph/common.rs
rust/src/graph/common.rs
use crate::{ block::Block, geom::{Box1D, Box2D}, region::Region, }; use inari::{interval, Interval}; /// The index of a [`Block`] in a [`BlockQueue`]. /// /// While [`BlockQueue::begin_index`]/[`BlockQueue::end_index`] return [`usize`], /// [`u32`] would be large enough. /// /// [`Block`]: crate::block::Bl...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/bin/compose.rs
rust/src/bin/compose.rs
use clap::{value_parser, Arg, ArgAction, Command}; use image::{imageops, DynamicImage, ImageReader, Rgba, Rgba32FImage}; use std::ffi::OsString; #[derive(Clone, Debug)] struct Entry { color: Rgba<f32>, file: String, } fn colorize(im: &mut Rgba32FImage, color: Rgba<f32>) { for p in im.pixels_mut() { ...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/bin/graph.rs
rust/src/bin/graph.rs
use clap::{value_parser, Arg, ArgAction, ArgGroup, Command}; use graphest::{ Box2D, Explicit, FftImage, Graph, GraphingStatistics, Image, Implicit, Padding, Parametric, PixelIndex, Relation, RelationType, Ternary, }; use image::{imageops, ImageBuffer, LumaA, Rgb, RgbImage}; use inari::{const_interval, interval,...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/src/bin/concatenate.rs
rust/src/bin/concatenate.rs
use clap::{value_parser, Arg, Command}; use image::{imageops, ImageBuffer, ImageReader, LumaA}; use std::ffi::OsString; type GrayAlpha16Image = ImageBuffer<LumaA<u16>, Vec<u16>>; fn main() { let mut matches = Command::new("concatenate") .about("Concatenates tiles of graphs.") .arg( Arg...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph.rs
rust/tests/graph.rs
#![cfg(all(not(debug_assertions), feature = "arb"))] use image::ImageReader; use std::{ fs::create_dir, path::PathBuf, process::{Command, Stdio}, }; use uuid::Uuid; fn execute(cmd: &mut Command) -> bool { cmd.stdout(Stdio::null()) .status() .unwrap_or_else(|_| panic!("failed to execute...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/dilate.rs
rust/tests/graph_tests/dilate.rs
// Identity. t!( t_54cc8216d22149aaa67c853c772b6477, "max(|x|, |y|) = 7", @dilate("0,0,0;0,1,0;0,0,0"), @size(8, 8) ); // Duplicate horizontally. t!( t_79611f10496d4bfa8ebe084ffd1240c8, "max(|x|, |y|) = 7", @dilate("0,0,0;1,0,1;0,0,0"), @size(8, 8) ); // Duplicate vertically. t!( t...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/explicit.rs
rust/tests/graph_tests/explicit.rs
// Non-square t!(t_b0561718fd3541d2958de31f0310e101, "y = sin(exp(x))", @size(456, 789)); t!(t_900f23b5cd764428b608611b30859d6e, "y = sin(exp(x))", @size(789, 456)); t!(t_8f83795722ca41349fe0e31fa80447f9, "x = sin(exp(y))", @size(456, 789)); t!(t_bc85afb687af42daaedfa0db21afb2a1, "x = sin(exp(y))", @size(789, 456)); /...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/pad.rs
rust/tests/graph_tests/pad.rs
t!( t_c4138320b0294abbb90cd60a913803c6, "max(|x|, |y|) = 7", @pad_left(4), @size(8, 8) ); t!( t_9a1733d1160f409b8d4036a802c9d602, "max(|x|, |y|) = 7", @pad_right(4), @size(8, 8) ); t!( t_2b66412c864540eda3a593c39f4899dc, "max(|x|, |y|) = 7", @pad_bottom(4), @size(8, 8) );...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/implicit.rs
rust/tests/graph_tests/implicit.rs
t!( t_84a2738be35745da97a9b120c563b4b3, "y = t", @timeout(8000), ); t!( t_7f25b9f2bd3746b3ae8f95a82921de2b, "mod(cos(n/12 π) x + sin(n/12 π) y, 3) = 0", @timeout(2000), ); t!( t_37b042e4a46346fda37c9af4b71fb404, "⌊16/(2π) ln(r)⌋ = ⌊16/(2π) θ⌋ + n ∧ mod(n, 2) = 0 ∧ 0 ≤ n < 16", @tim...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/functions.rs
rust/tests/graph_tests/functions.rs
t!(t_9141185741e3473bafdd4fbd69daacb0, "y = abs(x)"); t!(t_3424e84276854880bfbaf722a55f4083, "y = acos(x)"); t!(t_37f5ce66894a4b94a578df440066cf19, "y = acosh(x)"); t!(t_38eec1c4b37442ce82c57cca99f36e81, "y = Ai(x)"); t!(t_df6c0b5de0cb45beb1dfe37e25b5c3ba, "y = Ai'(x)"); t!(t_e46074d3fb3d4876aa7cde273ded0a34, "y = asin...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/pen_size.rs
rust/tests/graph_tests/pen_size.rs
t!( t_e4148fc295e94cc5bfde9377ab10a146, "y = sin(x) + 0.01", @bounds(-4, 4, -4, 4), @pen_size(1), @ssaa(3) ); t!( t_0226139f3e7442c997a1e90bb621708e, "y = sin(x) + 0.01", @bounds(-4, 4, -4, 4), @pen_size(2), @ssaa(3) ); t!( t_9c1e98e649b846cd83ac47232cc5f109, "y = sin(x...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/polar.rs
rust/tests/graph_tests/polar.rs
// From https://www.wolframalpha.com/input/?i=polar+curves // bifoliate (a = 1) t!( t_b1b247d3dba94a98a1e89ae9099bb442, "r = 8 sin(θ)^2 cos(θ) / (cos(4 θ) + 3)", @bounds(-2, 2, -2, 2), @timeout(7000), ); // bifolium (a = 1) t!( t_cc34e20f7186486690b8cf44e6eee27f, "r = 4 sin(θ)^2 cos(θ)", @...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/constant.rs
rust/tests/graph_tests/constant.rs
// False t!(t_21454acd110d47bab4baeb8b4877a7c1, "1 = 0"); // True t!(t_1ea42308824249e8948e21b77c549805, "1 = 1"); // Uncertain t!(t_65654d086dde4597ad22a3d0802a9c6b, "2 = sqrt(2)^2");
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/parametric.rs
rust/tests/graph_tests/parametric.rs
// Non-square t!( t_90e85ab048f04560bfc9eef9e32c4b9c, "x = 8 cos(t) ∧ y = 8 sin(t) ∧ 1 < t < 5", @size(456, 789) ); t!( t_a039ce4efca04d99b6a6bdd08b5b2bf4, "x = 8 cos(t) ∧ y = 8 sin(t) ∧ 1 < t < 5", @size(789, 456) ); // From https://www.wolframalpha.com/input/?i=parametric+planar+curves // Ar...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/ssaa.rs
rust/tests/graph_tests/ssaa.rs
t!( t_4b288ec719e249e7bcd0f96a4ae51011, "y = sin(x) + 0.01", @bounds(-4, 4, -4, 4), @ssaa(3), @size(128, 128) ); t!( t_7566712cf4224f3f9df071f363ebdb89, "y = sin(x) + 0.01", @bounds(-4, 4, -4, 4), @ssaa(5), @size(128, 128) ); t!( t_216015c57aff43cd9d0add14a406a32a, "y =...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/tests/graph_tests/examples.rs
rust/tests/graph_tests/examples.rs
// From Examples.md t!( t_b8b04a37eaf64d0491cc2b1e6ee7bb1b, "(2y-x-1)(2y-x+1)(2x+y-1)(2x+y+1)((5x-2)^2+(5y-6)^2-10)((5x)^2+(5y)^2-10)((5x+2)^2+(5y+6)^2-10) = 0", @bounds(-3, 3, -3, 3), ); t!( t_0b3b446edb104b2680bdb05fcdbef602, "((x-2)^2+(y-2)^2-0.4)((x-2)^2+(y-1)^2-0.4)((x-2)^2+y^2-0.4)((x-2)^2+(...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/graphest-fftw-sys/build.rs
rust/graphest-fftw-sys/build.rs
use std::{ env, fs, io, path::{Path, PathBuf}, process::Command, }; const FFTW_TAR_URL: &str = "https://www.fftw.org/fftw-3.3.10.tar.gz"; struct Environment { build_dir: PathBuf, cache_dir: Option<PathBuf>, has_avx2: bool, has_neon: bool, include_dir: PathBuf, is_windows: bool, ...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/graphest-fftw-sys/src/lib.rs
rust/graphest-fftw-sys/src/lib.rs
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)] include!(concat!(env!("OUT_DIR"), "/fftw.rs"));
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/graphest-flint-sys/build.rs
rust/graphest-flint-sys/build.rs
use std::{ env, fs, io, path::{Path, PathBuf}, process::Command, }; // https://gitlab.com/tspiteri/gmp-mpfr-sys/-/blob/master/build.rs const FLINT_GIT_TAG: &str = "v3.4.0"; const FLINT_GIT_URL: &str = "https://github.com/flintlib/flint.git"; struct Environment { build_dir: PathBuf, cache_dir: Opt...
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
unageek/graphest
https://github.com/unageek/graphest/blob/4bbdc568b4725a1a196c9db15746fd484336cb91/rust/graphest-flint-sys/src/lib.rs
rust/graphest-flint-sys/src/lib.rs
#![allow( dead_code, deref_nullptr, // https://github.com/rust-lang/rust-bindgen/issues/1651 non_camel_case_types, non_snake_case, non_upper_case_globals, clippy::upper_case_acronyms )] include!(concat!(env!("OUT_DIR"), "/arb.rs"));
rust
MIT
4bbdc568b4725a1a196c9db15746fd484336cb91
2026-01-04T20:25:24.884510Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/examples-builder/build.rs
examples-builder/build.rs
use glob::glob; use std::{ fs::{File, read_dir, remove_file}, io::{self, Write}, path::Path, process::Command, }; const CARGO_MANIFEST_DIR: &str = env!("CARGO_MANIFEST_DIR"); fn rerun_all_but_target(dir: &Path) { for entry in read_dir(dir).unwrap().filter_map(Result::ok) { if "target" == e...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/examples-builder/src/lib.rs
examples-builder/src/lib.rs
#![deny(clippy::cargo)] include!(concat!(env!("OUT_DIR"), "/vars.rs"));
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/lib.rs
gkr_iop/src/lib.rs
#![feature(variant_count)] use crate::{ chip::Chip, circuit_builder::CircuitBuilder, error::CircuitBuilderError, utils::lk_multiplicity::LkMultiplicity, }; use either::Either; use ff_ext::ExtensionField; use multilinear_extensions::{Expression, impl_expr_from_unsigned, mle::ArcMultilinearExtension}; use std::ma...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/circuit_builder.rs
gkr_iop/src/circuit_builder.rs
use itertools::{Itertools, chain}; use multilinear_extensions::{ Expression, Fixed, Instance, StructuralWitIn, StructuralWitInType, ToExpr, WitIn, WitnessId, rlc_chip_record, }; use serde::de::DeserializeOwned; use std::{collections::HashMap, iter::once, marker::PhantomData}; use ff_ext::ExtensionField; use c...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
true
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr.rs
gkr_iop/src/gkr.rs
use core::fmt; use ff_ext::ExtensionField; use itertools::{Itertools, izip}; use layer::{Layer, LayerWitness, sumcheck_layer::LayerProof}; use multilinear_extensions::mle::{Point, PointAndEval}; use serde::{Deserialize, Serialize, de::DeserializeOwned}; use sumcheck::macros::{entered_span, exit_span}; use transcript::...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/error.rs
gkr_iop/src/error.rs
use sumcheck::structs::VerifierError; use thiserror::Error; #[derive(Clone, Debug, Error)] pub enum BackendError { #[error("layer verification failed: {0:?}, {1:?}")] LayerVerificationFailed(Box<str>, VerifierError), #[error("circuit build faile")] CircuitError(Box<str>), } #[derive(Clone, Debug, Erro...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/utils.rs
gkr_iop/src/utils.rs
pub mod lk_multiplicity; use ff_ext::{ExtensionField, SmallField}; use itertools::Itertools; use multilinear_extensions::{ Fixed, WitIn, WitnessId, mle::{ArcMultilinearExtension, MultilinearExtension}, util::ceil_log2, virtual_poly::{build_eq_x_r_vec, eq_eval}, }; use p3::field::FieldAlgebra; use rayon...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/hal.rs
gkr_iop/src/hal.rs
use crate::gkr::layer::{ Layer, hal::{LinearLayerProver, SumcheckLayerProver, ZerocheckLayerProver}, }; use either::Either; use ff_ext::ExtensionField; use mpcs::PolynomialCommitmentScheme; use multilinear_extensions::mle::Point; use std::{fmt::Debug, sync::Arc}; pub trait MultilinearPolynomial<E: ExtensionFie...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/selector.rs
gkr_iop/src/selector.rs
use std::iter::repeat_n; use rayon::iter::IndexedParallelIterator; use crate::{gkr::booleanhypercube::CYCLIC_POW2_5, utils::eq_eval_less_or_equal_than}; use ff_ext::ExtensionField; use multilinear_extensions::{ Expression, WitnessId, mle::{IntoMLE, MultilinearExtension, Point}, util::ceil_log2, virtua...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/evaluation.rs
gkr_iop/src/evaluation.rs
use ff_ext::ExtensionField; use itertools::{Itertools, izip}; use multilinear_extensions::{ Expression, mle::PointAndEval, utils::eval_by_expr_with_fixed, virtual_poly::build_eq_x_r_vec_sequential, }; use serde::{Deserialize, Serialize, de::DeserializeOwned}; /// Evaluation expression for the gkr layer reducti...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/chip.rs
gkr_iop/src/chip.rs
use crate::{circuit_builder::CircuitBuilder, gkr::layer::Layer}; use ff_ext::ExtensionField; use itertools::Itertools; use serde::{Deserialize, Serialize, de::DeserializeOwned}; pub mod builder; pub mod protocol; /// Chip stores all information required in the GKR protocol. #[derive(Clone, Debug, Serialize, Deseriali...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/chip/builder.rs
gkr_iop/src/chip/builder.rs
use ff_ext::ExtensionField; use crate::gkr::layer::{Layer, LayerType}; use super::Chip; impl<E: ExtensionField> Chip<E> { /// Add a layer to the circuit. Note that we assume the fixed inputs only occur in the first layer. pub fn add_layer(&mut self, layer: Layer<E>) { assert_eq!( layer ...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/chip/protocol.rs
gkr_iop/src/chip/protocol.rs
use ff_ext::ExtensionField; use crate::gkr::GKRCircuit; use super::Chip; impl<E: ExtensionField> Chip<E> { /// Extract information from Chip that required in the GKR phase. pub fn gkr_circuit(&self) -> GKRCircuit<E> { GKRCircuit { layers: self.layers.clone(), n_challenges: sel...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/layer.rs
gkr_iop/src/gkr/layer.rs
use either::Either; use ff_ext::ExtensionField; use itertools::{Itertools, chain, izip}; use linear_layer::{LayerClaims, LinearLayer}; use multilinear_extensions::{ Expression, Instance, StructuralWitIn, ToExpr, mle::{Point, PointAndEval}, monomial::Term, }; use p3::field::FieldAlgebra; use rayon::iter::{In...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/booleanhypercube.rs
gkr_iop/src/gkr/booleanhypercube.rs
use ff_ext::ExtensionField; use itertools::Itertools; use multilinear_extensions::mle::Point; const BH_MAX_NUM_VAR: usize = 5; pub struct BooleanHypercube { num_vars: usize, } // 2^5-1 cyclic group pub const CYCLIC_POW2_5: [u64; 32] = [ 0b00001, // 0 = decimal 1 0b00010, // 1 = decimal 2 0b00100, // ...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/layer_constraint_system.rs
gkr_iop/src/gkr/layer_constraint_system.rs
/// TODO: LayerConstrainSystem is deprecated use std::{cmp::Ordering, collections::BTreeMap}; use crate::{ evaluation::EvalExpression, gkr::layer::{Layer, LayerType, ROTATION_OPENING_COUNT}, selector::SelectorType, tables::LookupTable, }; use ff_ext::ExtensionField; use itertools::{Itertools, chain, iz...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/mock.rs
gkr_iop/src/gkr/mock.rs
use std::{iter, marker::PhantomData}; use ff_ext::ExtensionField; use itertools::{Itertools, izip}; use mpcs::PolynomialCommitmentScheme; use multilinear_extensions::{ Expression, WitnessId, mle::{ArcMultilinearExtension, FieldType, MultilinearExtension}, smart_slice::SmartSlice, util::ceil_log2, w...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/layer/sumcheck_layer.rs
gkr_iop/src/gkr/layer/sumcheck_layer.rs
use std::marker::PhantomData; use ff_ext::ExtensionField; use itertools::Itertools; use multilinear_extensions::{utils::eval_by_expr_with_instance, virtual_poly::VPAuxInfo}; use serde::{Deserialize, Serialize, de::DeserializeOwned}; use sumcheck::structs::{IOPProof, IOPVerifierState, SumCheckSubClaim, VerifierError}; ...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/layer/linear_layer.rs
gkr_iop/src/gkr/layer/linear_layer.rs
use ff_ext::ExtensionField; use itertools::Itertools; use multilinear_extensions::{mle::Point, utils::eval_by_expr_with_instance}; use sumcheck::structs::VerifierError; use transcript::Transcript; use crate::{ error::BackendError, gkr::layer::{hal::LinearLayerProver, sumcheck_layer::SumcheckLayerProof}, ha...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/layer/hal.rs
gkr_iop/src/gkr/layer/hal.rs
use multilinear_extensions::mle::Point; use transcript::Transcript; use crate::{ gkr::layer::{Layer, LayerWitness, sumcheck_layer::LayerProof}, hal::ProverBackend, selector::SelectorContext, }; pub trait LinearLayerProver<PB: ProverBackend> { fn prove( layer: &Layer<PB::E>, wit: LayerW...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/layer/zerocheck_layer.rs
gkr_iop/src/gkr/layer/zerocheck_layer.rs
use ff_ext::ExtensionField; use itertools::{Itertools, chain, izip}; use multilinear_extensions::{ ChallengeId, Expression, StructuralWitIn, StructuralWitInType, ToExpr, WitnessId, macros::{entered_span, exit_span}, mle::{IntoMLE, Point}, monomialize_expr_to_wit_terms, utils::{eval_by_expr, eval_by_...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/layer/gpu/utils.rs
gkr_iop/src/gkr/layer/gpu/utils.rs
use crate::{ gkr::{booleanhypercube::BooleanHypercube, layer::LayerWitness}, gpu::GpuBackend, }; use either::Either; use ff_ext::ExtensionField; use itertools::Itertools; use mpcs::PolynomialCommitmentScheme; use multilinear_extensions::{ Expression, mle::Point, monomial::Term, utils::eval_by_expr_constant,...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/layer/gpu/mod.rs
gkr_iop/src/gkr/layer/gpu/mod.rs
use crate::{ cpu::{CpuBackend, CpuProver}, gkr::{ booleanhypercube::BooleanHypercube, layer::{ Layer, LayerWitness, hal::{SumcheckLayerProver, ZerocheckLayerProver}, zerocheck_layer::RotationPoints, }, }, gpu::{GpuBackend, GpuProver}, }; use ei...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gkr/layer/cpu/mod.rs
gkr_iop/src/gkr/layer/cpu/mod.rs
use crate::{ cpu::{CpuBackend, CpuProver}, gkr::{ booleanhypercube::BooleanHypercube, layer::{ Layer, LayerWitness, hal::{SumcheckLayerProver, ZerocheckLayerProver}, zerocheck_layer::RotationPoints, }, }, selector::SelectorContext, utils::{...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gpu/mod.rs
gkr_iop/src/gpu/mod.rs
use crate::{ gkr::layer::gpu::utils::extract_mle_relationships_from_monomial_terms, hal::{MultilinearPolynomial, ProtocolWitnessGeneratorProver, ProverBackend, ProverDevice}, }; use ff_ext::ExtensionField; use mpcs::{PolynomialCommitmentScheme, SecurityLevel}; use multilinear_extensions::{ macros::{entered_...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/cpu/mod.rs
gkr_iop/src/cpu/mod.rs
use crate::{ evaluation::EvalExpression, gkr::layer::Layer, hal::{MultilinearPolynomial, ProtocolWitnessGeneratorProver, ProverBackend, ProverDevice}, }; use either::Either; use ff_ext::ExtensionField; use itertools::izip; use mpcs::{PolynomialCommitmentScheme, SecurityLevel, SecurityLevel::Conjecture100bit...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/utils/lk_multiplicity.rs
gkr_iop/src/utils/lk_multiplicity.rs
use ff_ext::SmallField; use itertools::izip; use std::{ cell::RefCell, collections::HashMap, fmt::Debug, hash::Hash, mem::{self}, ops::{AddAssign, Deref, DerefMut}, sync::Arc, }; use thread_local::ThreadLocal; use crate::tables::{ LookupTable, OpsTable, ops::{AndTable, LtuTable, OrT...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gadgets/is_lt.rs
gkr_iop/src/gadgets/is_lt.rs
use crate::utils::i64_to_base; use ff_ext::{ExtensionField, FieldInto, SmallField}; use itertools::izip; use multilinear_extensions::{Expression, ToExpr, WitIn, power_sequence}; use p3::field::Field; use std::fmt::Display; use witness::set_val; use crate::{ circuit_builder::CircuitBuilder, error::CircuitBuilderErr...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gadgets/mod.rs
gkr_iop/src/gadgets/mod.rs
mod is_lt; mod is_zero; pub use is_lt::{AssertLtConfig, InnerLtConfig, IsLtConfig, cal_lt_diff}; pub use is_zero::{IsEqualConfig, IsZeroConfig};
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/gadgets/is_zero.rs
gkr_iop/src/gadgets/is_zero.rs
use ff_ext::{ExtensionField, SmallField}; use multilinear_extensions::{Expression, ToExpr, WitIn}; use witness::set_val; use crate::{circuit_builder::CircuitBuilder, error::CircuitBuilderError}; pub struct IsZeroConfig { is_zero: Option<WitIn>, inverse: WitIn, } impl IsZeroConfig { pub fn expr<E: Extens...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/tables/mod.rs
gkr_iop/src/tables/mod.rs
pub mod ops; use strum_macros::EnumIter; #[derive( Copy, Clone, Debug, EnumIter, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize, )] #[repr(usize)] pub enum LookupTable { Dynamic = 0, // Range type for all bits up to 18 bits DoubleU8, // Range type for two 8-bit checks together And, ...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/tables/ops.rs
gkr_iop/src/tables/ops.rs
use crate::tables::{LookupTable, OpsTable}; pub struct AndTable; impl OpsTable for AndTable { const ROM_TYPE: LookupTable = LookupTable::And; fn len() -> usize { 1 << 16 } fn content() -> Vec<[u64; 3]> { (0..Self::len() as u64) .map(|i| { let (a, b) = Self::...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/gkr_iop/src/circuit_builder/ram.rs
gkr_iop/src/circuit_builder/ram.rs
use crate::{RAMType, error::CircuitBuilderError}; use ff_ext::ExtensionField; use crate::circuit_builder::DebugIndex; use itertools::izip; use multilinear_extensions::{Expression, ToExpr, power_sequence}; use p3::field::Field; use crate::{circuit_builder::CircuitBuilder, gadgets::AssertLtConfig}; impl<E: ExtensionFi...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/build.rs
ceno_cli/build.rs
use std::{env, fmt::Write}; use vergen_git2::*; fn main() -> Result<(), Box<dyn std::error::Error>> { let build = BuildBuilder::default().build_timestamp(true).build()?; let git2 = Git2Builder::default().sha(true).dirty(true).build()?; let rustc = RustcBuilder::default() .channel(true) .com...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/sdk.rs
ceno_cli/src/sdk.rs
use ceno_emul::{Platform, Program}; use ceno_host::CenoStdin; use ceno_recursion::{ aggregation::{CenoAggregationProver, CenoRecursionProvingKeys, CenoRecursionVerifierKeys}, zkvm_verifier::binding::E, }; use ceno_zkvm::{ e2e::{MultiProver, run_e2e_proof, setup_program}, scheme::{ ZKVMProof, cre...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/lib.rs
ceno_cli/src/lib.rs
pub mod sdk;
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/utils.rs
ceno_cli/src/utils.rs
use anyhow::bail; use console::style; use get_dir::{FileTarget, GetDir, Target}; use std::{ backtrace::BacktraceStatus, fmt, fs::File, io, io::Write, path::{Path, PathBuf}, process::Command, sync::OnceLock, }; use tempfile::TempDir; /// Controls whether we should print the progress of t...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/main.rs
ceno_cli/src/main.rs
use crate::{commands::*, utils::*}; use anyhow::Context; #[cfg(all(feature = "jemalloc", unix, not(test)))] use ceno_zkvm::print_allocated_bytes; use clap::{Args, Parser, Subcommand}; mod commands; mod utils; // Use jemalloc as global allocator for performance #[cfg(all(feature = "jemalloc", unix, not(test)))] #[glob...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/commands/raw_run.rs
ceno_cli/src/commands/raw_run.rs
use crate::commands::common_args::*; use clap::Parser; use std::path::PathBuf; #[derive(Parser)] #[command(name = "keygen", about = "Generate vk for an elf file")] pub struct RawKeygenCmd { /// Path to the Ceno elf file elf: PathBuf, #[clap(flatten, next_help_heading = "Ceno Options")] ceno_options: Ce...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/commands/info.rs
ceno_cli/src/commands/info.rs
use clap::Parser; #[derive(Parser)] #[command(name = "info", about = "Show info of current ceno cli")] pub struct InfoCmd; impl InfoCmd { pub fn run(self) -> anyhow::Result<()> { eprintln!("OS: {}", std::env::consts::OS); eprintln!("Arch: {}", std::env::consts::ARCH); let mut enabled_feat...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/commands/build.rs
ceno_cli/src/commands/build.rs
//! Build ceno program //! //! Reference cargo.toml file: //! ```toml //! [unstable] //! build-std = [ //! "alloc", //! "core", //! "compiler_builtins", //! "std", //! "panic_abort", //! "proc_macro", //! ] //! build-std-features = [ //! "compiler-builtins-mem", //! "panic_immediate_abort", //! "defau...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/commands/verify.rs
ceno_cli/src/commands/verify.rs
use crate::utils::print_cargo_message; use anyhow::{Context, bail}; use ceno_zkvm::{ e2e::{FieldType, PcsKind, verify}, scheme::{ZKVMProof, verifier::ZKVMVerifier}, structs::ZKVMVerifyingKey, }; use clap::Parser; use ff_ext::{BabyBearExt4, ExtensionField, GoldilocksExt2}; use mpcs::{Basefold, BasefoldRSPara...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/commands/mod.rs
ceno_cli/src/commands/mod.rs
mod common_args; mod build; pub use build::*; mod run; pub use run::*; mod raw_run; pub use raw_run::*; mod verify; pub use verify::*; mod info; pub use info::*;
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/commands/run.rs
ceno_cli/src/commands/run.rs
use crate::{ commands::{BuildCmd, common_args::*}, utils::*, }; use clap::Parser; use std::env::current_dir; #[derive(Parser)] #[command(name = "keygen", about = "Generate vk for a Cargo Ceno program")] pub struct KeygenCmd { #[clap(flatten)] inner: CmdInner, } #[derive(Parser)] #[command(name = "run"...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/commands/common_args/mod.rs
ceno_cli/src/commands/common_args/mod.rs
mod cargo; pub use cargo::*; mod ceno; pub use ceno::*;
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/commands/common_args/cargo.rs
ceno_cli/src/commands/common_args/cargo.rs
use crate::utils::{RUSTC_TARGET, release_target_json}; use anyhow::{Context, bail}; use cargo_metadata::{MetadataCommand, TargetKind}; use clap::Args; use std::{ path::{Path, PathBuf}, process::Command, }; use tempfile::TempDir; /// Options: /// --message-format <FMT> Error format /// -v, --verbose...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/src/commands/common_args/ceno.rs
ceno_cli/src/commands/common_args/ceno.rs
use super::CompilationOptions; use crate::utils::*; use anyhow::{Context, bail}; use ceno_emul::{IterAddresses, Program, WORD_SIZE, Word}; use ceno_host::{CenoStdin, memory_from_file}; use ceno_zkvm::{ e2e::*, scheme::{ constants::MAX_NUM_VARIABLES, create_backend, create_prover, mock_prover::Lk...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_cli/example/src/main.rs
ceno_cli/example/src/main.rs
extern crate ceno_rt; fn is_prime(n: u32) -> bool { if n < 2 { return false; } let mut i = 2; while i * i <= n { if n % i == 0 { return false; } i += 1; } true } fn main() { let n: u32 = ceno_rt::read(); let mut cnt_primes = 0; for i in...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_recursion/src/lib.rs
ceno_recursion/src/lib.rs
#![allow(clippy::type_complexity)] #![allow(clippy::too_many_arguments)] mod arithmetics; mod basefold_verifier; pub mod constants; mod tower_verifier; mod transcript; pub mod zkvm_verifier; pub mod aggregation; #[allow(dead_code)] mod extensions;
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_recursion/src/extensions/mod.rs
ceno_recursion/src/extensions/mod.rs
#[cfg(test)] mod tests { use crate::{ arithmetics::{challenger_multi_observe, exts_to_felts}, zkvm_verifier::binding::F, }; use openvm_circuit::arch::{SystemConfig, VmExecutor}; use openvm_instructions::exe::VmExe; use openvm_native_circuit::{Native, NativeConfig}; use openvm_nat...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_recursion/src/transcript/mod.rs
ceno_recursion/src/transcript/mod.rs
use ff_ext::{BabyBearExt4, ExtensionField as CenoExtensionField, SmallField}; use openvm_native_compiler::prelude::*; use openvm_native_recursion::challenger::{ CanObserveVariable, CanSampleBitsVariable, duplex::DuplexChallengerVariable, }; use openvm_stark_backend::p3_field::FieldAlgebra; pub fn transcript_observ...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_recursion/src/bin/e2e_aggregate.rs
ceno_recursion/src/bin/e2e_aggregate.rs
use ceno_emul::{IterAddresses, Program, WORD_SIZE, Word}; use ceno_host::{CenoStdin, memory_from_file}; use ceno_recursion::aggregation::CenoAggregationProver; use ceno_zkvm::{ e2e::{ Checkpoint, FieldType, MultiProver, PcsKind, Preset, run_e2e_with_checkpoint, setup_platform, setup_platform_debug, ...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false
scroll-tech/ceno
https://github.com/scroll-tech/ceno/blob/ce97cf805a131db43a6d3d56a2fd0506a6dc8431/ceno_recursion/src/aggregation/internal.rs
ceno_recursion/src/aggregation/internal.rs
/// Most of the codes in this file are copied from the OpenVM project. /// And we made a few modifications to fit in our continuation scheme. /// https://github.com/openvm-org/openvm/blob/main/crates/continuations/src/verifier/common/non_leaf.rs use std::{array, borrow::Borrow}; use openvm_circuit::arch::PUBLIC_VALUES...
rust
Apache-2.0
ce97cf805a131db43a6d3d56a2fd0506a6dc8431
2026-01-04T20:23:30.257242Z
false