mirror of
https://github.com/logos-storage/constantine.git
synced 2026-01-02 13:13:07 +00:00
Path reorgs (#240)
* move tests * move threadpool to root path * fix hints and warnings, print nim versions for tests for debugging the new strange issue in CI * print nim version * mixup on branches * mixup on branches reloaded
This commit is contained in:
parent
1c5341fd7e
commit
d996ccd5d8
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -213,6 +213,12 @@ jobs:
|
||||
nimble refresh --verbose -y
|
||||
nimble install --verbose -y gmp jsony asynctools
|
||||
|
||||
- name: Print Nim version
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
nim -v
|
||||
|
||||
- name: Run Constantine tests (UNIX with Assembly)
|
||||
if: runner.os != 'Windows' && matrix.target.BACKEND == 'ASM'
|
||||
shell: bash
|
||||
|
||||
@ -21,7 +21,7 @@ import
|
||||
ec_multi_scalar_mul_parallel],
|
||||
../constantine/math/constants/zoo_subgroups,
|
||||
# Threadpool
|
||||
../constantine/platforms/threadpool/threadpool,
|
||||
../constantine/threadpool/threadpool,
|
||||
# Helpers
|
||||
../helpers/prng_unsafe,
|
||||
./bench_elliptic_template,
|
||||
|
||||
@ -152,6 +152,7 @@ proc genHeaders(bindingsName: string) =
|
||||
echo "Generating header: include/" & bindingsName & ".h"
|
||||
exec "nim c -d:CttGenerateHeaders " &
|
||||
" -d:release " &
|
||||
" --verbosity:0 --hints:off --warnings:off " &
|
||||
" --out:" & bindingsName & "_gen_header.exe --outdir:build " &
|
||||
" --nimcache:nimcache/bindings_curves_headers/" & bindingsName & "_header" &
|
||||
" bindings_generators/" & bindingsName & ".nim"
|
||||
@ -253,187 +254,187 @@ const testDesc: seq[tuple[path: string, useGMP: bool]] = @[
|
||||
|
||||
# Primitives
|
||||
# ----------------------------------------------------------
|
||||
("tests/math/t_primitives.nim", false),
|
||||
("tests/math/t_primitives_extended_precision.nim", false),
|
||||
("tests/primitives/t_primitives.nim", false),
|
||||
("tests/primitives/t_primitives_extended_precision.nim", false),
|
||||
("tests/primitives/t_io_unsaturated.nim", false),
|
||||
|
||||
# Big ints
|
||||
# ----------------------------------------------------------
|
||||
("tests/math/t_io_bigints.nim", false),
|
||||
("tests/math/t_io_unsaturated.nim", false),
|
||||
# ("tests/math/t_bigints.nim", false),
|
||||
# ("tests/math/t_bigints_multimod.nim", false),
|
||||
# ("tests/math/t_bigints_mod_vs_gmp.nim", true),
|
||||
# ("tests/math/t_bigints_mul_vs_gmp.nim", true),
|
||||
# ("tests/math/t_bigints_mul_high_words_vs_gmp.nim", true),
|
||||
("tests/math_bigints/t_io_bigints.nim", false),
|
||||
# ("tests/math_bigints/t_bigints.nim", false),
|
||||
# ("tests/math_bigints/t_bigints_multimod.nim", false),
|
||||
# ("tests/math_bigints/t_bigints_mod_vs_gmp.nim", true),
|
||||
# ("tests/math_bigints/t_bigints_mul_vs_gmp.nim", true),
|
||||
# ("tests/math_bigints/t_bigints_mul_high_words_vs_gmp.nim", true),
|
||||
|
||||
# Field
|
||||
# ----------------------------------------------------------
|
||||
("tests/math/t_io_fields", false),
|
||||
# ("tests/math/t_finite_fields.nim", false),
|
||||
# ("tests/math/t_finite_fields_conditional_arithmetic.nim", false),
|
||||
# ("tests/math/t_finite_fields_mulsquare.nim", false),
|
||||
# ("tests/math/t_finite_fields_sqrt.nim", false),
|
||||
# ("tests/math/t_finite_fields_powinv.nim", false),
|
||||
# ("tests/math/t_finite_fields_vs_gmp.nim", true),
|
||||
# ("tests/math/t_fp_cubic_root.nim", false),
|
||||
("tests/math_fields/t_io_fields", false),
|
||||
# ("tests/math_fields/t_finite_fields.nim", false),
|
||||
# ("tests/math_fields/t_finite_fields_conditional_arithmetic.nim", false),
|
||||
# ("tests/math_fields/t_finite_fields_mulsquare.nim", false),
|
||||
# ("tests/math_fields/t_finite_fields_sqrt.nim", false),
|
||||
# ("tests/math_fields/t_finite_fields_powinv.nim", false),
|
||||
# ("tests/math_fields/t_finite_fields_vs_gmp.nim", true),
|
||||
# ("tests/math_fields/t_fp_cubic_root.nim", false),
|
||||
|
||||
# Double-precision finite fields
|
||||
# ----------------------------------------------------------
|
||||
# ("tests/math/t_finite_fields_double_precision.nim", false),
|
||||
# ("tests/math_fields/t_finite_fields_double_precision.nim", false),
|
||||
|
||||
# Towers of extension fields
|
||||
# ----------------------------------------------------------
|
||||
# ("tests/math/t_fp2.nim", false),
|
||||
# ("tests/math/t_fp2_sqrt.nim", false),
|
||||
# ("tests/math/t_fp4.nim", false),
|
||||
# ("tests/math/t_fp6_bn254_nogami.nim", false),
|
||||
# ("tests/math/t_fp6_bn254_snarks.nim", false),
|
||||
# ("tests/math/t_fp6_bls12_377.nim", false),
|
||||
# ("tests/math/t_fp6_bls12_381.nim", false),
|
||||
# ("tests/math/t_fp6_bw6_761.nim", false),
|
||||
# ("tests/math/t_fp12_bn254_nogami.nim", false),
|
||||
# ("tests/math/t_fp12_bn254_snarks.nim", false),
|
||||
# ("tests/math/t_fp12_bls12_377.nim", false),
|
||||
# ("tests/math/t_fp12_bls12_381.nim", false),
|
||||
# ("tests/math/t_fp12_exponentiation.nim", false),
|
||||
("tests/math/t_fp12_anti_regression.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp2.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp2_sqrt.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp4.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp6_bn254_nogami.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp6_bn254_snarks.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp6_bls12_377.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp6_bls12_381.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp6_bw6_761.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp12_bn254_nogami.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp12_bn254_snarks.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp12_bls12_377.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp12_bls12_381.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp12_exponentiation.nim", false),
|
||||
("tests/math_extension_fields/t_fp12_anti_regression.nim", false),
|
||||
|
||||
# ("tests/math/t_fp4_frobenius.nim", false),
|
||||
# ("tests/math/t_fp6_frobenius.nim", false),
|
||||
# ("tests/math/t_fp12_frobenius.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp4_frobenius.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp6_frobenius.nim", false),
|
||||
# ("tests/math_extension_fields/t_fp12_frobenius.nim", false),
|
||||
|
||||
# Elliptic curve arithmetic
|
||||
# ----------------------------------------------------------
|
||||
# ("tests/math/t_ec_conversion.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_conversion.nim", false),
|
||||
|
||||
# Elliptic curve arithmetic G1
|
||||
# ----------------------------------------------------------
|
||||
# ("tests/math/t_ec_shortw_prj_g1_add_double.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g1_mul_sanity.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g1_mul_distri.nim", false),
|
||||
("tests/math/t_ec_shortw_prj_g1_mul_vs_ref.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g1_mixed_add.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g1_add_double.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g1_mul_sanity.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g1_mul_distri.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_prj_g1_mul_vs_ref.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g1_mixed_add.nim", false),
|
||||
|
||||
# ("tests/math/t_ec_shortw_jac_g1_add_double.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g1_mul_sanity.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g1_mul_distri.nim", false),
|
||||
("tests/math/t_ec_shortw_jac_g1_mul_vs_ref.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g1_mixed_add.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g1_add_double.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g1_mul_sanity.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g1_mul_distri.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_jac_g1_mul_vs_ref.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g1_mixed_add.nim", false),
|
||||
|
||||
("tests/math/t_ec_shortw_jacext_g1_add_double.nim", false),
|
||||
("tests/math/t_ec_shortw_jacext_g1_mixed_add.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_jacext_g1_add_double.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_jacext_g1_mixed_add.nim", false),
|
||||
|
||||
# ("tests/math/t_ec_twedwards_prj_add_double", false),
|
||||
# ("tests/math/t_ec_twedwards_prj_mul_sanity", false),
|
||||
# ("tests/math/t_ec_twedwards_prj_mul_distri", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_twedwards_prj_add_double", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_twedwards_prj_mul_sanity", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_twedwards_prj_mul_distri", false),
|
||||
|
||||
|
||||
# Elliptic curve arithmetic G2
|
||||
# ----------------------------------------------------------
|
||||
# ("tests/math/t_ec_shortw_prj_g2_add_double_bn254_snarks.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mul_sanity_bn254_snarks.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mul_distri_bn254_snarks.nim", false),
|
||||
("tests/math/t_ec_shortw_prj_g2_mul_vs_ref_bn254_snarks.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mixed_add_bn254_snarks.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_add_double_bn254_snarks.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_sanity_bn254_snarks.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_distri_bn254_snarks.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_vs_ref_bn254_snarks.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mixed_add_bn254_snarks.nim", false),
|
||||
|
||||
# ("tests/math/t_ec_shortw_prj_g2_add_double_bls12_381.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mul_sanity_bls12_381.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mul_distri_bls12_381.nim", false),
|
||||
("tests/math/t_ec_shortw_prj_g2_mul_vs_ref_bls12_381.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mixed_add_bls12_381.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_add_double_bls12_381.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_sanity_bls12_381.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_distri_bls12_381.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_vs_ref_bls12_381.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mixed_add_bls12_381.nim", false),
|
||||
|
||||
# ("tests/math/t_ec_shortw_prj_g2_add_double_bls12_377.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mul_sanity_bls12_377.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mul_distri_bls12_377.nim", false),
|
||||
("tests/math/t_ec_shortw_prj_g2_mul_vs_ref_bls12_377.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mixed_add_bls12_377.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_add_double_bls12_377.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_sanity_bls12_377.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_distri_bls12_377.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_vs_ref_bls12_377.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mixed_add_bls12_377.nim", false),
|
||||
|
||||
# ("tests/math/t_ec_shortw_prj_g2_add_double_bw6_761.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mul_sanity_bw6_761.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mul_distri_bw6_761.nim", false),
|
||||
("tests/math/t_ec_shortw_prj_g2_mul_vs_ref_bw6_761.nim", false),
|
||||
# ("tests/math/t_ec_shortw_prj_g2_mixed_add_bw6_761.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_add_double_bw6_761.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_sanity_bw6_761.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_distri_bw6_761.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mul_vs_ref_bw6_761.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_prj_g2_mixed_add_bw6_761.nim", false),
|
||||
|
||||
# ("tests/math/t_ec_shortw_jac_g2_add_double_bn254_snarks.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mul_sanity_bn254_snarks.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mul_distri_bn254_snarks.nim", false),
|
||||
("tests/math/t_ec_shortw_jac_g2_mul_vs_ref_bn254_snarks.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mixed_add_bn254_snarks.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_add_double_bn254_snarks.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_sanity_bn254_snarks.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_distri_bn254_snarks.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_vs_ref_bn254_snarks.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mixed_add_bn254_snarks.nim", false),
|
||||
|
||||
# ("tests/math/t_ec_shortw_jac_g2_add_double_bls12_381.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mul_sanity_bls12_381.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mul_distri_bls12_381.nim", false),
|
||||
("tests/math/t_ec_shortw_jac_g2_mul_vs_ref_bls12_381.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mixed_add_bls12_381.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_add_double_bls12_381.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_sanity_bls12_381.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_distri_bls12_381.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_vs_ref_bls12_381.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mixed_add_bls12_381.nim", false),
|
||||
|
||||
# ("tests/math/t_ec_shortw_jac_g2_add_double_bls12_377.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mul_sanity_bls12_377.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mul_distri_bls12_377.nim", false),
|
||||
("tests/math/t_ec_shortw_jac_g2_mul_vs_ref_bls12_377.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mixed_add_bls12_377.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_add_double_bls12_377.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_sanity_bls12_377.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_distri_bls12_377.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_vs_ref_bls12_377.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mixed_add_bls12_377.nim", false),
|
||||
|
||||
# ("tests/math/t_ec_shortw_jac_g2_add_double_bw6_761.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mul_sanity_bw6_761.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mul_distri_bw6_761.nim", false),
|
||||
("tests/math/t_ec_shortw_jac_g2_mul_vs_ref_bw6_761.nim", false),
|
||||
# ("tests/math/t_ec_shortw_jac_g2_mixed_add_bw6_761.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_add_double_bw6_761.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_sanity_bw6_761.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_distri_bw6_761.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mul_vs_ref_bw6_761.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_shortw_jac_g2_mixed_add_bw6_761.nim", false),
|
||||
|
||||
# Elliptic curve arithmetic vs Sagemath
|
||||
# ----------------------------------------------------------
|
||||
("tests/math/t_ec_frobenius.nim", false),
|
||||
("tests/math/t_ec_sage_bn254_nogami.nim", false),
|
||||
("tests/math/t_ec_sage_bn254_snarks.nim", false),
|
||||
("tests/math/t_ec_sage_bls12_377.nim", false),
|
||||
("tests/math/t_ec_sage_bls12_381.nim", false),
|
||||
("tests/math/t_ec_sage_pallas.nim", false),
|
||||
("tests/math/t_ec_sage_vesta.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_frobenius.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_sage_bn254_nogami.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_sage_bn254_snarks.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_sage_bls12_377.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_sage_bls12_381.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_sage_pallas.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_sage_vesta.nim", false),
|
||||
|
||||
# Edge cases highlighted by past bugs
|
||||
# ----------------------------------------------------------
|
||||
("tests/math/t_ec_shortw_prj_edge_cases.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_prj_edge_cases.nim", false),
|
||||
|
||||
# Elliptic curve arithmetic - batch computation
|
||||
# ----------------------------------------------------------
|
||||
("tests/math/t_ec_shortw_prj_g1_sum_reduce.nim", false),
|
||||
("tests/math/t_ec_shortw_jac_g1_sum_reduce.nim", false),
|
||||
("tests/math/t_ec_shortw_jacext_g1_sum_reduce.nim", false),
|
||||
("tests/math/t_ec_shortw_prj_g1_msm.nim", false),
|
||||
("tests/math/t_ec_shortw_jac_g1_msm.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_prj_g1_sum_reduce.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_jac_g1_sum_reduce.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_jacext_g1_sum_reduce.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_prj_g1_msm.nim", false),
|
||||
("tests/math_elliptic_curves/t_ec_shortw_jac_g1_msm.nim", false),
|
||||
|
||||
# Subgroups and cofactors
|
||||
# ----------------------------------------------------------
|
||||
# ("tests/math/t_ec_subgroups_bn254_nogami.nim", false),
|
||||
# ("tests/math/t_ec_subgroups_bn254_snarks.nim", false),
|
||||
# ("tests/math/t_ec_subgroups_bls12_377.nim", false),
|
||||
# ("tests/math/t_ec_subgroups_bls12_381.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_subgroups_bn254_nogami.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_subgroups_bn254_snarks.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_subgroups_bls12_377.nim", false),
|
||||
# ("tests/math_elliptic_curves/t_ec_subgroups_bls12_381.nim", false),
|
||||
|
||||
# ("tests/math/t_pairing_bn254_nogami_gt_subgroup.nim", false),
|
||||
# ("tests/math/t_pairing_bn254_snarks_gt_subgroup.nim", false),
|
||||
# ("tests/math/t_pairing_bls12_377_gt_subgroup.nim", false),
|
||||
# ("tests/math/t_pairing_bls12_381_gt_subgroup.nim", false),
|
||||
# ("tests/math/t_pairing_bw6_761_gt_subgroup.nim", false),
|
||||
# ("tests/math_pairings/t_pairing_bn254_nogami_gt_subgroup.nim", false),
|
||||
# ("tests/math_pairings/t_pairing_bn254_snarks_gt_subgroup.nim", false),
|
||||
# ("tests/math_pairings/t_pairing_bls12_377_gt_subgroup.nim", false),
|
||||
# ("tests/math_pairings/t_pairing_bls12_381_gt_subgroup.nim", false),
|
||||
# ("tests/math_pairings/t_pairing_bw6_761_gt_subgroup.nim", false),
|
||||
|
||||
# Pairing
|
||||
# ----------------------------------------------------------
|
||||
# ("tests/math/t_pairing_bls12_377_line_functions.nim", false),
|
||||
# ("tests/math/t_pairing_bls12_381_line_functions.nim", false),
|
||||
# ("tests/math/t_pairing_mul_fp12_by_lines.nim", false),
|
||||
("tests/math/t_pairing_cyclotomic_subgroup.nim", false),
|
||||
("tests/math/t_pairing_bn254_nogami_optate.nim", false),
|
||||
("tests/math/t_pairing_bn254_snarks_optate.nim", false),
|
||||
("tests/math/t_pairing_bls12_377_optate.nim", false),
|
||||
("tests/math/t_pairing_bls12_381_optate.nim", false),
|
||||
# ("tests/math_pairings/t_pairing_bls12_377_line_functions.nim", false),
|
||||
# ("tests/math_pairings/t_pairing_bls12_381_line_functions.nim", false),
|
||||
# ("tests/math_pairings/t_pairing_mul_fp12_by_lines.nim", false),
|
||||
("tests/math_pairings/t_pairing_cyclotomic_subgroup.nim", false),
|
||||
("tests/math_pairings/t_pairing_bn254_nogami_optate.nim", false),
|
||||
("tests/math_pairings/t_pairing_bn254_snarks_optate.nim", false),
|
||||
("tests/math_pairings/t_pairing_bls12_377_optate.nim", false),
|
||||
("tests/math_pairings/t_pairing_bls12_381_optate.nim", false),
|
||||
|
||||
# Multi-Pairing
|
||||
# ----------------------------------------------------------
|
||||
("tests/math/t_pairing_bn254_nogami_multi.nim", false),
|
||||
("tests/math/t_pairing_bn254_snarks_multi.nim", false),
|
||||
("tests/math/t_pairing_bls12_377_multi.nim", false),
|
||||
("tests/math/t_pairing_bls12_381_multi.nim", false),
|
||||
("tests/math_pairings/t_pairing_bn254_nogami_multi.nim", false),
|
||||
("tests/math_pairings/t_pairing_bn254_snarks_multi.nim", false),
|
||||
("tests/math_pairings/t_pairing_bls12_377_multi.nim", false),
|
||||
("tests/math_pairings/t_pairing_bls12_381_multi.nim", false),
|
||||
|
||||
# Prime order fields
|
||||
# ----------------------------------------------------------
|
||||
("tests/math/t_fr.nim", false),
|
||||
("tests/math_fields/t_fr.nim", false),
|
||||
|
||||
# Hashing to elliptic curves
|
||||
# ----------------------------------------------------------
|
||||
@ -453,21 +454,21 @@ const testDescNvidia: seq[string] = @[
|
||||
]
|
||||
|
||||
const testDescThreadpool: seq[string] = @[
|
||||
"constantine/platforms/threadpool/examples/e01_simple_tasks.nim",
|
||||
"constantine/platforms/threadpool/examples/e02_parallel_pi.nim",
|
||||
"constantine/platforms/threadpool/examples/e03_parallel_for.nim",
|
||||
"constantine/platforms/threadpool/examples/e04_parallel_reduce.nim",
|
||||
# "constantine/platforms/threadpool/benchmarks/bouncing_producer_consumer/threadpool_bpc.nim", # Need timing not implemented on Windows
|
||||
"constantine/platforms/threadpool/benchmarks/dfs/threadpool_dfs.nim",
|
||||
"constantine/platforms/threadpool/benchmarks/fibonacci/threadpool_fib.nim",
|
||||
"constantine/platforms/threadpool/benchmarks/heat/threadpool_heat.nim",
|
||||
# "constantine/platforms/threadpool/benchmarks/matmul_cache_oblivious/threadpool_matmul_co.nim",
|
||||
"constantine/platforms/threadpool/benchmarks/nqueens/threadpool_nqueens.nim",
|
||||
# "constantine/platforms/threadpool/benchmarks/single_task_producer/threadpool_spc.nim", # Need timing not implemented on Windows
|
||||
# "constantine/platforms/threadpool/benchmarks/black_scholes/threadpool_black_scholes.nim", # Need input file
|
||||
"constantine/platforms/threadpool/benchmarks/matrix_transposition/threadpool_transposes.nim",
|
||||
"constantine/platforms/threadpool/benchmarks/histogram_2D/threadpool_histogram.nim",
|
||||
"constantine/platforms/threadpool/benchmarks/logsumexp/threadpool_logsumexp.nim",
|
||||
"constantine/threadpool/examples/e01_simple_tasks.nim",
|
||||
"constantine/threadpool/examples/e02_parallel_pi.nim",
|
||||
"constantine/threadpool/examples/e03_parallel_for.nim",
|
||||
"constantine/threadpool/examples/e04_parallel_reduce.nim",
|
||||
# "constantine/threadpool/benchmarks/bouncing_producer_consumer/threadpool_bpc.nim", # Need timing not implemented on Windows
|
||||
"constantine/threadpool/benchmarks/dfs/threadpool_dfs.nim",
|
||||
"constantine/threadpool/benchmarks/fibonacci/threadpool_fib.nim",
|
||||
"constantine/threadpool/benchmarks/heat/threadpool_heat.nim",
|
||||
# "constantine/threadpool/benchmarks/matmul_cache_oblivious/threadpool_matmul_co.nim",
|
||||
"constantine/threadpool/benchmarks/nqueens/threadpool_nqueens.nim",
|
||||
# "constantine/threadpool/benchmarks/single_task_producer/threadpool_spc.nim", # Need timing not implemented on Windows
|
||||
# "constantine/threadpool/benchmarks/black_scholes/threadpool_black_scholes.nim", # Need input file
|
||||
"constantine/threadpool/benchmarks/matrix_transposition/threadpool_transposes.nim",
|
||||
"constantine/threadpool/benchmarks/histogram_2D/threadpool_histogram.nim",
|
||||
"constantine/threadpool/benchmarks/logsumexp/threadpool_logsumexp.nim",
|
||||
]
|
||||
|
||||
const testDescMultithreadedCrypto: seq[string] = @[
|
||||
@ -508,8 +509,8 @@ const benchDesc = [
|
||||
|
||||
# For temporary (hopefully) investigation that can only be reproduced in CI
|
||||
const useDebug = [
|
||||
"tests/math/t_bigints.nim",
|
||||
"tests/math/t_hash_sha256_vs_openssl.nim",
|
||||
"tests/math_bigints/t_bigints.nim",
|
||||
"tests/t_hash_sha256_vs_openssl.nim",
|
||||
]
|
||||
|
||||
# Skip sanitizers for specific tests
|
||||
|
||||
@ -11,7 +11,7 @@ import ./ec_multi_scalar_mul_scheduler,
|
||||
./ec_endomorphism_accel,
|
||||
../extension_fields,
|
||||
../constants/zoo_endomorphisms,
|
||||
../../platforms/threadpool/[threadpool, partitioners]
|
||||
../../threadpool/[threadpool, partitioners]
|
||||
export bestBucketBitSize
|
||||
|
||||
# No exceptions allowed in core cryptographic operations
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import
|
||||
../../platforms/abstractions,
|
||||
../../platforms/threadpool/[threadpool, partitioners],
|
||||
../../threadpool/[threadpool, partitioners],
|
||||
./ec_shortweierstrass_affine,
|
||||
./ec_shortweierstrass_jacobian,
|
||||
./ec_shortweierstrass_projective,
|
||||
|
||||
@ -157,7 +157,10 @@ template `<=`*[T: Ct](x, y: T): CTBool[T] =
|
||||
not(y < x)
|
||||
|
||||
template `xor`*[T: Ct](x, y: CTBool[T]): CTBool[T] =
|
||||
CTBool[T](noteq(T(x), T(y)))
|
||||
{.push hint[ConvFromXtoItselfNotNeeded]: off.}
|
||||
let r = CTBool[T](noteq(T(x), T(y)))
|
||||
{.pop.}
|
||||
r
|
||||
|
||||
# ############################################################
|
||||
#
|
||||
|
||||
@ -6,6 +6,8 @@
|
||||
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
{.push used.} # Some SIMDs are implemented but not exported.
|
||||
|
||||
static: doAssert defined(i386) or defined(amd64)
|
||||
|
||||
# SIMD throughput and latency:
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
|
||||
import
|
||||
std/atomics,
|
||||
../../platforms/allocs,
|
||||
../instrumentation,
|
||||
../../allocs,
|
||||
./tasks_flowvars
|
||||
|
||||
type
|
||||
@ -8,10 +8,10 @@
|
||||
|
||||
import
|
||||
std/atomics,
|
||||
./scoped_barriers,
|
||||
../../platforms/allocs,
|
||||
../primitives/futexes,
|
||||
../instrumentation,
|
||||
../../allocs,
|
||||
../primitives/futexes
|
||||
./scoped_barriers
|
||||
|
||||
# Tasks have an efficient design so that a single heap allocation
|
||||
# is required per `spawn`.
|
||||
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
@ -8,7 +8,7 @@
|
||||
import
|
||||
std/macros,
|
||||
./crossthread/tasks_flowvars,
|
||||
../ast_rebuilder
|
||||
../platforms/ast_rebuilder
|
||||
|
||||
# Parallel offloading API
|
||||
# -----------------------
|
||||
@ -21,14 +21,14 @@ import
|
||||
./instrumentation,
|
||||
./primitives/barriers,
|
||||
./parallel_offloading,
|
||||
../allocs, ../bithacks
|
||||
../platforms/[allocs, bithacks]
|
||||
|
||||
export
|
||||
# flowvars
|
||||
Flowvar, isSpawned, isReady
|
||||
|
||||
when defined(TP_Metrics):
|
||||
import ../static_for
|
||||
import ../platforms/static_for
|
||||
import system/ansi_c
|
||||
|
||||
# ############################################################
|
||||
@ -10,9 +10,9 @@ import
|
||||
# Standard library
|
||||
std/[unittest, times],
|
||||
# Internals
|
||||
../../constantine/math/config/[common, curves],
|
||||
../../constantine/math/[arithmetic, primitives],
|
||||
../../constantine/math/io/[io_bigints, io_fields, io_ec],
|
||||
../../constantine/math/config/curves,
|
||||
../../constantine/math/arithmetic,
|
||||
../../constantine/math/io/io_fields,
|
||||
../../constantine/math/elliptic/[ec_shortweierstrass_affine, ec_shortweierstrass_jacobian, ec_scalar_mul],
|
||||
# Test utilities
|
||||
../../helpers/prng_unsafe,
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user