Skip to content

Commit 25332dc

Browse files
committed
fix mod position
1 parent 3b9e364 commit 25332dc

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

scripts/build-gates-report.sh

100644100755
File mode changed.

src/benchmarks/bigcurve_benchmarks.nr

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ comptime fn make_bench(m: Module, params: Quoted) -> Quoted {
55
let add_bench_name = f"add_{module_name}".quoted_contents();
66
let sub_bench_name = f"sub_{module_name}".quoted_contents();
77
let one_bench_name = f"one_{module_name}".quoted_contents();
8+
let mul_bench_name = f"mul_{module_name}".quoted_contents();
89
let BigCurve = quote { crate::BigCurve };
910

1011
let from_field_bench_name = f"from_field_{module_name}".quoted_contents();
@@ -13,17 +14,22 @@ comptime fn make_bench(m: Module, params: Quoted) -> Quoted {
1314
quote {
1415
#[export]
1516
fn $add_bench_name(a: $typ, b: $typ) -> $typ {
16-
a.add(b)
17+
a + b
1718
}
1819

1920
#[export]
2021
fn $sub_bench_name(a: $typ, b: $typ) -> $typ {
21-
a.sub(b)
22+
a-b
23+
}
24+
25+
#[export]
26+
fn $mul_bench_name(a: $typ, b: $typ) -> $typ {
27+
a.mul(b)
2228
}
2329

2430
#[export]
2531
fn $one_bench_name() -> $typ {
26-
$typ::one()
32+
$BigCurve::one()
2733
}
2834

2935
}

src/lib.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ pub(crate) mod curve_jac;
33
mod test_data;
44
mod bigcurve_test;
55
pub mod scalar_field;
6-
mod benchmarks;
76
pub(crate) mod utils;
87
pub(crate) mod curves;
98

@@ -13,6 +12,7 @@ use bignum::bignum::evaluate_quadratic_expression;
1312
use crate::curve_jac::AffineTranscript;
1413
use crate::scalar_field::ScalarField;
1514
use std::ops::{Add, Neg, Sub};
15+
mod benchmarks;
1616

1717
/// Implements an elliptic curve over a prime field that is not the circuit's native field.
1818

0 commit comments

Comments
 (0)