move staticFor to the inner repo, not helpers/ for unblocking nimble install (#216)
This commit is contained in:
parent
a11fca9c60
commit
7c5421ffdc
|
@ -14,7 +14,6 @@ import
|
|||
ec_shortweierstrass_projective,
|
||||
ec_shortweierstrass_jacobian],
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_elliptic_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -17,7 +17,7 @@ import
|
|||
ec_shortweierstrass_batch_ops_parallel],
|
||||
../constantine/platforms/threadpool/threadpool,
|
||||
# Helpers
|
||||
../helpers/[static_for, prng_unsafe],
|
||||
../helpers/prng_unsafe,
|
||||
./bench_elliptic_template,
|
||||
./bench_blueprint
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ import
|
|||
ec_shortweierstrass_projective,
|
||||
ec_shortweierstrass_jacobian],
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_elliptic_template,
|
||||
# Standard library
|
||||
std/strutils
|
||||
|
|
|
@ -23,7 +23,7 @@ import
|
|||
../helpers/prng_unsafe,
|
||||
./bench_blueprint
|
||||
|
||||
export notes
|
||||
export notes, abstractions
|
||||
proc separator*() = separator(165)
|
||||
proc smallSeparator*() = separator(8)
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ import
|
|||
../constantine/math/io/io_bigints,
|
||||
../constantine/math/constants/zoo_square_roots,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_fields_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -11,7 +11,6 @@ import
|
|||
../constantine/math/config/curves,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_fields_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -11,7 +11,6 @@ import
|
|||
../constantine/math/config/curves,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_fields_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -11,7 +11,6 @@ import
|
|||
../constantine/math/config/curves,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_fields_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -11,7 +11,6 @@ import
|
|||
../constantine/math/config/curves,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_fields_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -19,7 +19,7 @@ import
|
|||
../constantine/math/arithmetic,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/[prng_unsafe, static_for],
|
||||
../helpers/prng_unsafe,
|
||||
./platforms,
|
||||
# Standard library
|
||||
std/[monotimes, times, strformat, strutils]
|
||||
|
@ -218,7 +218,7 @@ proc reduce2x*(T: typedesc, iters: int) =
|
|||
r.redc2x(t)
|
||||
|
||||
proc reduce2xViaDivision*(T: typedesc, iters: int) =
|
||||
|
||||
|
||||
const bits2x = 2 * T.C.getCurveBitWidth()
|
||||
var r: matchingBigInt(T.C)
|
||||
let t = rng.random_unsafe(BigInt[bits2x])
|
||||
|
|
|
@ -12,7 +12,6 @@ import
|
|||
../constantine/math/arithmetic,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_pairing_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -12,7 +12,6 @@ import
|
|||
../constantine/math/arithmetic,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_pairing_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -12,7 +12,6 @@ import
|
|||
../constantine/math/arithmetic,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_pairing_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -12,7 +12,6 @@ import
|
|||
../constantine/math/arithmetic,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_pairing_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -31,6 +31,7 @@ import
|
|||
../helpers/prng_unsafe,
|
||||
./bench_blueprint
|
||||
|
||||
export abstractions
|
||||
export zoo_pairings # generic sandwich https://github.com/nim-lang/Nim/issues/11225
|
||||
export notes
|
||||
proc separator*() = separator(132)
|
||||
|
|
|
@ -12,7 +12,6 @@ import
|
|||
../constantine/math/arithmetic,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_summary_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -12,7 +12,6 @@ import
|
|||
../constantine/math/arithmetic,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_summary_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -12,7 +12,6 @@ import
|
|||
../constantine/math/arithmetic,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_summary_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -12,7 +12,6 @@ import
|
|||
../constantine/math/arithmetic,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_summary_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -12,7 +12,6 @@ import
|
|||
../constantine/math/arithmetic,
|
||||
../constantine/math/extension_fields,
|
||||
# Helpers
|
||||
../helpers/static_for,
|
||||
./bench_summary_template
|
||||
|
||||
# ############################################################
|
||||
|
|
|
@ -32,7 +32,7 @@ import
|
|||
../constantine/hashes,
|
||||
../constantine/hash_to_curve/hash_to_curve,
|
||||
# Helpers
|
||||
../helpers/[prng_unsafe, static_for],
|
||||
../helpers/prng_unsafe,
|
||||
./bench_blueprint
|
||||
|
||||
export
|
||||
|
|
|
@ -18,7 +18,7 @@ import
|
|||
extended_precision
|
||||
],
|
||||
./bithacks,
|
||||
../../helpers/static_for
|
||||
./static_for
|
||||
|
||||
export
|
||||
ct_types,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
|
||||
import
|
||||
import
|
||||
# Standard library
|
||||
std/[unittest, times],
|
||||
# Internal
|
||||
|
@ -17,7 +17,7 @@ import
|
|||
../../constantine/math/arithmetic,
|
||||
../../constantine/math_gpu/fields_nvidia,
|
||||
# Test utilities
|
||||
../../helpers/[prng_unsafe, static_for]
|
||||
../../helpers/prng_unsafe
|
||||
|
||||
var rng: RngState
|
||||
let seed = uint32(getTime().toUnix() and (1'i64 shl 32 - 1)) # unixTime mod 2^32
|
||||
|
@ -87,7 +87,7 @@ proc t_field_add(curve: static Curve) =
|
|||
let b = rng.random_long01Seq(Fp[curve])
|
||||
|
||||
var rCPU, rGPU_32, rGPU_64: Fp[curve]
|
||||
|
||||
|
||||
rCPU.sum(a, b)
|
||||
fpAdd32.exec(rGPU_32, a, b)
|
||||
fpAdd64.exec(rGPU_64, a, b)
|
||||
|
@ -101,7 +101,7 @@ proc t_field_add(curve: static Curve) =
|
|||
let b = rng.random_long01Seq(Fr[curve])
|
||||
|
||||
var rCPU, rGPU_32, rGPU_64: Fr[curve]
|
||||
|
||||
|
||||
rCPU.sum(a, b)
|
||||
frAdd32.exec(rGPU_32, a, b)
|
||||
frAdd64.exec(rGPU_64, a, b)
|
||||
|
|
|
@ -16,7 +16,7 @@ import
|
|||
../../constantine/math/config/curves,
|
||||
../../constantine/math/io/io_extfields,
|
||||
# Test utilities
|
||||
../../helpers/[prng_unsafe, static_for]
|
||||
../../helpers/prng_unsafe
|
||||
|
||||
const
|
||||
Iters = 2
|
||||
|
|
|
@ -16,7 +16,7 @@ import
|
|||
../../constantine/math/config/curves,
|
||||
../../constantine/math/io/io_extfields,
|
||||
# Test utilities
|
||||
../../helpers/[prng_unsafe, static_for]
|
||||
../../helpers/prng_unsafe
|
||||
|
||||
const
|
||||
Iters = 8
|
||||
|
|
|
@ -23,7 +23,7 @@ import
|
|||
../../constantine/math/arithmetic,
|
||||
../../constantine/math/isogenies/frobenius,
|
||||
# Test utilities
|
||||
../../helpers/[prng_unsafe, static_for]
|
||||
../../helpers/prng_unsafe
|
||||
|
||||
export unittest # Generic sandwich
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import
|
|||
../../constantine/math/arithmetic,
|
||||
../../constantine/math/io/io_extfields,
|
||||
# Test utilities
|
||||
../../helpers/[prng_unsafe, static_for]
|
||||
../../helpers/prng_unsafe
|
||||
|
||||
export unittest # Generic sandwich
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import
|
|||
ec_scalar_mul],
|
||||
../../constantine/math/pairings/lines_eval,
|
||||
# Test utilities
|
||||
../../helpers/[prng_unsafe, static_for]
|
||||
../../helpers/prng_unsafe
|
||||
|
||||
const
|
||||
Iters = 4
|
||||
|
|
|
@ -20,7 +20,7 @@ import
|
|||
ec_shortweierstrass_projective],
|
||||
../../constantine/math/pairings/lines_eval,
|
||||
# Test utilities
|
||||
../../helpers/[prng_unsafe, static_for]
|
||||
../../helpers/prng_unsafe
|
||||
|
||||
const
|
||||
Iters = 4
|
||||
|
|
|
@ -18,7 +18,7 @@ import
|
|||
../../constantine/math/pairings/cyclotomic_subgroups,
|
||||
../../constantine/math/isogenies/frobenius,
|
||||
# Test utilities
|
||||
../../helpers/[prng_unsafe, static_for]
|
||||
../../helpers/prng_unsafe
|
||||
|
||||
const
|
||||
Iters = 4
|
||||
|
|
|
@ -17,7 +17,7 @@ import
|
|||
../../constantine/math/io/io_extfields,
|
||||
../../constantine/math/pairings/lines_eval,
|
||||
# Test utilities
|
||||
../../helpers/[prng_unsafe, static_for]
|
||||
../../helpers/prng_unsafe
|
||||
|
||||
const
|
||||
Iters = 8
|
||||
|
|
Loading…
Reference in New Issue