From 0c79436848c08faa3b7fee2593d028c659ab3cea Mon Sep 17 00:00:00 2001 From: Mamy Ratsimbazafy Date: Sun, 13 Aug 2023 14:21:41 +0200 Subject: [PATCH] rebase import fixes --- benchmarks/bench_evm_modexp_dos.nim | 2 +- benchmarks/bench_powmod.nim | 3 ++- constantine/math/polynomials/fft.nim | 2 +- tests/math_bigints/t_bigints_mul_vs_gmp.nim | 2 +- tests/math_fields/t_finite_fields_vs_gmp.nim | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/benchmarks/bench_evm_modexp_dos.nim b/benchmarks/bench_evm_modexp_dos.nim index 1fc8c37c..a4bbb476 100644 --- a/benchmarks/bench_evm_modexp_dos.nim +++ b/benchmarks/bench_evm_modexp_dos.nim @@ -2,7 +2,7 @@ import ../constantine/ethereum_evm_precompiles, ./platforms, ./bench_blueprint, - ../constantine/platforms/codecs + ../constantine/serialization/codecs proc report(op: string, elapsedNs: int64, elapsedCycles: int64, iters: int) = let ns = elapsedNs div iters diff --git a/benchmarks/bench_powmod.nim b/benchmarks/bench_powmod.nim index 64b6bdde..fa7e0844 100644 --- a/benchmarks/bench_powmod.nim +++ b/benchmarks/bench_powmod.nim @@ -2,7 +2,8 @@ import ../constantine/math/arithmetic, ../constantine/math/io/[io_bigints, io_fields], ../constantine/math/config/curves, - ../constantine/platforms/[abstractions, codecs], + ../constantine/platforms/abstractions, + ../constantine/serialization/codecs, ../constantine/math_arbitrary_precision/arithmetic/bigints_views, ../helpers/prng_unsafe, ./platforms, ./bench_blueprint diff --git a/constantine/math/polynomials/fft.nim b/constantine/math/polynomials/fft.nim index b40832a4..e7f14a8c 100644 --- a/constantine/math/polynomials/fft.nim +++ b/constantine/math/polynomials/fft.nim @@ -47,7 +47,7 @@ func computeRootsOfUnity[EC](ctx: var ECFFT_Descriptor[EC], generatorRootOfUnity doAssert ctx.rootsOfUnity[ctx.order].isOne().bool() -func new*(T: type ECFFT_Descriptor, order: int, generatorRootOfUnity: auto): T = +func new(T: type ECFFT_Descriptor, order: int, generatorRootOfUnity: auto): T = result.order = order result.rootsOfUnity = allocHeapArrayAligned(matchingOrderBigInt(T.EC.F.C), order+1, alignment = 64) diff --git a/tests/math_bigints/t_bigints_mul_vs_gmp.nim b/tests/math_bigints/t_bigints_mul_vs_gmp.nim index eeb17de7..a0c5a7f5 100644 --- a/tests/math_bigints/t_bigints_mul_vs_gmp.nim +++ b/tests/math_bigints/t_bigints_mul_vs_gmp.nim @@ -16,7 +16,7 @@ import ../../constantine/math/arithmetic, ../../constantine/platforms/abstractions, # Test utilities - ../../constantine/platforms/codecs, + ../../constantine/serialization/codecs, ../../helpers/prng_unsafe echo "\n------------------------------------------------------\n" diff --git a/tests/math_fields/t_finite_fields_vs_gmp.nim b/tests/math_fields/t_finite_fields_vs_gmp.nim index fd809c0d..890fb68f 100644 --- a/tests/math_fields/t_finite_fields_vs_gmp.nim +++ b/tests/math_fields/t_finite_fields_vs_gmp.nim @@ -12,7 +12,8 @@ import # Third-party gmp, # Internal - ../../constantine/platforms/[abstractions, codecs], + ../../constantine/platforms/abstractions, + ../../constantine/serialization/codecs, ../../constantine/math/io/[io_bigints, io_fields], ../../constantine/math/arithmetic, ../../constantine/math/config/curves,