From 9584f57dcab3c634c997a2a8ef27c984b75ea7a6 Mon Sep 17 00:00:00 2001 From: "Mayeul@Zama" <69792125+mayeul-zama@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:54:10 +0100 Subject: [PATCH] fix(typo): rename parametrized parameterized --- .../algorithms/test/ggsw_encryption.rs | 8 +- .../algorithms/test/glwe_encryption.rs | 14 +-- .../algorithms/test/glwe_linear_algebra.rs | 22 ++-- .../algorithms/test/glwe_sample_extraction.rs | 2 +- .../algorithms/test/lwe_encryption.rs | 28 ++--- .../algorithms/test/lwe_keyswitch.rs | 2 +- .../algorithms/test/lwe_linear_algebra.rs | 18 +-- .../algorithms/test/lwe_packing_keyswitch.rs | 4 +- .../test/lwe_programmable_bootstrapping.rs | 8 +- tfhe/src/core_crypto/algorithms/test/mod.rs | 10 +- .../test/modulus_switch_compression.rs | 2 +- .../lwe_encryption_noise.rs | 6 +- .../noise_distribution/lwe_keyswitch_noise.rs | 2 +- .../lwe_programmable_bootstrapping_noise.rs | 2 +- .../core_crypto/entities/ggsw_ciphertext.rs | 6 +- .../core_crypto/entities/gsw_ciphertext.rs | 4 +- .../algorithms/test/lwe_fast_keyswitch.rs | 2 +- .../algorithms/test/glwe_sample_extraction.rs | 2 +- .../gpu/algorithms/test/lwe_keyswitch.rs | 2 +- .../gpu/algorithms/test/lwe_linear_algebra.rs | 2 +- ...we_multi_bit_programmable_bootstrapping.rs | 2 +- .../algorithms/test/lwe_packing_keyswitch.rs | 4 +- .../test/lwe_programmable_bootstrapping.rs | 2 +- .../core_crypto/gpu/algorithms/test/mod.rs | 10 +- .../radix/tests_long_run/test_erc20.rs | 8 +- .../server_key/radix/tests_signed/test_abs.rs | 6 +- .../server_key/radix/tests_signed/test_add.rs | 10 +- .../radix/tests_signed/test_bitwise_op.rs | 16 +-- .../radix/tests_signed/test_cmux.rs | 6 +- .../radix/tests_signed/test_comparison.rs | 16 +-- .../radix/tests_signed/test_div_mod.rs | 4 +- .../radix/tests_signed/test_ilog2.rs | 14 +-- .../server_key/radix/tests_signed/test_mul.rs | 6 +- .../server_key/radix/tests_signed/test_neg.rs | 6 +- .../radix/tests_signed/test_rotate.rs | 10 +- .../radix/tests_signed/test_scalar_add.rs | 8 +- .../tests_signed/test_scalar_bitwise_op.rs | 8 +- .../tests_signed/test_scalar_comparison.rs | 14 +-- .../radix/tests_signed/test_scalar_div_mod.rs | 4 +- .../radix/tests_signed/test_scalar_mul.rs | 4 +- .../radix/tests_signed/test_scalar_rotate.rs | 10 +- .../radix/tests_signed/test_scalar_shift.rs | 10 +- .../radix/tests_signed/test_scalar_sub.rs | 6 +- .../radix/tests_signed/test_shift.rs | 10 +- .../server_key/radix/tests_signed/test_sub.rs | 10 +- .../server_key/radix/tests_unsigned/mod.rs | 6 +- .../radix/tests_unsigned/test_add.rs | 12 +- .../radix/tests_unsigned/test_bitwise_op.rs | 18 +-- .../radix/tests_unsigned/test_cmux.rs | 4 +- .../radix/tests_unsigned/test_comparison.rs | 14 +-- .../radix/tests_unsigned/test_div_mod.rs | 8 +- .../radix/tests_unsigned/test_ilog2.rs | 14 +-- .../radix/tests_unsigned/test_mul.rs | 6 +- .../radix/tests_unsigned/test_neg.rs | 6 +- .../radix/tests_unsigned/test_rotate.rs | 10 +- .../radix/tests_unsigned/test_scalar_add.rs | 8 +- .../tests_unsigned/test_scalar_bitwise_op.rs | 8 +- .../tests_unsigned/test_scalar_comparison.rs | 16 +-- .../tests_unsigned/test_scalar_div_mod.rs | 4 +- .../radix/tests_unsigned/test_scalar_mul.rs | 6 +- .../tests_unsigned/test_scalar_rotate.rs | 10 +- .../radix/tests_unsigned/test_scalar_shift.rs | 10 +- .../radix/tests_unsigned/test_scalar_sub.rs | 6 +- .../radix/tests_unsigned/test_shift.rs | 10 +- .../radix/tests_unsigned/test_sub.rs | 8 +- tfhe/src/integer/public_key/standard.rs | 4 +- tfhe/src/integer/public_key/tests.rs | 10 +- tfhe/src/integer/server_key/crt/tests.rs | 18 +-- .../integer/server_key/radix/bitwise_op.rs | 8 +- tfhe/src/integer/server_key/radix/tests.rs | 98 ++++++++-------- .../server_key/radix_parallel/reverse_bits.rs | 4 +- .../tests_long_run/test_erc20.rs | 10 +- .../radix_parallel/tests_signed/mod.rs | 10 +- .../modulus_switch_compression.rs | 4 +- .../radix_parallel/tests_signed/test_abs.rs | 8 +- .../radix_parallel/tests_signed/test_add.rs | 22 ++-- .../tests_signed/test_bitwise_op.rs | 16 +-- .../radix_parallel/tests_signed/test_cmux.rs | 6 +- .../tests_signed/test_comparison.rs | 42 +++---- .../tests_signed/test_count_zeros_ones.rs | 6 +- .../tests_signed/test_div_rem.rs | 6 +- .../radix_parallel/tests_signed/test_ilog2.rs | 14 +-- .../radix_parallel/tests_signed/test_mul.rs | 8 +- .../radix_parallel/tests_signed/test_neg.rs | 8 +- .../tests_signed/test_rotate.rs | 10 +- .../tests_signed/test_scalar_add.rs | 8 +- .../tests_signed/test_scalar_bitwise_op.rs | 8 +- .../tests_signed/test_scalar_comparison.rs | 44 ++++---- .../tests_signed/test_scalar_div_mod.rs | 4 +- .../tests_signed/test_scalar_mul.rs | 4 +- .../tests_signed/test_scalar_rotate.rs | 10 +- .../tests_signed/test_scalar_shift.rs | 10 +- .../tests_signed/test_scalar_sub.rs | 6 +- .../radix_parallel/tests_signed/test_shift.rs | 10 +- .../radix_parallel/tests_signed/test_sub.rs | 18 +-- .../tests_signed/test_vector_comparisons.rs | 6 +- .../radix_parallel/tests_unsigned/mod.rs | 14 +-- .../modulus_switch_compression.rs | 4 +- .../radix_parallel/tests_unsigned/test_add.rs | 24 ++-- .../tests_unsigned/test_bitwise_op.rs | 24 ++-- .../tests_unsigned/test_cmux.rs | 6 +- .../tests_unsigned/test_comparison.rs | 40 +++---- .../tests_unsigned/test_count_zeros_ones.rs | 6 +- .../tests_unsigned/test_div_mod.rs | 14 +-- .../tests_unsigned/test_ilog2.rs | 14 +-- .../radix_parallel/tests_unsigned/test_mul.rs | 18 +-- .../radix_parallel/tests_unsigned/test_neg.rs | 6 +- .../tests_unsigned/test_rotate.rs | 10 +- .../tests_unsigned/test_scalar_add.rs | 8 +- .../tests_unsigned/test_scalar_bitwise_op.rs | 8 +- .../tests_unsigned/test_scalar_comparison.rs | 48 ++++---- .../tests_unsigned/test_scalar_div_mod.rs | 4 +- .../tests_unsigned/test_scalar_mul.rs | 12 +- .../tests_unsigned/test_scalar_rotate.rs | 10 +- .../tests_unsigned/test_scalar_shift.rs | 10 +- .../tests_unsigned/test_scalar_sub.rs | 8 +- .../tests_unsigned/test_shift.rs | 10 +- .../tests_unsigned/test_slice.rs | 14 +-- .../radix_parallel/tests_unsigned/test_sub.rs | 18 +-- .../radix_parallel/tests_unsigned/test_sum.rs | 8 +- .../tests_unsigned/test_vector_comparisons.rs | 8 +- .../tests_unsigned/test_vector_find.rs | 48 ++++---- tfhe/src/integer/tests.rs | 10 +- tfhe/src/integer/wopbs/test.rs | 14 +-- tfhe/src/shortint/server_key/tests/mod.rs | 4 +- .../tests/modulus_switch_compression.rs | 4 +- ...metrized_test.rs => parameterized_test.rs} | 106 +++++++++--------- ...meterized_test_bivariate_pbs_compliant.rs} | 86 +++++++------- .../server_key/tests/shortint_compact_pk.rs | 12 +- tfhe/src/shortint/wopbs/test.rs | 24 ++-- 130 files changed, 817 insertions(+), 811 deletions(-) rename tfhe/src/shortint/server_key/tests/{parametrized_test.rs => parameterized_test.rs} (94%) rename tfhe/src/shortint/server_key/tests/{parametrized_test_bivariate_pbs_compliant.rs => parameterized_test_bivariate_pbs_compliant.rs} (92%) diff --git a/tfhe/src/core_crypto/algorithms/test/ggsw_encryption.rs b/tfhe/src/core_crypto/algorithms/test/ggsw_encryption.rs index cf659da4b3..c7fa0910be 100644 --- a/tfhe/src/core_crypto/algorithms/test/ggsw_encryption.rs +++ b/tfhe/src/core_crypto/algorithms/test/ggsw_encryption.rs @@ -240,7 +240,7 @@ fn ggsw_encrypt_decrypt_custom_mod(params: ClassicTestPar } } -create_parametrized_test_with_non_native_parameters!(ggsw_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(ggsw_encrypt_decrypt_custom_mod); fn ggsw_par_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -308,7 +308,7 @@ fn ggsw_par_encrypt_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!(ggsw_par_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(ggsw_par_encrypt_decrypt_custom_mod); fn ggsw_seeded_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -379,7 +379,7 @@ fn ggsw_seeded_encrypt_decrypt_custom_mod( } } -create_parametrized_test!(ggsw_seeded_encrypt_decrypt_custom_mod); +create_parameterized_test!(ggsw_seeded_encrypt_decrypt_custom_mod); fn ggsw_seeded_par_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -450,4 +450,4 @@ fn ggsw_seeded_par_encrypt_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!(glwe_encrypt_assign_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(glwe_encrypt_assign_decrypt_custom_mod); fn glwe_encrypt_decrypt_custom_mod(params: ClassicTestParams) { let glwe_dimension = params.glwe_dimension; @@ -141,7 +141,7 @@ fn glwe_encrypt_decrypt_custom_mod(params: ClassicTestPar } } -create_parametrized_test_with_non_native_parameters!(glwe_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(glwe_encrypt_decrypt_custom_mod); fn glwe_list_encrypt_decrypt_custom_mod(params: ClassicTestParams) { let glwe_dimension = params.glwe_dimension; @@ -217,7 +217,7 @@ fn glwe_list_encrypt_decrypt_custom_mod(params: ClassicTe } } -create_parametrized_test_with_non_native_parameters!(glwe_list_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(glwe_list_encrypt_decrypt_custom_mod); fn glwe_trivial_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -282,7 +282,7 @@ fn glwe_trivial_encrypt_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!(glwe_trivial_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(glwe_trivial_encrypt_decrypt_custom_mod); fn glwe_allocate_trivial_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -340,7 +340,7 @@ fn glwe_allocate_trivial_encrypt_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!( +create_parameterized_test_with_non_native_parameters!( glwe_allocate_trivial_encrypt_decrypt_custom_mod ); @@ -424,7 +424,7 @@ fn glwe_seeded_encrypt_decrypt_custom_mod( } } -create_parametrized_test!(glwe_seeded_encrypt_decrypt_custom_mod); +create_parameterized_test!(glwe_seeded_encrypt_decrypt_custom_mod); fn glwe_seeded_list_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -505,4 +505,4 @@ fn glwe_seeded_list_encrypt_decrypt_custom_mod( } } -create_parametrized_test!(glwe_seeded_list_encrypt_decrypt_custom_mod); +create_parameterized_test!(glwe_seeded_list_encrypt_decrypt_custom_mod); diff --git a/tfhe/src/core_crypto/algorithms/test/glwe_linear_algebra.rs b/tfhe/src/core_crypto/algorithms/test/glwe_linear_algebra.rs index 39d3d12f91..5bee66fc59 100644 --- a/tfhe/src/core_crypto/algorithms/test/glwe_linear_algebra.rs +++ b/tfhe/src/core_crypto/algorithms/test/glwe_linear_algebra.rs @@ -84,7 +84,7 @@ fn glwe_encrypt_add_assign_decrypt_custom_mod( } } -create_parametrized_test!(glwe_encrypt_add_assign_decrypt_custom_mod); +create_parameterized_test!(glwe_encrypt_add_assign_decrypt_custom_mod); fn glwe_encrypt_add_decrypt_custom_mod(params: ClassicTestParams) { let glwe_dimension = params.glwe_dimension; @@ -165,7 +165,7 @@ fn glwe_encrypt_add_decrypt_custom_mod(params: ClassicTes } } -create_parametrized_test!(glwe_encrypt_add_decrypt_custom_mod); +create_parameterized_test!(glwe_encrypt_add_decrypt_custom_mod); fn glwe_encrypt_plaintext_list_add_assign_decrypt_custom_mod( params: ClassicTestParams, @@ -244,7 +244,7 @@ fn glwe_encrypt_plaintext_list_add_assign_decrypt_custom_mod( params: ClassicTestParams, @@ -323,7 +323,7 @@ fn glwe_encrypt_plaintext_list_sub_assign_decrypt_custom_mod( params: ClassicTestParams, @@ -403,7 +403,7 @@ fn glwe_encrypt_plaintext_add_assign_decrypt_custom_mod( } } -create_parametrized_test!(glwe_encrypt_plaintext_add_assign_decrypt_custom_mod); +create_parameterized_test!(glwe_encrypt_plaintext_add_assign_decrypt_custom_mod); fn glwe_encrypt_plaintext_sub_assign_decrypt_custom_mod( params: ClassicTestParams, @@ -483,7 +483,7 @@ fn glwe_encrypt_plaintext_sub_assign_decrypt_custom_mod( } } -create_parametrized_test!(glwe_encrypt_plaintext_sub_assign_decrypt_custom_mod); +create_parameterized_test!(glwe_encrypt_plaintext_sub_assign_decrypt_custom_mod); fn glwe_encrypt_opposite_assign_decrypt_custom_mod( params: ClassicTestParams, @@ -564,7 +564,7 @@ fn glwe_encrypt_opposite_assign_decrypt_custom_mod( } } -create_parametrized_test!(glwe_encrypt_opposite_assign_decrypt_custom_mod); +create_parameterized_test!(glwe_encrypt_opposite_assign_decrypt_custom_mod); fn glwe_encrypt_cleartext_mul_assign_decrypt_custom_mod( params: ClassicTestParams, @@ -646,7 +646,7 @@ fn glwe_encrypt_cleartext_mul_assign_decrypt_custom_mod( } } -create_parametrized_test!(glwe_encrypt_cleartext_mul_assign_decrypt_custom_mod); +create_parameterized_test!(glwe_encrypt_cleartext_mul_assign_decrypt_custom_mod); fn glwe_encrypt_cleartext_mul_decrypt_custom_mod( params: ClassicTestParams, @@ -730,7 +730,7 @@ fn glwe_encrypt_cleartext_mul_decrypt_custom_mod( } } -create_parametrized_test!(glwe_encrypt_cleartext_mul_decrypt_custom_mod); +create_parameterized_test!(glwe_encrypt_cleartext_mul_decrypt_custom_mod); fn glwe_encrypt_sub_assign_decrypt_custom_mod( params: ClassicTestParams, @@ -811,7 +811,7 @@ fn glwe_encrypt_sub_assign_decrypt_custom_mod( } } -create_parametrized_test!(glwe_encrypt_sub_assign_decrypt_custom_mod); +create_parameterized_test!(glwe_encrypt_sub_assign_decrypt_custom_mod); fn glwe_encrypt_sub_decrypt_custom_mod(params: ClassicTestParams) { let glwe_dimension = params.glwe_dimension; @@ -892,4 +892,4 @@ fn glwe_encrypt_sub_decrypt_custom_mod(params: ClassicTes } } -create_parametrized_test!(glwe_encrypt_sub_decrypt_custom_mod); +create_parameterized_test!(glwe_encrypt_sub_decrypt_custom_mod); diff --git a/tfhe/src/core_crypto/algorithms/test/glwe_sample_extraction.rs b/tfhe/src/core_crypto/algorithms/test/glwe_sample_extraction.rs index 6edffce548..1046f7f4fc 100644 --- a/tfhe/src/core_crypto/algorithms/test/glwe_sample_extraction.rs +++ b/tfhe/src/core_crypto/algorithms/test/glwe_sample_extraction.rs @@ -118,4 +118,4 @@ fn glwe_encrypt_sample_extract_decrypt_custom_mod(params: ClassicTestPara } } -create_parametrized_test_with_non_native_parameters!(lwe_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_encrypt_decrypt_custom_mod); fn lwe_allocate_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -258,7 +258,7 @@ fn lwe_allocate_encrypt_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!(lwe_allocate_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_allocate_encrypt_decrypt_custom_mod); fn lwe_trivial_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -310,7 +310,7 @@ fn lwe_trivial_encrypt_decrypt_custom_mod( break; } } -create_parametrized_test_with_non_native_parameters!(lwe_trivial_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_trivial_encrypt_decrypt_custom_mod); fn lwe_allocate_trivial_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -361,7 +361,7 @@ fn lwe_allocate_trivial_encrypt_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!( +create_parameterized_test_with_non_native_parameters!( lwe_allocate_trivial_encrypt_decrypt_custom_mod ); @@ -432,7 +432,7 @@ fn lwe_list_encrypt_decrypt_custom_mod(params: ClassicTes } } -create_parametrized_test_with_non_native_parameters!(lwe_list_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_list_encrypt_decrypt_custom_mod); fn lwe_list_par_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -503,7 +503,7 @@ fn lwe_list_par_encrypt_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!(lwe_list_par_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_list_par_encrypt_decrypt_custom_mod); fn lwe_public_encrypt_decrypt_custom_mod(params: ClassicTestParams) { let lwe_dimension = params.lwe_dimension; @@ -569,7 +569,7 @@ fn lwe_public_encrypt_decrypt_custom_mod(params: ClassicT } } -create_parametrized_test_with_non_native_parameters!(lwe_public_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_public_encrypt_decrypt_custom_mod); fn lwe_seeded_public_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -644,7 +644,7 @@ fn lwe_seeded_public_encrypt_decrypt_custom_mod( } } -create_parametrized_test!(lwe_seeded_public_encrypt_decrypt_custom_mod); +create_parameterized_test!(lwe_seeded_public_encrypt_decrypt_custom_mod); fn lwe_seeded_list_par_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -727,7 +727,7 @@ fn lwe_seeded_list_par_encrypt_decrypt_custom_mod(params: ClassicTestParams) { let lwe_dimension = params.lwe_dimension; @@ -793,7 +793,7 @@ fn lwe_seeded_encrypt_decrypt_custom_mod(params: ClassicT } } -create_parametrized_test_with_non_native_parameters!(lwe_seeded_encrypt_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_seeded_encrypt_decrypt_custom_mod); fn lwe_seeded_allocate_encrypt_decrypt_custom_mod( params: ClassicTestParams, @@ -854,7 +854,7 @@ fn lwe_seeded_allocate_encrypt_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!( +create_parameterized_test_with_non_native_parameters!( lwe_seeded_allocate_encrypt_decrypt_custom_mod ); @@ -992,7 +992,7 @@ fn lwe_compact_public_encrypt_decrypt_custom_mod( } } -create_parametrized_test!(lwe_compact_public_encrypt_decrypt_custom_mod { +create_parameterized_test!(lwe_compact_public_encrypt_decrypt_custom_mod { TEST_PARAMS_4_BITS_NATIVE_U64 }); @@ -1099,7 +1099,7 @@ fn lwe_compact_public_encrypt_prove_verify_decrypt_custom_mod( } #[cfg(feature = "zk-pok")] -create_parametrized_test!(lwe_compact_public_encrypt_prove_verify_decrypt_custom_mod { +create_parameterized_test!(lwe_compact_public_encrypt_prove_verify_decrypt_custom_mod { TEST_PARAMS_4_BITS_NATIVE_U64 }); diff --git a/tfhe/src/core_crypto/algorithms/test/lwe_keyswitch.rs b/tfhe/src/core_crypto/algorithms/test/lwe_keyswitch.rs index 6a56070fbe..b8475aba6a 100644 --- a/tfhe/src/core_crypto/algorithms/test/lwe_keyswitch.rs +++ b/tfhe/src/core_crypto/algorithms/test/lwe_keyswitch.rs @@ -107,7 +107,7 @@ fn lwe_encrypt_ks_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!(lwe_encrypt_ks_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_encrypt_ks_decrypt_custom_mod); #[test] fn test_lwe_encrypt_ks_switch_mod_decrypt_custom_mod() { diff --git a/tfhe/src/core_crypto/algorithms/test/lwe_linear_algebra.rs b/tfhe/src/core_crypto/algorithms/test/lwe_linear_algebra.rs index 15dcf1b1c9..42b27a1e1a 100644 --- a/tfhe/src/core_crypto/algorithms/test/lwe_linear_algebra.rs +++ b/tfhe/src/core_crypto/algorithms/test/lwe_linear_algebra.rs @@ -72,7 +72,7 @@ fn lwe_encrypt_add_assign_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!(lwe_encrypt_add_assign_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_encrypt_add_assign_decrypt_custom_mod); fn lwe_encrypt_add_decrypt_custom_mod(params: ClassicTestParams) { let lwe_dimension = params.lwe_dimension; @@ -139,7 +139,7 @@ fn lwe_encrypt_add_decrypt_custom_mod(params: ClassicTest } } -create_parametrized_test_with_non_native_parameters!(lwe_encrypt_add_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_encrypt_add_decrypt_custom_mod); fn lwe_encrypt_plaintext_add_assign_decrypt_custom_mod( params: ClassicTestParams, @@ -206,7 +206,7 @@ fn lwe_encrypt_plaintext_add_assign_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!( +create_parameterized_test_with_non_native_parameters!( lwe_encrypt_plaintext_add_assign_decrypt_custom_mod ); @@ -275,7 +275,7 @@ fn lwe_encrypt_plaintext_sub_assign_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!( +create_parameterized_test_with_non_native_parameters!( lwe_encrypt_plaintext_sub_assign_decrypt_custom_mod ); @@ -344,7 +344,7 @@ fn lwe_encrypt_opposite_assign_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!( +create_parameterized_test_with_non_native_parameters!( lwe_encrypt_opposite_assign_decrypt_custom_mod ); @@ -414,7 +414,7 @@ fn lwe_encrypt_ciphertext_cleartext_mul_assign_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!(lwe_encrypt_cleartext_mul_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_encrypt_cleartext_mul_decrypt_custom_mod); fn lwe_encrypt_sub_assign_decrypt_custom_mod( params: ClassicTestParams, @@ -575,7 +575,7 @@ fn lwe_encrypt_sub_assign_decrypt_custom_mod( } } -create_parametrized_test_with_non_native_parameters!(lwe_encrypt_sub_assign_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_encrypt_sub_assign_decrypt_custom_mod); fn lwe_encrypt_sub_decrypt_custom_mod(params: ClassicTestParams) { let lwe_dimension = params.lwe_dimension; @@ -664,4 +664,4 @@ fn lwe_encrypt_sub_decrypt_custom_mod(params: ClassicTest } } -create_parametrized_test_with_non_native_parameters!(lwe_encrypt_sub_decrypt_custom_mod); +create_parameterized_test_with_non_native_parameters!(lwe_encrypt_sub_decrypt_custom_mod); diff --git a/tfhe/src/core_crypto/algorithms/test/lwe_packing_keyswitch.rs b/tfhe/src/core_crypto/algorithms/test/lwe_packing_keyswitch.rs index 67bc7d286c..58691c556c 100644 --- a/tfhe/src/core_crypto/algorithms/test/lwe_packing_keyswitch.rs +++ b/tfhe/src/core_crypto/algorithms/test/lwe_packing_keyswitch.rs @@ -115,7 +115,7 @@ where } } -create_parametrized_test!(lwe_encrypt_pks_to_glwe_decrypt_custom_mod); +create_parameterized_test!(lwe_encrypt_pks_to_glwe_decrypt_custom_mod); fn lwe_list_encrypt_pks_to_glwe_decrypt_custom_mod(params: P) where @@ -221,4 +221,4 @@ where } } -create_parametrized_test!(lwe_list_encrypt_pks_to_glwe_decrypt_custom_mod); +create_parameterized_test!(lwe_list_encrypt_pks_to_glwe_decrypt_custom_mod); diff --git a/tfhe/src/core_crypto/algorithms/test/lwe_programmable_bootstrapping.rs b/tfhe/src/core_crypto/algorithms/test/lwe_programmable_bootstrapping.rs index 2ba8d42179..ae8c238f17 100644 --- a/tfhe/src/core_crypto/algorithms/test/lwe_programmable_bootstrapping.rs +++ b/tfhe/src/core_crypto/algorithms/test/lwe_programmable_bootstrapping.rs @@ -162,7 +162,7 @@ where } } -create_parametrized_test!(lwe_encrypt_pbs_decrypt_custom_mod); +create_parameterized_test!(lwe_encrypt_pbs_decrypt_custom_mod); fn lwe_encrypt_batch_pbs_decrypt_custom_mod(params: ClassicTestParams) where @@ -305,7 +305,7 @@ where } } -create_parametrized_test!(lwe_encrypt_batch_pbs_decrypt_custom_mod); +create_parameterized_test!(lwe_encrypt_batch_pbs_decrypt_custom_mod); // Here we will define a helper function to generate a many lut accumulator for a PBS fn generate_accumulator_many_lut>( @@ -513,7 +513,7 @@ where } } -create_parametrized_test!(lwe_encrypt_pbs_many_lut_decrypt_custom_mod); +create_parameterized_test!(lwe_encrypt_pbs_many_lut_decrypt_custom_mod); // DISCLAIMER: all parameters here are not guaranteed to be secure or yield correct computations pub const TEST_PARAMS_4_BITS_NATIVE_U128: ClassicTestParams = ClassicTestParams { @@ -840,7 +840,7 @@ fn lwe_encrypt_pbs_ntt64_decrypt_custom_mod(params: ClassicTestParams) { } } -create_parametrized_test!(lwe_encrypt_pbs_ntt64_decrypt_custom_mod { +create_parameterized_test!(lwe_encrypt_pbs_ntt64_decrypt_custom_mod { TEST_PARAMS_3_BITS_SOLINAS_U64 }); diff --git a/tfhe/src/core_crypto/algorithms/test/mod.rs b/tfhe/src/core_crypto/algorithms/test/mod.rs index 0650f30860..a7edb1db89 100644 --- a/tfhe/src/core_crypto/algorithms/test/mod.rs +++ b/tfhe/src/core_crypto/algorithms/test/mod.rs @@ -461,7 +461,7 @@ pub(crate) fn gen_keys_or_get_from_cache_if_enabled< } // Macro to generate tests for all parameter sets -macro_rules! create_parametrized_test{ +macro_rules! create_parameterized_test{ ($name:ident { $($param:ident),* $(,)? }) => { ::paste::paste! { $( @@ -473,7 +473,7 @@ macro_rules! create_parametrized_test{ } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { TEST_PARAMS_4_BITS_NATIVE_U64, TEST_PARAMS_3_BITS_63_U64 @@ -482,9 +482,9 @@ macro_rules! create_parametrized_test{ } // Macro to generate tests for all parameter sets -macro_rules! create_parametrized_test_with_non_native_parameters { +macro_rules! create_parameterized_test_with_non_native_parameters { ($name:ident) => { - create_parametrized_test!($name { + create_parameterized_test!($name { TEST_PARAMS_4_BITS_NATIVE_U64, TEST_PARAMS_3_BITS_63_U64, TEST_PARAMS_3_BITS_SOLINAS_U64 @@ -492,4 +492,4 @@ macro_rules! create_parametrized_test_with_non_native_parameters { }; } -pub(crate) use {create_parametrized_test, create_parametrized_test_with_non_native_parameters}; +pub(crate) use {create_parameterized_test, create_parameterized_test_with_non_native_parameters}; diff --git a/tfhe/src/core_crypto/algorithms/test/modulus_switch_compression.rs b/tfhe/src/core_crypto/algorithms/test/modulus_switch_compression.rs index 6ffc6ea708..b925f350be 100644 --- a/tfhe/src/core_crypto/algorithms/test/modulus_switch_compression.rs +++ b/tfhe/src/core_crypto/algorithms/test/modulus_switch_compression.rs @@ -138,4 +138,4 @@ fn test_ms_with_packing() { } } -create_parametrized_test!(encryption_ms_decryption); +create_parameterized_test!(encryption_ms_decryption); diff --git a/tfhe/src/core_crypto/algorithms/test/noise_distribution/lwe_encryption_noise.rs b/tfhe/src/core_crypto/algorithms/test/noise_distribution/lwe_encryption_noise.rs index 59de111023..21b6e89638 100644 --- a/tfhe/src/core_crypto/algorithms/test/noise_distribution/lwe_encryption_noise.rs +++ b/tfhe/src/core_crypto/algorithms/test/noise_distribution/lwe_encryption_noise.rs @@ -82,7 +82,7 @@ fn lwe_encrypt_decrypt_noise_distribution_custom_mod>( ); } -create_parametrized_test!(random_noise_roundtrip { +create_parameterized_test!(random_noise_roundtrip { TEST_PARAMS_4_BITS_NATIVE_U64, TEST_PARAMS_3_BITS_SOLINAS_U64, TEST_PARAMS_3_BITS_63_U64 diff --git a/tfhe/src/core_crypto/algorithms/test/noise_distribution/lwe_keyswitch_noise.rs b/tfhe/src/core_crypto/algorithms/test/noise_distribution/lwe_keyswitch_noise.rs index cc82e2b4c6..0be5c3b676 100644 --- a/tfhe/src/core_crypto/algorithms/test/noise_distribution/lwe_keyswitch_noise.rs +++ b/tfhe/src/core_crypto/algorithms/test/noise_distribution/lwe_keyswitch_noise.rs @@ -170,6 +170,6 @@ fn lwe_encrypt_ks_decrypt_noise_distribution_custom_mod>( } } -create_gpu_parametrized_test!(lwe_encrypt_ks_decrypt_custom_mod); +create_gpu_parameterized_test!(lwe_encrypt_ks_decrypt_custom_mod); diff --git a/tfhe/src/core_crypto/gpu/algorithms/test/lwe_linear_algebra.rs b/tfhe/src/core_crypto/gpu/algorithms/test/lwe_linear_algebra.rs index 7c585aa6ba..28bc6e5684 100644 --- a/tfhe/src/core_crypto/gpu/algorithms/test/lwe_linear_algebra.rs +++ b/tfhe/src/core_crypto/gpu/algorithms/test/lwe_linear_algebra.rs @@ -72,4 +72,4 @@ fn lwe_encrypt_add_assign_decrypt_custom_mod( } } -create_gpu_parametrized_test!(lwe_encrypt_add_assign_decrypt_custom_mod); +create_gpu_parameterized_test!(lwe_encrypt_add_assign_decrypt_custom_mod); diff --git a/tfhe/src/core_crypto/gpu/algorithms/test/lwe_multi_bit_programmable_bootstrapping.rs b/tfhe/src/core_crypto/gpu/algorithms/test/lwe_multi_bit_programmable_bootstrapping.rs index 8e7a0c7fe4..4ae3212591 100644 --- a/tfhe/src/core_crypto/gpu/algorithms/test/lwe_multi_bit_programmable_bootstrapping.rs +++ b/tfhe/src/core_crypto/gpu/algorithms/test/lwe_multi_bit_programmable_bootstrapping.rs @@ -174,4 +174,4 @@ fn lwe_encrypt_multi_bit_pbs_decrypt_custom_mod< } } -create_gpu_multi_bit_parametrized_test!(lwe_encrypt_multi_bit_pbs_decrypt_custom_mod); +create_gpu_multi_bit_parameterized_test!(lwe_encrypt_multi_bit_pbs_decrypt_custom_mod); diff --git a/tfhe/src/core_crypto/gpu/algorithms/test/lwe_packing_keyswitch.rs b/tfhe/src/core_crypto/gpu/algorithms/test/lwe_packing_keyswitch.rs index e95f4ed281..d018c55196 100644 --- a/tfhe/src/core_crypto/gpu/algorithms/test/lwe_packing_keyswitch.rs +++ b/tfhe/src/core_crypto/gpu/algorithms/test/lwe_packing_keyswitch.rs @@ -230,5 +230,5 @@ where } } -create_gpu_parametrized_test!(lwe_encrypt_pks_to_glwe_decrypt_custom_mod); -create_gpu_parametrized_test!(lwe_list_encrypt_pks_to_glwe_decrypt_custom_mod); +create_gpu_parameterized_test!(lwe_encrypt_pks_to_glwe_decrypt_custom_mod); +create_gpu_parameterized_test!(lwe_list_encrypt_pks_to_glwe_decrypt_custom_mod); diff --git a/tfhe/src/core_crypto/gpu/algorithms/test/lwe_programmable_bootstrapping.rs b/tfhe/src/core_crypto/gpu/algorithms/test/lwe_programmable_bootstrapping.rs index 96a364d8aa..feb685a3e2 100644 --- a/tfhe/src/core_crypto/gpu/algorithms/test/lwe_programmable_bootstrapping.rs +++ b/tfhe/src/core_crypto/gpu/algorithms/test/lwe_programmable_bootstrapping.rs @@ -172,4 +172,4 @@ fn lwe_encrypt_pbs_decrypt< } } -create_gpu_parametrized_test!(lwe_encrypt_pbs_decrypt); +create_gpu_parameterized_test!(lwe_encrypt_pbs_decrypt); diff --git a/tfhe/src/core_crypto/gpu/algorithms/test/mod.rs b/tfhe/src/core_crypto/gpu/algorithms/test/mod.rs index 779a419702..db058d4cb2 100644 --- a/tfhe/src/core_crypto/gpu/algorithms/test/mod.rs +++ b/tfhe/src/core_crypto/gpu/algorithms/test/mod.rs @@ -14,7 +14,7 @@ pub struct CudaPackingKeySwitchKeys { } // Macro to generate tests for all parameter sets -macro_rules! create_gpu_parametrized_test{ +macro_rules! create_gpu_parameterized_test{ ($name:ident { $($param:ident),* }) => { ::paste::paste! { $( @@ -26,13 +26,13 @@ macro_rules! create_gpu_parametrized_test{ } }; ($name:ident)=> { - create_gpu_parametrized_test!($name + create_gpu_parameterized_test!($name { TEST_PARAMS_4_BITS_NATIVE_U64 }); }; } -macro_rules! create_gpu_multi_bit_parametrized_test{ +macro_rules! create_gpu_multi_bit_parameterized_test{ ($name:ident { $($param:ident),* }) => { ::paste::paste! { $( @@ -44,7 +44,7 @@ macro_rules! create_gpu_multi_bit_parametrized_test{ } }; ($name:ident)=> { - create_gpu_multi_bit_parametrized_test!($name + create_gpu_multi_bit_parameterized_test!($name { MULTI_BIT_2_2_2_PARAMS, MULTI_BIT_2_2_3_PARAMS, @@ -55,4 +55,4 @@ macro_rules! create_gpu_multi_bit_parametrized_test{ } use crate::core_crypto::gpu::lwe_packing_keyswitch_key::CudaLwePackingKeyswitchKey; -use {create_gpu_multi_bit_parametrized_test, create_gpu_parametrized_test}; +use {create_gpu_multi_bit_parameterized_test, create_gpu_parameterized_test}; diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_long_run/test_erc20.rs b/tfhe/src/integer/gpu/server_key/radix/tests_long_run/test_erc20.rs index d52d01649a..ba065e2801 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_long_run/test_erc20.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_long_run/test_erc20.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_long_run::test_erc20::{ @@ -7,13 +7,13 @@ use crate::integer::server_key::radix_parallel::tests_long_run::test_erc20::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(safe_erc20 { +create_gpu_parameterized_test!(safe_erc20 { PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64 }); -create_gpu_parametrized_test!(whitepaper_erc20 { +create_gpu_parameterized_test!(whitepaper_erc20 { PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64 }); -create_gpu_parametrized_test!(no_cmux_erc20 { +create_gpu_parameterized_test!(no_cmux_erc20 { PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64 }); diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_abs.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_abs.rs index 8f2a97ab86..fa2c18e82c 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_abs.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_abs.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_abs::{ @@ -7,8 +7,8 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_abs::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_unchecked_abs); -create_gpu_parametrized_test!(integer_signed_abs); +create_gpu_parameterized_test!(integer_signed_unchecked_abs); +create_gpu_parameterized_test!(integer_signed_abs); fn integer_signed_unchecked_abs

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_add.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_add.rs index d1ac54a8ec..bfe2dee7cd 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_add.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_add.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_add::{ @@ -7,11 +7,11 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_add::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_add); -create_gpu_parametrized_test!(integer_add); +create_gpu_parameterized_test!(integer_unchecked_add); +create_gpu_parameterized_test!(integer_add); -create_gpu_parametrized_test!(integer_unchecked_signed_overflowing_add); -create_gpu_parametrized_test!(integer_signed_overflowing_add); +create_gpu_parameterized_test!(integer_unchecked_signed_overflowing_add); +create_gpu_parameterized_test!(integer_signed_overflowing_add); fn integer_unchecked_add

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_bitwise_op.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_bitwise_op.rs index 0d7db13cae..428bae54b9 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_bitwise_op.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_bitwise_op.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_bitwise_op::{ @@ -9,13 +9,13 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_bitwise_op::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_unchecked_bitand); -create_gpu_parametrized_test!(integer_signed_unchecked_bitor); -create_gpu_parametrized_test!(integer_signed_unchecked_bitxor); -create_gpu_parametrized_test!(integer_signed_default_bitnot); -create_gpu_parametrized_test!(integer_signed_default_bitand); -create_gpu_parametrized_test!(integer_signed_default_bitor); -create_gpu_parametrized_test!(integer_signed_default_bitxor); +create_gpu_parameterized_test!(integer_signed_unchecked_bitand); +create_gpu_parameterized_test!(integer_signed_unchecked_bitor); +create_gpu_parameterized_test!(integer_signed_unchecked_bitxor); +create_gpu_parameterized_test!(integer_signed_default_bitnot); +create_gpu_parameterized_test!(integer_signed_default_bitand); +create_gpu_parameterized_test!(integer_signed_default_bitor); +create_gpu_parameterized_test!(integer_signed_default_bitxor); fn integer_signed_unchecked_bitand

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_cmux.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_cmux.rs index 7ecd22747a..732de454ea 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_cmux.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_cmux.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_cmux::{ @@ -7,8 +7,8 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_cmux::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_if_then_else); -create_gpu_parametrized_test!(integer_if_then_else); +create_gpu_parameterized_test!(integer_unchecked_if_then_else); +create_gpu_parameterized_test!(integer_if_then_else); fn integer_unchecked_if_then_else

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_comparison.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_comparison.rs index f296bf86f7..b9d2238ee1 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_comparison.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_comparison.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_comparison::{ @@ -42,13 +42,13 @@ macro_rules! define_gpu_signed_comparison_test_functions { } - // Then call our create_gpu_parametrized_test macro onto or specialized fns - create_gpu_parametrized_test!([]{ + // Then call our create_gpu_parameterized_test macro onto or specialized fns + create_gpu_parameterized_test!([]{ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); - create_gpu_parametrized_test!([]{ + create_gpu_parameterized_test!([]{ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, @@ -89,22 +89,22 @@ where test_signed_default_minmax(params, 2, executor, std::cmp::max::); } -create_gpu_parametrized_test!(integer_signed_unchecked_max_128_bits { +create_gpu_parameterized_test!(integer_signed_unchecked_max_128_bits { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_signed_unchecked_min_128_bits { +create_gpu_parameterized_test!(integer_signed_unchecked_min_128_bits { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_signed_max_128_bits { +create_gpu_parameterized_test!(integer_signed_max_128_bits { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_signed_min_128_bits { +create_gpu_parameterized_test!(integer_signed_min_128_bits { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_div_mod.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_div_mod.rs index 974839c4f6..bb91ddfa13 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_div_mod.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_div_mod.rs @@ -1,11 +1,11 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_div_rem::signed_unchecked_div_rem_test; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_unchecked_div_rem); +create_gpu_parameterized_test!(integer_signed_unchecked_div_rem); fn integer_signed_unchecked_div_rem

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_ilog2.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_ilog2.rs index 7f61c0850c..444b456778 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_ilog2.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_ilog2.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_ilog2::{ @@ -8,12 +8,12 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_ilog2::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_default_trailing_zeros); -create_gpu_parametrized_test!(integer_signed_default_trailing_ones); -create_gpu_parametrized_test!(integer_signed_default_leading_zeros); -create_gpu_parametrized_test!(integer_signed_default_leading_ones); -create_gpu_parametrized_test!(integer_signed_default_ilog2); -create_gpu_parametrized_test!(integer_signed_default_checked_ilog2); +create_gpu_parameterized_test!(integer_signed_default_trailing_zeros); +create_gpu_parameterized_test!(integer_signed_default_trailing_ones); +create_gpu_parameterized_test!(integer_signed_default_leading_zeros); +create_gpu_parameterized_test!(integer_signed_default_leading_ones); +create_gpu_parameterized_test!(integer_signed_default_ilog2); +create_gpu_parameterized_test!(integer_signed_default_checked_ilog2); fn integer_signed_default_trailing_zeros

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_mul.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_mul.rs index d6a0627de3..90745ec2ed 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_mul.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_mul.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_mul::{ @@ -7,8 +7,8 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_mul::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_mul); -create_gpu_parametrized_test!(integer_mul); +create_gpu_parameterized_test!(integer_unchecked_mul); +create_gpu_parameterized_test!(integer_mul); fn integer_unchecked_mul

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_neg.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_neg.rs index b05ad75d9d..e1ad034ec1 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_neg.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_neg.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_neg::{ @@ -7,8 +7,8 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_neg::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_neg); -create_gpu_parametrized_test!(integer_neg); +create_gpu_parameterized_test!(integer_unchecked_neg); +create_gpu_parameterized_test!(integer_neg); fn integer_unchecked_neg

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_rotate.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_rotate.rs index bc3c8eaa06..16420587f6 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_rotate.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_rotate.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_rotate::{ @@ -8,10 +8,10 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_rotate::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_rotate_left); -create_gpu_parametrized_test!(integer_unchecked_rotate_right); -create_gpu_parametrized_test!(integer_rotate_left); -create_gpu_parametrized_test!(integer_rotate_right); +create_gpu_parameterized_test!(integer_unchecked_rotate_left); +create_gpu_parameterized_test!(integer_unchecked_rotate_right); +create_gpu_parameterized_test!(integer_rotate_left); +create_gpu_parameterized_test!(integer_rotate_right); fn integer_unchecked_rotate_right

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_add.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_add.rs index f788379053..3d8e6a2b9d 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_add.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_add.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_add::{ @@ -8,9 +8,9 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_add::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_unchecked_scalar_add); -create_gpu_parametrized_test!(integer_signed_scalar_add); -create_gpu_parametrized_test!(integer_signed_overflowing_scalar_add); +create_gpu_parameterized_test!(integer_signed_unchecked_scalar_add); +create_gpu_parameterized_test!(integer_signed_scalar_add); +create_gpu_parameterized_test!(integer_signed_overflowing_scalar_add); fn integer_signed_unchecked_scalar_add

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_bitwise_op.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_bitwise_op.rs index 5adbd2c67d..9a72ef6e8a 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_bitwise_op.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_bitwise_op.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_bitwise_op::{ @@ -8,9 +8,9 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_bitwis }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_default_scalar_bitand); -create_gpu_parametrized_test!(integer_signed_default_scalar_bitor); -create_gpu_parametrized_test!(integer_signed_default_scalar_bitxor); +create_gpu_parameterized_test!(integer_signed_default_scalar_bitand); +create_gpu_parameterized_test!(integer_signed_default_scalar_bitor); +create_gpu_parameterized_test!(integer_signed_default_scalar_bitxor); fn integer_signed_default_scalar_bitand

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_comparison.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_comparison.rs index 37eb9a9bbe..2fcc4c5866 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_comparison.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_comparison.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_comparison::{ @@ -41,12 +41,12 @@ macro_rules! define_gpu_signed_scalar_comparison_test_functions { ) } - create_gpu_parametrized_test!([]{ + create_gpu_parameterized_test!([]{ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); - create_gpu_parametrized_test!([]{ + create_gpu_parameterized_test!([]{ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, @@ -87,22 +87,22 @@ where test_signed_default_scalar_minmax(params, 2, executor, std::cmp::max::); } -create_gpu_parametrized_test!(integer_signed_unchecked_scalar_max_i128 { +create_gpu_parameterized_test!(integer_signed_unchecked_scalar_max_i128 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_signed_unchecked_scalar_min_i128 { +create_gpu_parameterized_test!(integer_signed_unchecked_scalar_min_i128 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_signed_scalar_max_i128 { +create_gpu_parameterized_test!(integer_signed_scalar_max_i128 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_signed_scalar_min_i128 { +create_gpu_parameterized_test!(integer_signed_scalar_min_i128 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_div_mod.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_div_mod.rs index d473aaab1b..74903dbae3 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_div_mod.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_div_mod.rs @@ -1,11 +1,11 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_div_mod::signed_unchecked_scalar_div_rem_test; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_unchecked_scalar_div_rem); +create_gpu_parameterized_test!(integer_signed_unchecked_scalar_div_rem); fn integer_signed_unchecked_scalar_div_rem

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_mul.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_mul.rs index bcf7572d4a..ed5428b3b2 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_mul.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_mul.rs @@ -1,11 +1,11 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_mul::signed_unchecked_scalar_mul_test; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_unchecked_scalar_mul); +create_gpu_parameterized_test!(integer_signed_unchecked_scalar_mul); fn integer_signed_unchecked_scalar_mul

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_rotate.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_rotate.rs index 24dd30655c..50caa8a593 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_rotate.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_rotate.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_rotate::{ @@ -8,10 +8,10 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_rotate }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_unchecked_scalar_rotate_left); -create_gpu_parametrized_test!(integer_signed_scalar_rotate_left); -create_gpu_parametrized_test!(integer_signed_unchecked_scalar_rotate_right); -create_gpu_parametrized_test!(integer_signed_scalar_rotate_right); +create_gpu_parameterized_test!(integer_signed_unchecked_scalar_rotate_left); +create_gpu_parameterized_test!(integer_signed_scalar_rotate_left); +create_gpu_parameterized_test!(integer_signed_unchecked_scalar_rotate_right); +create_gpu_parameterized_test!(integer_signed_scalar_rotate_right); fn integer_signed_unchecked_scalar_rotate_left

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_shift.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_shift.rs index 526c999018..a44d10edb7 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_shift.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_shift.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_shift::{ @@ -8,10 +8,10 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_shift: }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_unchecked_scalar_left_shift); -create_gpu_parametrized_test!(integer_signed_scalar_left_shift); -create_gpu_parametrized_test!(integer_signed_unchecked_scalar_right_shift); -create_gpu_parametrized_test!(integer_signed_scalar_right_shift); +create_gpu_parameterized_test!(integer_signed_unchecked_scalar_left_shift); +create_gpu_parameterized_test!(integer_signed_scalar_left_shift); +create_gpu_parameterized_test!(integer_signed_unchecked_scalar_right_shift); +create_gpu_parameterized_test!(integer_signed_scalar_right_shift); fn integer_signed_unchecked_scalar_left_shift

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_sub.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_sub.rs index 5020a05ce1..f25d09db25 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_sub.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_scalar_sub.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_sub::{ @@ -7,8 +7,8 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_scalar_sub::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_unchecked_scalar_sub); -create_gpu_parametrized_test!(integer_signed_overflowing_scalar_sub); +create_gpu_parameterized_test!(integer_signed_unchecked_scalar_sub); +create_gpu_parameterized_test!(integer_signed_overflowing_scalar_sub); fn integer_signed_unchecked_scalar_sub

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_shift.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_shift.rs index d0b9577a76..79a8aa5d82 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_shift.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_shift.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_shift::{ @@ -8,10 +8,10 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_shift::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_signed_unchecked_left_shift); -create_gpu_parametrized_test!(integer_signed_unchecked_right_shift); -create_gpu_parametrized_test!(integer_signed_left_shift); -create_gpu_parametrized_test!(integer_signed_right_shift); +create_gpu_parameterized_test!(integer_signed_unchecked_left_shift); +create_gpu_parameterized_test!(integer_signed_unchecked_right_shift); +create_gpu_parameterized_test!(integer_signed_left_shift); +create_gpu_parameterized_test!(integer_signed_right_shift); fn integer_signed_unchecked_right_shift

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_sub.rs b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_sub.rs index 95a57a7691..f6c9475803 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_sub.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_signed/test_sub.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_signed::test_sub::{ @@ -8,11 +8,11 @@ use crate::integer::server_key::radix_parallel::tests_signed::test_sub::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_sub); -create_gpu_parametrized_test!(integer_sub); +create_gpu_parameterized_test!(integer_unchecked_sub); +create_gpu_parameterized_test!(integer_sub); -create_gpu_parametrized_test!(integer_unchecked_signed_overflowing_sub); -create_gpu_parametrized_test!(integer_signed_overflowing_sub); +create_gpu_parameterized_test!(integer_unchecked_signed_overflowing_sub); +create_gpu_parameterized_test!(integer_signed_overflowing_sub); fn integer_unchecked_sub

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/mod.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/mod.rs index 37551e8631..d2ed604fbb 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/mod.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/mod.rs @@ -27,7 +27,7 @@ use crate::integer::{BooleanBlock, RadixCiphertext, RadixClientKey, ServerKey, U use std::sync::Arc; // Macro to generate tests for all parameter sets -macro_rules! create_gpu_parametrized_test{ +macro_rules! create_gpu_parameterized_test{ ($name:ident { $($param:ident),* $(,)? }) => { ::paste::paste! { $( @@ -39,7 +39,7 @@ macro_rules! create_gpu_parametrized_test{ } }; ($name:ident)=> { - create_gpu_parametrized_test!($name + create_gpu_parameterized_test!($name { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, @@ -50,7 +50,7 @@ macro_rules! create_gpu_parametrized_test{ }; } -pub(crate) use create_gpu_parametrized_test; +pub(crate) use create_gpu_parameterized_test; pub(crate) struct GpuContext { pub(crate) streams: CudaStreams, diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_add.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_add.rs index 332ae0c04e..c3a8dddf34 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_add.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_add.rs @@ -1,7 +1,7 @@ use crate::core_crypto::gpu::CudaStreams; use crate::integer::gpu::ciphertext::CudaUnsignedRadixCiphertext; use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -11,11 +11,11 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ use crate::integer::server_key::radix_parallel::tests_unsigned::test_add::default_overflowing_add_test; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_add); -create_gpu_parametrized_test!(integer_unchecked_add_assign); -create_gpu_parametrized_test!(integer_add); -create_gpu_parametrized_test!(integer_sum_ciphertexts_vec); -create_gpu_parametrized_test!(integer_default_overflowing_add); +create_gpu_parameterized_test!(integer_unchecked_add); +create_gpu_parameterized_test!(integer_unchecked_add_assign); +create_gpu_parameterized_test!(integer_add); +create_gpu_parameterized_test!(integer_sum_ciphertexts_vec); +create_gpu_parameterized_test!(integer_default_overflowing_add); fn integer_unchecked_add

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_bitwise_op.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_bitwise_op.rs index 92357c1ba6..c5d0ee8fd5 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_bitwise_op.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_bitwise_op.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -8,14 +8,14 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_bitnot); -create_gpu_parametrized_test!(integer_unchecked_bitand); -create_gpu_parametrized_test!(integer_unchecked_bitor); -create_gpu_parametrized_test!(integer_unchecked_bitxor); -create_gpu_parametrized_test!(integer_bitnot); -create_gpu_parametrized_test!(integer_bitand); -create_gpu_parametrized_test!(integer_bitor); -create_gpu_parametrized_test!(integer_bitxor); +create_gpu_parameterized_test!(integer_unchecked_bitnot); +create_gpu_parameterized_test!(integer_unchecked_bitand); +create_gpu_parameterized_test!(integer_unchecked_bitor); +create_gpu_parameterized_test!(integer_unchecked_bitxor); +create_gpu_parameterized_test!(integer_bitnot); +create_gpu_parameterized_test!(integer_bitand); +create_gpu_parameterized_test!(integer_bitor); +create_gpu_parameterized_test!(integer_bitxor); fn integer_unchecked_bitnot

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_cmux.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_cmux.rs index cc4274a1c3..afb5401fec 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_cmux.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_cmux.rs @@ -1,11 +1,11 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_unsigned::test_cmux::default_if_then_else_test; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_if_then_else); +create_gpu_parameterized_test!(integer_if_then_else); fn integer_if_then_else

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_comparison.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_comparison.rs index d8afd3cbf9..41987ae8d6 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_comparison.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_comparison.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_unsigned::test_comparison::{ @@ -40,12 +40,12 @@ macro_rules! define_gpu_comparison_test_functions { ) } - create_gpu_parametrized_test!([]{ + create_gpu_parameterized_test!([]{ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); - create_gpu_parametrized_test!([]{ + create_gpu_parameterized_test!([]{ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, @@ -86,22 +86,22 @@ where test_default_minmax(params, 2, executor, std::cmp::max::); } -create_gpu_parametrized_test!(integer_unchecked_min_u256 { +create_gpu_parameterized_test!(integer_unchecked_min_u256 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_unchecked_max_u256 { +create_gpu_parameterized_test!(integer_unchecked_max_u256 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_min_u256 { +create_gpu_parameterized_test!(integer_min_u256 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_max_u256 { +create_gpu_parameterized_test!(integer_max_u256 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_div_mod.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_div_mod.rs index 7dcb384720..1b27bd500c 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_div_mod.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_div_mod.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_unsigned::test_div_mod::{ @@ -7,9 +7,9 @@ use crate::integer::server_key::radix_parallel::tests_unsigned::test_div_mod::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_div); -create_gpu_parametrized_test!(integer_div_rem); -create_gpu_parametrized_test!(integer_rem); +create_gpu_parameterized_test!(integer_div); +create_gpu_parameterized_test!(integer_div_rem); +create_gpu_parameterized_test!(integer_rem); fn integer_div

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_ilog2.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_ilog2.rs index 6b3c83abe8..755f96e121 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_ilog2.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_ilog2.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_unsigned::test_ilog2::{ @@ -8,12 +8,12 @@ use crate::integer::server_key::radix_parallel::tests_unsigned::test_ilog2::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_default_trailing_zeros); -create_gpu_parametrized_test!(integer_default_trailing_ones); -create_gpu_parametrized_test!(integer_default_leading_zeros); -create_gpu_parametrized_test!(integer_default_leading_ones); -create_gpu_parametrized_test!(integer_default_ilog2); -create_gpu_parametrized_test!(integer_default_checked_ilog2); +create_gpu_parameterized_test!(integer_default_trailing_zeros); +create_gpu_parameterized_test!(integer_default_trailing_ones); +create_gpu_parameterized_test!(integer_default_leading_zeros); +create_gpu_parameterized_test!(integer_default_leading_ones); +create_gpu_parameterized_test!(integer_default_ilog2); +create_gpu_parameterized_test!(integer_default_checked_ilog2); fn integer_default_trailing_zeros

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_mul.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_mul.rs index 5ec8a03470..ab0ca86cf2 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_mul.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_mul.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -7,8 +7,8 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_mul); -create_gpu_parametrized_test!(integer_mul); +create_gpu_parameterized_test!(integer_unchecked_mul); +create_gpu_parameterized_test!(integer_mul); fn integer_unchecked_mul

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_neg.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_neg.rs index 39131fc272..879f72480b 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_neg.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_neg.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -7,8 +7,8 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_neg); -create_gpu_parametrized_test!(integer_neg); +create_gpu_parameterized_test!(integer_unchecked_neg); +create_gpu_parameterized_test!(integer_neg); fn integer_unchecked_neg

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_rotate.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_rotate.rs index 99a00fd4f6..17c42f2ea3 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_rotate.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_rotate.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -8,10 +8,10 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_rotate_left); -create_gpu_parametrized_test!(integer_unchecked_rotate_right); -create_gpu_parametrized_test!(integer_rotate_left); -create_gpu_parametrized_test!(integer_rotate_right); +create_gpu_parameterized_test!(integer_unchecked_rotate_left); +create_gpu_parameterized_test!(integer_unchecked_rotate_right); +create_gpu_parameterized_test!(integer_rotate_left); +create_gpu_parameterized_test!(integer_rotate_right); fn integer_unchecked_rotate_right

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_add.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_add.rs index 4cdb0b30ab..23eb0f266d 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_add.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_add.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -7,9 +7,9 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_scalar_add); -create_gpu_parametrized_test!(integer_scalar_add); -create_gpu_parametrized_test!(integer_default_overflowing_scalar_add); +create_gpu_parameterized_test!(integer_unchecked_scalar_add); +create_gpu_parameterized_test!(integer_scalar_add); +create_gpu_parameterized_test!(integer_default_overflowing_scalar_add); fn integer_unchecked_scalar_add

(param: P) where P: Into + Copy, diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_bitwise_op.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_bitwise_op.rs index 024522f5f2..930b1cc3db 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_bitwise_op.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_bitwise_op.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -7,9 +7,9 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_scalar_bitand); -create_gpu_parametrized_test!(integer_scalar_bitor); -create_gpu_parametrized_test!(integer_scalar_bitxor); +create_gpu_parameterized_test!(integer_scalar_bitand); +create_gpu_parameterized_test!(integer_scalar_bitor); +create_gpu_parameterized_test!(integer_scalar_bitxor); fn integer_scalar_bitand

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_comparison.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_comparison.rs index 16201678e0..2da563f28e 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_comparison.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_comparison.rs @@ -1,7 +1,7 @@ use crate::core_crypto::gpu::CudaStreams; use crate::integer::gpu::ciphertext::CudaUnsignedRadixCiphertext; use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::{gen_keys_gpu, CudaServerKey}; use crate::integer::server_key::radix_parallel::tests_unsigned::test_scalar_comparison::{ @@ -44,12 +44,12 @@ macro_rules! define_gpu_scalar_comparison_test_functions { ) } - create_gpu_parametrized_test!([]{ + create_gpu_parameterized_test!([]{ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); - create_gpu_parametrized_test!([]{ + create_gpu_parameterized_test!([]{ PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, @@ -223,22 +223,22 @@ where } } -create_gpu_parametrized_test!(integer_unchecked_scalar_min_u256 { +create_gpu_parameterized_test!(integer_unchecked_scalar_min_u256 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_unchecked_scalar_max_u256 { +create_gpu_parameterized_test!(integer_unchecked_scalar_max_u256 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_scalar_min_u256 { +create_gpu_parameterized_test!(integer_scalar_min_u256 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, }); -create_gpu_parametrized_test!(integer_scalar_max_u256 { +create_gpu_parameterized_test!(integer_scalar_max_u256 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_3_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_GPU_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, @@ -251,4 +251,4 @@ define_gpu_scalar_comparison_test_functions!(le, U256); define_gpu_scalar_comparison_test_functions!(gt, U256); define_gpu_scalar_comparison_test_functions!(ge, U256); -create_gpu_parametrized_test!(integer_unchecked_scalar_comparisons_edge); +create_gpu_parameterized_test!(integer_unchecked_scalar_comparisons_edge); diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_div_mod.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_div_mod.rs index 561c10cc82..0d3acff7bf 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_div_mod.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_div_mod.rs @@ -1,11 +1,11 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_unsigned::test_scalar_div_mod::default_scalar_div_rem_test; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_scalar_div_rem); +create_gpu_parameterized_test!(integer_scalar_div_rem); fn integer_scalar_div_rem

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_mul.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_mul.rs index 7c2fa70e86..615ffb6fd0 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_mul.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_mul.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -7,8 +7,8 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_scalar_mul); -create_gpu_parametrized_test!(integer_scalar_mul); +create_gpu_parameterized_test!(integer_unchecked_scalar_mul); +create_gpu_parameterized_test!(integer_scalar_mul); fn integer_unchecked_scalar_mul

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_rotate.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_rotate.rs index df19d3190d..a91a5e0d8d 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_rotate.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_rotate.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_unsigned::test_scalar_rotate::{ @@ -8,10 +8,10 @@ use crate::integer::server_key::radix_parallel::tests_unsigned::test_scalar_rota }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_scalar_rotate_left); -create_gpu_parametrized_test!(integer_unchecked_scalar_rotate_right); -create_gpu_parametrized_test!(integer_scalar_rotate_left); -create_gpu_parametrized_test!(integer_scalar_rotate_right); +create_gpu_parameterized_test!(integer_unchecked_scalar_rotate_left); +create_gpu_parameterized_test!(integer_unchecked_scalar_rotate_right); +create_gpu_parameterized_test!(integer_scalar_rotate_left); +create_gpu_parameterized_test!(integer_scalar_rotate_right); fn integer_unchecked_scalar_rotate_right

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_shift.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_shift.rs index b597a9cc13..47067fdf7d 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_shift.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_shift.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -8,10 +8,10 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_scalar_left_shift); -create_gpu_parametrized_test!(integer_unchecked_scalar_right_shift); -create_gpu_parametrized_test!(integer_scalar_left_shift); -create_gpu_parametrized_test!(integer_scalar_right_shift); +create_gpu_parameterized_test!(integer_unchecked_scalar_left_shift); +create_gpu_parameterized_test!(integer_unchecked_scalar_right_shift); +create_gpu_parameterized_test!(integer_scalar_left_shift); +create_gpu_parameterized_test!(integer_scalar_right_shift); fn integer_unchecked_scalar_right_shift

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_sub.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_sub.rs index 3f71f5679e..a5635d9680 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_sub.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_scalar_sub.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -7,8 +7,8 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_scalar_sub); -create_gpu_parametrized_test!(integer_scalar_sub); +create_gpu_parameterized_test!(integer_unchecked_scalar_sub); +create_gpu_parameterized_test!(integer_scalar_sub); fn integer_unchecked_scalar_sub

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_shift.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_shift.rs index 248bcbd6de..7aecb19175 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_shift.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_shift.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -8,10 +8,10 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ }; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_left_shift); -create_gpu_parametrized_test!(integer_unchecked_right_shift); -create_gpu_parametrized_test!(integer_left_shift); -create_gpu_parametrized_test!(integer_right_shift); +create_gpu_parameterized_test!(integer_unchecked_left_shift); +create_gpu_parameterized_test!(integer_unchecked_right_shift); +create_gpu_parameterized_test!(integer_left_shift); +create_gpu_parameterized_test!(integer_right_shift); fn integer_unchecked_right_shift

(param: P) where diff --git a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_sub.rs b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_sub.rs index 09a8344315..e8cf7df371 100644 --- a/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_sub.rs +++ b/tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_sub.rs @@ -1,5 +1,5 @@ use crate::integer::gpu::server_key::radix::tests_unsigned::{ - create_gpu_parametrized_test, GpuFunctionExecutor, + create_gpu_parameterized_test, GpuFunctionExecutor, }; use crate::integer::gpu::CudaServerKey; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ @@ -8,9 +8,9 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ use crate::integer::server_key::radix_parallel::tests_unsigned::test_sub::default_overflowing_sub_test; use crate::shortint::parameters::*; -create_gpu_parametrized_test!(integer_unchecked_sub); -create_gpu_parametrized_test!(integer_sub); -create_gpu_parametrized_test!(integer_default_overflowing_sub); +create_gpu_parameterized_test!(integer_unchecked_sub); +create_gpu_parameterized_test!(integer_sub); +create_gpu_parameterized_test!(integer_default_overflowing_sub); fn integer_unchecked_sub

(param: P) where diff --git a/tfhe/src/integer/public_key/standard.rs b/tfhe/src/integer/public_key/standard.rs index 9092bb6b6b..d943134f3a 100644 --- a/tfhe/src/integer/public_key/standard.rs +++ b/tfhe/src/integer/public_key/standard.rs @@ -116,11 +116,11 @@ impl CompressedPublicKey { #[cfg(test)] mod tests { use crate::integer::keycache::KEY_CACHE; - use crate::integer::tests::create_parametrized_test; + use crate::integer::tests::create_parameterized_test; use crate::integer::IntegerKeyKind; use crate::shortint::parameters::*; - create_parametrized_test!(integer_public_key_decompression_small { + create_parameterized_test!(integer_public_key_decompression_small { PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64, }); diff --git a/tfhe/src/integer/public_key/tests.rs b/tfhe/src/integer/public_key/tests.rs index f68689cdfe..16e48019a1 100644 --- a/tfhe/src/integer/public_key/tests.rs +++ b/tfhe/src/integer/public_key/tests.rs @@ -1,6 +1,6 @@ use crate::integer::keycache::KEY_CACHE; use crate::integer::parameters::IntegerCompactCiphertextListExpansionMode; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{gen_keys, CompressedPublicKey, IntegerKeyKind, PublicKey, RadixCiphertext}; use crate::shortint::parameters::classic::compact_pk::*; #[cfg(tarpaulin)] @@ -8,7 +8,7 @@ use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; use rand::Rng; -create_parametrized_test!(big_radix_encrypt_decrypt_128_bits { +create_parameterized_test!(big_radix_encrypt_decrypt_128_bits { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -22,7 +22,7 @@ create_parametrized_test!(big_radix_encrypt_decrypt_128_bits { } ); -create_parametrized_test!( +create_parameterized_test!( radix_encrypt_decrypt_compressed_128_bits { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -36,7 +36,7 @@ create_parametrized_test!( } ); -create_parametrized_test!( +create_parameterized_test!( big_radix_encrypt_decrypt_compact_128_bits_list { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS, @@ -47,7 +47,7 @@ create_parametrized_test!( } ); -create_parametrized_test!( +create_parameterized_test!( small_radix_encrypt_decrypt_compact_128_bits_list { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS, diff --git a/tfhe/src/integer/server_key/crt/tests.rs b/tfhe/src/integer/server_key/crt/tests.rs index 0f0c497e07..e700acad08 100644 --- a/tfhe/src/integer/server_key/crt/tests.rs +++ b/tfhe/src/integer/server_key/crt/tests.rs @@ -1,22 +1,22 @@ use super::make_basis; use crate::integer::keycache::KEY_CACHE; -use crate::integer::tests::create_parametrized_test_classical_params; +use crate::integer::tests::create_parameterized_test_classical_params; use crate::integer::IntegerKeyKind; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; use rand::Rng; -create_parametrized_test_classical_params!(integer_unchecked_crt_mul); -create_parametrized_test_classical_params!(integer_smart_crt_add); -create_parametrized_test_classical_params!(integer_smart_crt_mul); -create_parametrized_test_classical_params!(integer_smart_crt_neg); +create_parameterized_test_classical_params!(integer_unchecked_crt_mul); +create_parameterized_test_classical_params!(integer_smart_crt_add); +create_parameterized_test_classical_params!(integer_smart_crt_mul); +create_parameterized_test_classical_params!(integer_smart_crt_neg); -create_parametrized_test_classical_params!(integer_smart_crt_scalar_add); +create_parameterized_test_classical_params!(integer_smart_crt_scalar_add); -create_parametrized_test_classical_params!(integer_smart_crt_scalar_mul); -create_parametrized_test_classical_params!(integer_smart_crt_scalar_sub); -create_parametrized_test_classical_params!(integer_smart_crt_sub); +create_parameterized_test_classical_params!(integer_smart_crt_scalar_mul); +create_parameterized_test_classical_params!(integer_smart_crt_scalar_sub); +create_parameterized_test_classical_params!(integer_smart_crt_sub); /// Number of loop iteration within randomized tests #[cfg(not(tarpaulin))] diff --git a/tfhe/src/integer/server_key/radix/bitwise_op.rs b/tfhe/src/integer/server_key/radix/bitwise_op.rs index d310209e36..1dd8174a88 100644 --- a/tfhe/src/integer/server_key/radix/bitwise_op.rs +++ b/tfhe/src/integer/server_key/radix/bitwise_op.rs @@ -748,15 +748,15 @@ impl ServerKey { #[cfg(test)] mod tests { use crate::integer::keycache::KEY_CACHE; - use crate::integer::tests::create_parametrized_test; + use crate::integer::tests::create_parameterized_test; use crate::integer::{BooleanBlock, IntegerKeyKind}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; - create_parametrized_test!(boolean_bitxor); - create_parametrized_test!(boolean_bitor); - create_parametrized_test!(boolean_bitand); + create_parameterized_test!(boolean_bitxor); + create_parameterized_test!(boolean_bitor); + create_parameterized_test!(boolean_bitand); const INPUT_BOOLEANS: [(bool, bool); 4] = [(false, false), (false, true), (true, false), (true, true)]; diff --git a/tfhe/src/integer/server_key/radix/tests.rs b/tfhe/src/integer/server_key/radix/tests.rs index 13a0f0713b..26e15e16bc 100644 --- a/tfhe/src/integer/server_key/radix/tests.rs +++ b/tfhe/src/integer/server_key/radix/tests.rs @@ -13,7 +13,9 @@ use crate::integer::server_key::radix_parallel::tests_unsigned::test_sub::{ default_overflowing_sub_test, smart_sub_test, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::{create_parametrized_test, create_parametrized_test_classical_params}; +use crate::integer::tests::{ + create_parameterized_test, create_parameterized_test_classical_params, +}; use crate::integer::{IntegerKeyKind, RadixCiphertext, ServerKey, SignedRadixCiphertext, U256}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -40,14 +42,14 @@ const NB_CTXT: usize = 4; #[cfg(tarpaulin)] const NB_CTXT: usize = 2; -create_parametrized_test_classical_params!(integer_encrypt_decrypt); -create_parametrized_test_classical_params!(integer_encrypt_decrypt_128_bits); -create_parametrized_test_classical_params!(integer_encrypt_decrypt_128_bits_specific_values); -create_parametrized_test_classical_params!(integer_encrypt_decrypt_256_bits_specific_values); -create_parametrized_test_classical_params!(integer_encrypt_decrypt_256_bits); -create_parametrized_test_classical_params!(integer_unchecked_add); -create_parametrized_test_classical_params!(integer_smart_add); -create_parametrized_test!( +create_parameterized_test_classical_params!(integer_encrypt_decrypt); +create_parameterized_test_classical_params!(integer_encrypt_decrypt_128_bits); +create_parameterized_test_classical_params!(integer_encrypt_decrypt_128_bits_specific_values); +create_parameterized_test_classical_params!(integer_encrypt_decrypt_256_bits_specific_values); +create_parameterized_test_classical_params!(integer_encrypt_decrypt_256_bits); +create_parameterized_test_classical_params!(integer_unchecked_add); +create_parameterized_test_classical_params!(integer_smart_add); +create_parameterized_test!( integer_smart_add_128_bits { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS @@ -61,38 +63,38 @@ create_parametrized_test!( } } ); -create_parametrized_test_classical_params!(integer_unchecked_bitand); -create_parametrized_test_classical_params!(integer_unchecked_bitor); -create_parametrized_test_classical_params!(integer_unchecked_bitxor); -create_parametrized_test_classical_params!(integer_smart_bitand); -create_parametrized_test_classical_params!(integer_smart_bitor); -create_parametrized_test_classical_params!(integer_smart_bitxor); -create_parametrized_test_classical_params!(integer_unchecked_small_scalar_mul); -create_parametrized_test_classical_params!(integer_smart_small_scalar_mul); -create_parametrized_test_classical_params!(integer_blockshift); -create_parametrized_test_classical_params!(integer_blockshift_right); -create_parametrized_test_classical_params!(integer_smart_scalar_mul); -create_parametrized_test_classical_params!(integer_unchecked_scalar_left_shift); -create_parametrized_test_classical_params!(integer_unchecked_scalar_right_shift); -create_parametrized_test_classical_params!(integer_unchecked_neg); -create_parametrized_test_classical_params!(integer_smart_neg); -create_parametrized_test_classical_params!(integer_unchecked_sub); -create_parametrized_test_classical_params!(integer_smart_sub); +create_parameterized_test_classical_params!(integer_unchecked_bitand); +create_parameterized_test_classical_params!(integer_unchecked_bitor); +create_parameterized_test_classical_params!(integer_unchecked_bitxor); +create_parameterized_test_classical_params!(integer_smart_bitand); +create_parameterized_test_classical_params!(integer_smart_bitor); +create_parameterized_test_classical_params!(integer_smart_bitxor); +create_parameterized_test_classical_params!(integer_unchecked_small_scalar_mul); +create_parameterized_test_classical_params!(integer_smart_small_scalar_mul); +create_parameterized_test_classical_params!(integer_blockshift); +create_parameterized_test_classical_params!(integer_blockshift_right); +create_parameterized_test_classical_params!(integer_smart_scalar_mul); +create_parameterized_test_classical_params!(integer_unchecked_scalar_left_shift); +create_parameterized_test_classical_params!(integer_unchecked_scalar_right_shift); +create_parameterized_test_classical_params!(integer_unchecked_neg); +create_parameterized_test_classical_params!(integer_smart_neg); +create_parameterized_test_classical_params!(integer_unchecked_sub); +create_parameterized_test_classical_params!(integer_smart_sub); #[cfg(not(tarpaulin))] -create_parametrized_test_classical_params!(integer_default_overflowing_sub); -create_parametrized_test_classical_params!(integer_unchecked_block_mul); -create_parametrized_test_classical_params!(integer_smart_block_mul); -create_parametrized_test_classical_params!(integer_smart_mul); -create_parametrized_test_classical_params!(integer_unchecked_mul); +create_parameterized_test_classical_params!(integer_default_overflowing_sub); +create_parameterized_test_classical_params!(integer_unchecked_block_mul); +create_parameterized_test_classical_params!(integer_smart_block_mul); +create_parameterized_test_classical_params!(integer_smart_mul); +create_parameterized_test_classical_params!(integer_unchecked_mul); -create_parametrized_test_classical_params!(integer_smart_scalar_sub); -create_parametrized_test_classical_params!(integer_smart_scalar_add); -create_parametrized_test_classical_params!(integer_unchecked_scalar_sub); -create_parametrized_test_classical_params!(integer_unchecked_scalar_add); +create_parameterized_test_classical_params!(integer_smart_scalar_sub); +create_parameterized_test_classical_params!(integer_smart_scalar_add); +create_parameterized_test_classical_params!(integer_unchecked_scalar_sub); +create_parameterized_test_classical_params!(integer_unchecked_scalar_add); -create_parametrized_test_classical_params!(integer_unchecked_scalar_decomposition_overflow); +create_parameterized_test_classical_params!(integer_unchecked_scalar_decomposition_overflow); -create_parametrized_test!( +create_parameterized_test!( integer_full_propagate { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -108,17 +110,17 @@ create_parametrized_test!( } ); -create_parametrized_test_classical_params!(integer_create_trivial_min_max); -create_parametrized_test_classical_params!(integer_signed_decryption_correctly_sign_extend); -create_parametrized_test_classical_params!(integer_scalar_blockslice); -create_parametrized_test_classical_params!(integer_scalar_blockslice_assign); -create_parametrized_test_classical_params!(integer_unchecked_scalar_slice); -create_parametrized_test_classical_params!(integer_unchecked_scalar_slice_assign); -create_parametrized_test_classical_params!(integer_default_scalar_slice); -create_parametrized_test_classical_params!(integer_default_scalar_slice_assign); -create_parametrized_test_classical_params!(integer_smart_scalar_slice); -create_parametrized_test_classical_params!(integer_smart_scalar_slice_assign); -create_parametrized_test!(integer_unchecked_min { +create_parameterized_test_classical_params!(integer_create_trivial_min_max); +create_parameterized_test_classical_params!(integer_signed_decryption_correctly_sign_extend); +create_parameterized_test_classical_params!(integer_scalar_blockslice); +create_parameterized_test_classical_params!(integer_scalar_blockslice_assign); +create_parameterized_test_classical_params!(integer_unchecked_scalar_slice); +create_parameterized_test_classical_params!(integer_unchecked_scalar_slice_assign); +create_parameterized_test_classical_params!(integer_default_scalar_slice); +create_parameterized_test_classical_params!(integer_default_scalar_slice_assign); +create_parameterized_test_classical_params!(integer_smart_scalar_slice); +create_parameterized_test_classical_params!(integer_smart_scalar_slice_assign); +create_parameterized_test!(integer_unchecked_min { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }, diff --git a/tfhe/src/integer/server_key/radix_parallel/reverse_bits.rs b/tfhe/src/integer/server_key/radix_parallel/reverse_bits.rs index a53dbc6d8e..2c1bbb1c3a 100644 --- a/tfhe/src/integer/server_key/radix_parallel/reverse_bits.rs +++ b/tfhe/src/integer/server_key/radix_parallel/reverse_bits.rs @@ -65,7 +65,7 @@ mod tests { use crate::integer::keycache::KEY_CACHE; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionExecutor; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; - use crate::integer::tests::create_parametrized_test; + use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -122,5 +122,5 @@ mod tests { reverse_bits_test(param, executor); } - create_parametrized_test!(integer_reverse_bits); + create_parameterized_test!(integer_reverse_bits); } diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_long_run/test_erc20.rs b/tfhe/src/integer/server_key/radix_parallel/tests_long_run/test_erc20.rs index 12be88c88c..fee94e8ccd 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_long_run/test_erc20.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_long_run/test_erc20.rs @@ -4,7 +4,7 @@ use crate::integer::server_key::radix_parallel::tests_long_run::{ NB_CTXT_LONG_RUN, NB_TESTS_LONG_RUN, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ BooleanBlock, IntegerCiphertext, IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey, }; @@ -12,16 +12,16 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(safe_erc20 { +create_parameterized_test!(safe_erc20 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64 }); -create_parametrized_test!(whitepaper_erc20 { +create_parameterized_test!(whitepaper_erc20 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64 }); -create_parametrized_test!(no_cmux_erc20 { +create_parameterized_test!(no_cmux_erc20 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64 }); -create_parametrized_test!(overflow_erc20 { +create_parameterized_test!(overflow_erc20 { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64 }); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/mod.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/mod.rs index 28f8add13e..50141c41c9 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/mod.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/mod.rs @@ -28,7 +28,7 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionEx use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, CpuFunctionExecutor, MAX_NB_CTXT, NB_CTXT, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ BooleanBlock, IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey, SignedRadixCiphertext, }; @@ -133,8 +133,8 @@ where // Encrypt/Decrypt Tests //================================================================================ -create_parametrized_test!(integer_signed_encrypt_decrypt); -create_parametrized_test!(integer_signed_encrypt_decrypt_128_bits); +create_parameterized_test!(integer_signed_encrypt_decrypt); +create_parameterized_test!(integer_signed_encrypt_decrypt_128_bits); fn integer_signed_encrypt_decrypt_128_bits(param: impl Into) { let param = param.into(); @@ -192,7 +192,7 @@ fn integer_signed_encrypt_decrypt(param: impl Into) { //================================================================================ // Unchecked Scalar Tests //================================================================================ -create_parametrized_test!(integer_signed_unchecked_scalar_div_rem_floor); +create_parameterized_test!(integer_signed_unchecked_scalar_div_rem_floor); fn integer_signed_unchecked_scalar_div_rem_floor(param: impl Into) { let (cks, sks) = KEY_CACHE.get_from_params(param, IntegerKeyKind::Radix); @@ -301,7 +301,7 @@ fn integer_signed_unchecked_scalar_div_rem_floor(param: impl Into // Default Scalar Tests //================================================================================ -create_parametrized_test!(integer_signed_default_scalar_div_rem); +create_parameterized_test!(integer_signed_default_scalar_div_rem); fn integer_signed_default_scalar_div_rem(param: impl Into) { let (cks, mut sks) = KEY_CACHE.get_from_params(param, IntegerKeyKind::Radix); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/modulus_switch_compression.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/modulus_switch_compression.rs index 2407f3b60e..4500ad61a2 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/modulus_switch_compression.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/modulus_switch_compression.rs @@ -1,5 +1,5 @@ use crate::integer::gen_keys_radix; -use crate::integer::tests::create_parametrized_test_classical_params; +use crate::integer::tests::create_parameterized_test_classical_params; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; @@ -9,7 +9,7 @@ const NB_TESTS: usize = 10; // Remove multi bit PBS parameters as // modulus switch compression and multi bit PBS are currently not compatible -create_parametrized_test_classical_params!(modulus_switch_compression_signed); +create_parameterized_test_classical_params!(modulus_switch_compression_signed); fn modulus_switch_compression_signed

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_abs.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_abs.rs index 7f04d1e10d..27f0a8f9f5 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_abs.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_abs.rs @@ -6,7 +6,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -14,9 +14,9 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_default_absolute_value); -create_parametrized_test!(integer_signed_unchecked_absolute_value); -create_parametrized_test!(integer_signed_smart_absolute_value); +create_parameterized_test!(integer_signed_default_absolute_value); +create_parameterized_test!(integer_signed_unchecked_absolute_value); +create_parameterized_test!(integer_signed_smart_absolute_value); fn integer_signed_default_absolute_value

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_add.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_add.rs index b3a1e24f16..ddc7fa12f5 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_add.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_add.rs @@ -9,7 +9,7 @@ use crate::integer::server_key::radix_parallel::tests_unsigned::{ CpuFunctionExecutor, MAX_NB_CTXT, }; use crate::integer::server_key::radix_parallel::OutputFlag; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ BooleanBlock, IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext, }; @@ -19,9 +19,9 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_add); -create_parametrized_test!(integer_signed_unchecked_overflowing_add); -create_parametrized_test!( +create_parameterized_test!(integer_signed_unchecked_add); +create_parameterized_test!(integer_signed_unchecked_overflowing_add); +create_parameterized_test!( integer_signed_unchecked_overflowing_add_parallelized { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -40,15 +40,15 @@ create_parametrized_test!( } } ); -create_parametrized_test!(integer_signed_smart_add); -create_parametrized_test!(integer_signed_default_add); -create_parametrized_test!(integer_extensive_trivial_signed_default_add); -create_parametrized_test!(integer_signed_default_overflowing_add); -create_parametrized_test!(integer_extensive_trivial_signed_overflowing_add); -create_parametrized_test!( +create_parameterized_test!(integer_signed_smart_add); +create_parameterized_test!(integer_signed_default_add); +create_parameterized_test!(integer_extensive_trivial_signed_default_add); +create_parameterized_test!(integer_signed_default_overflowing_add); +create_parameterized_test!(integer_extensive_trivial_signed_overflowing_add); +create_parameterized_test!( integer_extensive_trivial_signed_advanced_overflowing_add_assign_with_carry_sequential ); -create_parametrized_test!( +create_parameterized_test!( integer_extensive_trivial_signed_overflowing_advanced_add_assign_with_carry_at_least_4_bits { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_bitwise_op.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_bitwise_op.rs index 0edc6c44ca..9e0f82ccfa 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_bitwise_op.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_bitwise_op.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, nb_unchecked_tests_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -15,13 +15,13 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_bitand); -create_parametrized_test!(integer_signed_unchecked_bitor); -create_parametrized_test!(integer_signed_unchecked_bitxor); -create_parametrized_test!(integer_signed_default_bitnot); -create_parametrized_test!(integer_signed_default_bitand); -create_parametrized_test!(integer_signed_default_bitor); -create_parametrized_test!(integer_signed_default_bitxor); +create_parameterized_test!(integer_signed_unchecked_bitand); +create_parameterized_test!(integer_signed_unchecked_bitor); +create_parameterized_test!(integer_signed_unchecked_bitxor); +create_parameterized_test!(integer_signed_default_bitnot); +create_parameterized_test!(integer_signed_default_bitand); +create_parameterized_test!(integer_signed_default_bitor); +create_parameterized_test!(integer_signed_default_bitxor); fn integer_signed_unchecked_bitand

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_cmux.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_cmux.rs index e95ef840fb..afc677d0a8 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_cmux.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_cmux.rs @@ -4,7 +4,7 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{FunctionE use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ BooleanBlock, IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext, }; @@ -14,12 +14,12 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_if_then_else { +create_parameterized_test!(integer_signed_unchecked_if_then_else { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); -create_parametrized_test!(integer_signed_default_if_then_else { +create_parameterized_test!(integer_signed_default_if_then_else { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_comparison.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_comparison.rs index 0047455e73..111cbc95fb 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_comparison.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_comparison.rs @@ -5,7 +5,7 @@ use crate::integer::client_key::RecomposableSignedInteger; use crate::integer::keycache::KEY_CACHE; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionExecutor; use crate::integer::server_key::radix_parallel::tests_unsigned::{CpuFunctionExecutor, NB_CTXT}; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{BooleanBlock, IntegerKeyKind, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -345,9 +345,9 @@ macro_rules! define_signed_comparison_test_functions { } - // Then call our create_parametrized_test macro onto or specialized fns + // Then call our create_parameterized_test macro onto or specialized fns - create_parametrized_test!([] + create_parameterized_test!([] { // Non parallelized does not support 1_1 @@ -360,7 +360,7 @@ macro_rules! define_signed_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -373,7 +373,7 @@ macro_rules! define_signed_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { // Non parallelized does not support PARAM_MESSAGE_1_CARRY_1_KS_PBS, @@ -388,7 +388,7 @@ macro_rules! define_signed_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -403,7 +403,7 @@ macro_rules! define_signed_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -712,9 +712,9 @@ mod no_coverage { test_signed_default_minmax(params, 2, executor, std::cmp::max::); } - create_parametrized_test!(integer_signed_unchecked_max_parallelized_128_bits); - create_parametrized_test!(integer_signed_unchecked_min_parallelized_128_bits); - create_parametrized_test!(integer_signed_smart_max_parallelized_128_bits { + create_parameterized_test!(integer_signed_unchecked_max_parallelized_128_bits); + create_parameterized_test!(integer_signed_unchecked_min_parallelized_128_bits); + create_parameterized_test!(integer_signed_smart_max_parallelized_128_bits { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -723,7 +723,7 @@ mod no_coverage { // of message so the overflow behaviour is not the same, leading to false negatives PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_signed_smart_min_parallelized_128_bits { + create_parameterized_test!(integer_signed_smart_min_parallelized_128_bits { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -732,7 +732,7 @@ mod no_coverage { // of message so the overflow behaviour is not the same, leading to false negatives PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_signed_max_parallelized_128_bits { + create_parameterized_test!(integer_signed_max_parallelized_128_bits { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -741,7 +741,7 @@ mod no_coverage { // of message so the overflow behaviour is not the same, leading to false negatives PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_signed_min_parallelized_128_bits { + create_parameterized_test!(integer_signed_min_parallelized_128_bits { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -763,7 +763,7 @@ mod no_coverage { #[cfg(tarpaulin)] mod coverage { use super::*; - use crate::integer::tests::create_parametrized_test_classical_params; + use crate::integer::tests::create_parameterized_test_classical_params; fn integer_signed_unchecked_min_parallelized_8_bits( params: crate::shortint::ClassicPBSParameters, @@ -799,12 +799,12 @@ mod coverage { test_signed_default_minmax(params, 1, executor, std::cmp::max::) } - create_parametrized_test_classical_params!(integer_signed_unchecked_max_parallelized_8_bits); - create_parametrized_test_classical_params!(integer_signed_unchecked_min_parallelized_8_bits); - create_parametrized_test_classical_params!(integer_signed_smart_max_parallelized_8_bits); - create_parametrized_test_classical_params!(integer_signed_smart_min_parallelized_8_bits); - create_parametrized_test_classical_params!(integer_signed_max_parallelized_8_bits); - create_parametrized_test_classical_params!(integer_signed_min_parallelized_8_bits); + create_parameterized_test_classical_params!(integer_signed_unchecked_max_parallelized_8_bits); + create_parameterized_test_classical_params!(integer_signed_unchecked_min_parallelized_8_bits); + create_parameterized_test_classical_params!(integer_signed_smart_max_parallelized_8_bits); + create_parameterized_test_classical_params!(integer_signed_smart_min_parallelized_8_bits); + create_parameterized_test_classical_params!(integer_signed_max_parallelized_8_bits); + create_parameterized_test_classical_params!(integer_signed_min_parallelized_8_bits); define_signed_comparison_test_functions!(eq, i8); define_signed_comparison_test_functions!(ne, i8); @@ -814,7 +814,7 @@ mod coverage { define_signed_comparison_test_functions!(ge, i8); } -create_parametrized_test!(integer_extensive_trivial_signed_default_comparisons); +create_parameterized_test!(integer_extensive_trivial_signed_default_comparisons); fn integer_extensive_trivial_signed_default_comparisons(params: impl Into) { let lt_executor = CpuFunctionExecutor::new(&ServerKey::lt_parallelized); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_count_zeros_ones.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_count_zeros_ones.rs index bafe4a6fe9..45fb323fa8 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_count_zeros_ones.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_count_zeros_ones.rs @@ -3,7 +3,7 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionEx use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_smaller_for_params, CpuFunctionExecutor, MAX_NB_CTXT, NB_CTXT, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey, SignedRadixCiphertext, }; @@ -13,8 +13,8 @@ use crate::shortint::PBSParameters; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_extensive_trivial_signed_default_count_zeros_ones); -create_parametrized_test!(integer_signed_default_count_zeros_ones); +create_parameterized_test!(integer_extensive_trivial_signed_default_count_zeros_ones); +create_parameterized_test!(integer_signed_default_count_zeros_ones); fn integer_extensive_trivial_signed_default_count_zeros_ones

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_div_rem.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_div_rem.rs index 125313dd2d..938c6cbf19 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_div_rem.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_div_rem.rs @@ -6,7 +6,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_smaller_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -14,7 +14,7 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!( +create_parameterized_test!( integer_signed_unchecked_div_rem { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -32,7 +32,7 @@ create_parametrized_test!( } } ); -create_parametrized_test!( +create_parameterized_test!( integer_signed_unchecked_div_rem_floor { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_ilog2.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_ilog2.rs index 6e9ad08ee5..0cdd7af600 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_ilog2.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_ilog2.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_smaller_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ BooleanBlock, IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey, SignedRadixCiphertext, }; @@ -18,12 +18,12 @@ use crate::shortint::PBSParameters; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_default_trailing_zeros); -create_parametrized_test!(integer_signed_default_trailing_ones); -create_parametrized_test!(integer_signed_default_leading_zeros); -create_parametrized_test!(integer_signed_default_leading_ones); -create_parametrized_test!(integer_signed_default_ilog2); -create_parametrized_test!(integer_signed_default_checked_ilog2 { +create_parameterized_test!(integer_signed_default_trailing_zeros); +create_parameterized_test!(integer_signed_default_trailing_ones); +create_parameterized_test!(integer_signed_default_leading_zeros); +create_parameterized_test!(integer_signed_default_leading_ones); +create_parameterized_test!(integer_signed_default_ilog2); +create_parameterized_test!(integer_signed_default_checked_ilog2 { // uses comparison so 1_1 parameters are not supported PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_mul.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_mul.rs index 82eff38321..2910ccc3cb 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_mul.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_mul.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_smaller_for_params, nb_unchecked_tests_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -15,9 +15,9 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_mul); -create_parametrized_test!(integer_signed_default_mul); -create_parametrized_test!( +create_parameterized_test!(integer_signed_unchecked_mul); +create_parameterized_test!(integer_signed_default_mul); +create_parameterized_test!( integer_signed_default_overflowing_mul { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_neg.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_neg.rs index 2e578bfb52..92daa9b3a3 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_neg.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_neg.rs @@ -6,7 +6,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_smaller_for_params, nb_unchecked_tests_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -14,9 +14,9 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_neg); -create_parametrized_test!(integer_signed_smart_neg); -create_parametrized_test!(integer_signed_default_neg); +create_parameterized_test!(integer_signed_unchecked_neg); +create_parameterized_test!(integer_signed_smart_neg); +create_parameterized_test!(integer_signed_default_neg); fn integer_signed_unchecked_neg

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_rotate.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_rotate.rs index 976e72b199..642bbc21da 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_rotate.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_rotate.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, nb_tests_smaller_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey, SignedRadixCiphertext, }; @@ -17,13 +17,13 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_rotate_right); +create_parameterized_test!(integer_signed_unchecked_rotate_right); -create_parametrized_test!(integer_signed_unchecked_rotate_left); +create_parameterized_test!(integer_signed_unchecked_rotate_left); -create_parametrized_test!(integer_signed_rotate_right); +create_parameterized_test!(integer_signed_rotate_right); -create_parametrized_test!(integer_signed_rotate_left); +create_parameterized_test!(integer_signed_rotate_left); pub(crate) fn signed_default_rotate_left_test(param: P, mut executor: T) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_add.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_add.rs index 7d04b252b8..f9642d6914 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_add.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_add.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, nb_tests_smaller_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ BooleanBlock, IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext, }; @@ -17,9 +17,9 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_scalar_add); -create_parametrized_test!(integer_signed_default_scalar_add); -create_parametrized_test!(integer_signed_default_overflowing_scalar_add); +create_parameterized_test!(integer_signed_unchecked_scalar_add); +create_parameterized_test!(integer_signed_default_scalar_add); +create_parameterized_test!(integer_signed_default_overflowing_scalar_add); fn integer_signed_unchecked_scalar_add

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_bitwise_op.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_bitwise_op.rs index 9c7a643078..f13494cc7d 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_bitwise_op.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_bitwise_op.rs @@ -6,7 +6,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -14,9 +14,9 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_default_scalar_bitand); -create_parametrized_test!(integer_signed_default_scalar_bitor); -create_parametrized_test!(integer_signed_default_scalar_bitxor); +create_parameterized_test!(integer_signed_default_scalar_bitand); +create_parameterized_test!(integer_signed_default_scalar_bitor); +create_parameterized_test!(integer_signed_default_scalar_bitxor); fn integer_signed_default_scalar_bitand

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_comparison.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_comparison.rs index 5067beba42..3727b9adcf 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_comparison.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_comparison.rs @@ -5,7 +5,7 @@ use crate::integer::client_key::RecomposableSignedInteger; use crate::integer::keycache::KEY_CACHE; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionExecutor; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{BooleanBlock, IntegerKeyKind, RadixClientKey, ServerKey, I256}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -264,7 +264,7 @@ macro_rules! define_signed_scalar_comparison_test_functions { ) } - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -278,7 +278,7 @@ macro_rules! define_signed_scalar_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -294,7 +294,7 @@ macro_rules! define_signed_scalar_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -609,19 +609,19 @@ mod no_coverage { test_signed_default_scalar_minmax(params, 2, executor, std::cmp::max::); } - create_parametrized_test!(integer_signed_unchecked_scalar_max_parallelized_i128 { + create_parameterized_test!(integer_signed_unchecked_scalar_max_parallelized_i128 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_signed_unchecked_scalar_min_parallelized_i128 { + create_parameterized_test!(integer_signed_unchecked_scalar_min_parallelized_i128 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_signed_smart_scalar_max_parallelized_i128 { + create_parameterized_test!(integer_signed_smart_scalar_max_parallelized_i128 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -630,7 +630,7 @@ mod no_coverage { // of message so the overflow behaviour is not the same, leading to false negatives PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_signed_smart_scalar_min_parallelized_i128 { + create_parameterized_test!(integer_signed_smart_scalar_min_parallelized_i128 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -639,7 +639,7 @@ mod no_coverage { // of message so the overflow behaviour is not the same, leading to false negatives PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_signed_scalar_max_parallelized_i128 { + create_parameterized_test!(integer_signed_scalar_max_parallelized_i128 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -648,7 +648,7 @@ mod no_coverage { // of message so the overflow behaviour is not the same, leading to false negatives PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_signed_scalar_min_parallelized_i128 { + create_parameterized_test!(integer_signed_scalar_min_parallelized_i128 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -665,7 +665,7 @@ mod no_coverage { define_signed_scalar_comparison_test_functions!(gt, i128); define_signed_scalar_comparison_test_functions!(ge, i128); - create_parametrized_test!(integer_signed_is_scalar_out_of_bounds { + create_parameterized_test!(integer_signed_is_scalar_out_of_bounds { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, @@ -679,7 +679,7 @@ mod no_coverage { #[cfg(tarpaulin)] mod coverage { use super::*; - use crate::integer::tests::create_parametrized_test_classical_params; + use crate::integer::tests::create_parameterized_test_classical_params; fn integer_signed_unchecked_scalar_min_parallelized_i8( params: crate::shortint::ClassicPBSParameters, @@ -718,12 +718,16 @@ mod coverage { test_signed_default_scalar_minmax(params, 1, executor, std::cmp::max::); } - create_parametrized_test_classical_params!(integer_signed_unchecked_scalar_min_parallelized_i8); - create_parametrized_test_classical_params!(integer_signed_unchecked_scalar_max_parallelized_i8); - create_parametrized_test_classical_params!(integer_signed_smart_scalar_min_parallelized_i8); - create_parametrized_test_classical_params!(integer_signed_smart_scalar_max_parallelized_i8); - create_parametrized_test_classical_params!(integer_signed_scalar_min_parallelized_i8); - create_parametrized_test_classical_params!(integer_signed_scalar_max_parallelized_i8); + create_parameterized_test_classical_params!( + integer_signed_unchecked_scalar_min_parallelized_i8 + ); + create_parameterized_test_classical_params!( + integer_signed_unchecked_scalar_max_parallelized_i8 + ); + create_parameterized_test_classical_params!(integer_signed_smart_scalar_min_parallelized_i8); + create_parameterized_test_classical_params!(integer_signed_smart_scalar_max_parallelized_i8); + create_parameterized_test_classical_params!(integer_signed_scalar_min_parallelized_i8); + create_parameterized_test_classical_params!(integer_signed_scalar_max_parallelized_i8); define_signed_scalar_comparison_test_functions!(eq, i8); define_signed_scalar_comparison_test_functions!(ne, i8); @@ -732,10 +736,10 @@ mod coverage { define_signed_scalar_comparison_test_functions!(gt, i8); define_signed_scalar_comparison_test_functions!(ge, i8); - create_parametrized_test_classical_params!(integer_signed_is_scalar_out_of_bounds); + create_parameterized_test_classical_params!(integer_signed_is_scalar_out_of_bounds); } -create_parametrized_test!(integer_extensive_trivial_signed_default_scalar_comparisons); +create_parameterized_test!(integer_extensive_trivial_signed_default_scalar_comparisons); fn integer_extensive_trivial_signed_default_scalar_comparisons(params: impl Into) { let lt_executor = CpuFunctionExecutor::new(&ServerKey::scalar_lt_parallelized); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_div_mod.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_div_mod.rs index d56e10ef51..383f4c55ff 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_div_mod.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_div_mod.rs @@ -6,7 +6,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ signed_div_under_modulus, signed_rem_under_modulus, NB_CTXT, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -15,7 +15,7 @@ use itertools::iproduct; use rand::prelude::*; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_scalar_div_rem); +create_parameterized_test!(integer_signed_unchecked_scalar_div_rem); fn integer_signed_unchecked_scalar_div_rem

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_mul.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_mul.rs index 94d3087354..005fba649e 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_mul.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_mul.rs @@ -4,7 +4,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{signed_mul_under_ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -12,7 +12,7 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_scalar_mul); +create_parameterized_test!(integer_signed_unchecked_scalar_mul); fn integer_signed_unchecked_scalar_mul

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_rotate.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_rotate.rs index 9ba7034931..4dd93e9ec6 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_rotate.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_rotate.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, nb_tests_smaller_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -15,10 +15,10 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_scalar_rotate_left); -create_parametrized_test!(integer_signed_default_scalar_rotate_left); -create_parametrized_test!(integer_signed_unchecked_scalar_rotate_right); -create_parametrized_test!(integer_signed_default_scalar_rotate_right); +create_parameterized_test!(integer_signed_unchecked_scalar_rotate_left); +create_parameterized_test!(integer_signed_default_scalar_rotate_left); +create_parameterized_test!(integer_signed_unchecked_scalar_rotate_right); +create_parameterized_test!(integer_signed_default_scalar_rotate_right); fn integer_signed_unchecked_scalar_rotate_left

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_shift.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_shift.rs index e6d4ea99c4..d6c035b6af 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_shift.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_shift.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, nb_tests_smaller_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -15,10 +15,10 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_scalar_left_shift); -create_parametrized_test!(integer_signed_default_scalar_left_shift); -create_parametrized_test!(integer_signed_unchecked_scalar_right_shift); -create_parametrized_test!(integer_signed_default_scalar_right_shift); +create_parameterized_test!(integer_signed_unchecked_scalar_left_shift); +create_parameterized_test!(integer_signed_default_scalar_left_shift); +create_parameterized_test!(integer_signed_unchecked_scalar_right_shift); +create_parameterized_test!(integer_signed_default_scalar_right_shift); fn integer_signed_unchecked_scalar_left_shift

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_sub.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_sub.rs index 4de0517e4e..a2b3c92502 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_sub.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_scalar_sub.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, nb_tests_smaller_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ BooleanBlock, IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext, }; @@ -17,8 +17,8 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_scalar_sub); -create_parametrized_test!(integer_signed_default_overflowing_scalar_sub); +create_parameterized_test!(integer_signed_unchecked_scalar_sub); +create_parameterized_test!(integer_signed_default_overflowing_scalar_sub); fn integer_signed_unchecked_scalar_sub

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_shift.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_shift.rs index f0aea82c71..5a3fc4c5f3 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_shift.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_shift.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_signed::{ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, nb_tests_smaller_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey, SignedRadixCiphertext, }; @@ -17,11 +17,11 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_left_shift); +create_parameterized_test!(integer_signed_unchecked_left_shift); -create_parametrized_test!(integer_signed_unchecked_right_shift); -create_parametrized_test!(integer_signed_left_shift); -create_parametrized_test!(integer_signed_right_shift); +create_parameterized_test!(integer_signed_unchecked_right_shift); +create_parameterized_test!(integer_signed_left_shift); +create_parameterized_test!(integer_signed_right_shift); pub(crate) fn signed_default_left_shift_test(param: P, mut executor: T) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_sub.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_sub.rs index 26657e81e5..3fd712ee7f 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_sub.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_sub.rs @@ -9,7 +9,7 @@ use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, nb_tests_smaller_for_params, nb_unchecked_tests_for_params, CpuFunctionExecutor, MAX_NB_CTXT, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{ BooleanBlock, IntegerKeyKind, RadixClientKey, ServerKey, SignedRadixCiphertext, }; @@ -19,13 +19,13 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_signed_unchecked_sub); -create_parametrized_test!(integer_signed_unchecked_overflowing_sub); -create_parametrized_test!(integer_signed_default_sub); -create_parametrized_test!(integer_extensive_trivial_signed_default_sub); -create_parametrized_test!(integer_signed_default_overflowing_sub); -create_parametrized_test!(integer_signed_default_overflowing_sub_sequential); -create_parametrized_test!(integer_signed_default_overflowing_sub_parallel { +create_parameterized_test!(integer_signed_unchecked_sub); +create_parameterized_test!(integer_signed_unchecked_overflowing_sub); +create_parameterized_test!(integer_signed_default_sub); +create_parameterized_test!(integer_extensive_trivial_signed_default_sub); +create_parameterized_test!(integer_signed_default_overflowing_sub); +create_parameterized_test!(integer_signed_default_overflowing_sub_sequential); +create_parameterized_test!(integer_signed_default_overflowing_sub_parallel { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, COVERAGE_PARAM_MULTI_BIT_MESSAGE_2_CARRY_2_GROUP_2_KS_PBS @@ -40,7 +40,7 @@ create_parametrized_test!(integer_signed_default_overflowing_sub_parallel { PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 } }); -create_parametrized_test!(integer_extensive_trivial_signed_default_overflowing_sub); +create_parameterized_test!(integer_extensive_trivial_signed_default_overflowing_sub); fn integer_signed_unchecked_sub

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_vector_comparisons.rs b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_vector_comparisons.rs index f6d9fe2b71..2e27580b25 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_vector_comparisons.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_signed/test_vector_comparisons.rs @@ -10,10 +10,10 @@ use std::sync::Arc; use crate::integer::server_key::radix_parallel::tests_unsigned::test_vector_comparisons::{ default_all_eq_slices_test_case_impl, unchecked_all_eq_slices_test_case_impl, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; -create_parametrized_test!(integer_signed_unchecked_all_eq_slices_test_case); -create_parametrized_test!(integer_signed_default_all_eq_slices_test_case); +create_parameterized_test!(integer_signed_unchecked_all_eq_slices_test_case); +create_parameterized_test!(integer_signed_default_all_eq_slices_test_case); fn integer_signed_unchecked_all_eq_slices_test_case

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/mod.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/mod.rs index 094ae0b72e..ead9ba77fe 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/mod.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/mod.rs @@ -27,7 +27,7 @@ pub(crate) mod test_vector_find; use super::tests_cases_unsigned::*; use crate::core_crypto::prelude::UnsignedInteger; use crate::integer::keycache::KEY_CACHE; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{BooleanBlock, IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; use crate::shortint::ciphertext::MaxDegree; #[cfg(tarpaulin)] @@ -431,7 +431,7 @@ impl ExpectedDegrees { } // left/right shifts -create_parametrized_test!( +create_parameterized_test!( integer_unchecked_left_shift { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -449,7 +449,7 @@ create_parametrized_test!( } } ); -create_parametrized_test!( +create_parameterized_test!( integer_unchecked_right_shift { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -468,7 +468,7 @@ create_parametrized_test!( } ); // left/right rotations -create_parametrized_test!( +create_parameterized_test!( integer_unchecked_rotate_left { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -486,7 +486,7 @@ create_parametrized_test!( } } ); -create_parametrized_test!( +create_parameterized_test!( integer_unchecked_rotate_right { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -505,8 +505,8 @@ create_parametrized_test!( } ); // left/right rotations -create_parametrized_test!(integer_trim_radix_msb_blocks_handles_dirty_inputs); -create_parametrized_test!( +create_parameterized_test!(integer_trim_radix_msb_blocks_handles_dirty_inputs); +create_parameterized_test!( integer_full_propagate { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/modulus_switch_compression.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/modulus_switch_compression.rs index b4ff898bc3..8a0a21b83d 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/modulus_switch_compression.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/modulus_switch_compression.rs @@ -1,5 +1,5 @@ use crate::integer::gen_keys_radix; -use crate::integer::tests::create_parametrized_test_classical_params; +use crate::integer::tests::create_parameterized_test_classical_params; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; @@ -9,7 +9,7 @@ const NB_TESTS: usize = 10; // Remove multi bit PBS parameters as // modulus switch compression and multi bit PBS are currently not compatible -create_parametrized_test_classical_params!(modulus_switch_compression); +create_parameterized_test_classical_params!(modulus_switch_compression); fn modulus_switch_compression

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_add.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_add.rs index 3f9660308c..4558ef94f0 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_add.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_add.rs @@ -8,7 +8,7 @@ use super::{ use crate::integer::keycache::KEY_CACHE; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionExecutor; use crate::integer::server_key::radix_parallel::OutputFlag; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{BooleanBlock, IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -16,14 +16,14 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_unchecked_add); -create_parametrized_test!(integer_unchecked_add_assign); -create_parametrized_test!(integer_smart_add); -create_parametrized_test!(integer_default_add); -create_parametrized_test!(integer_extensive_trivial_default_add); -create_parametrized_test!(integer_default_overflowing_add); -create_parametrized_test!(integer_extensive_trivial_default_overflowing_add); -create_parametrized_test!(integer_advanced_overflowing_add_assign_with_carry_at_least_4_bits { +create_parameterized_test!(integer_unchecked_add); +create_parameterized_test!(integer_unchecked_add_assign); +create_parameterized_test!(integer_smart_add); +create_parameterized_test!(integer_default_add); +create_parameterized_test!(integer_extensive_trivial_default_add); +create_parameterized_test!(integer_default_overflowing_add); +create_parameterized_test!(integer_extensive_trivial_default_overflowing_add); +create_parameterized_test!(integer_advanced_overflowing_add_assign_with_carry_at_least_4_bits { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, COVERAGE_PARAM_MULTI_BIT_MESSAGE_2_CARRY_2_GROUP_2_KS_PBS @@ -38,8 +38,8 @@ create_parametrized_test!(integer_advanced_overflowing_add_assign_with_carry_at_ PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 } }); -create_parametrized_test!(integer_advanced_add_assign_with_carry_sequential); -create_parametrized_test!(integer_extensive_trivial_overflowing_advanced_add_assign_with_carry_at_least_4_bits { +create_parameterized_test!(integer_advanced_add_assign_with_carry_sequential); +create_parameterized_test!(integer_extensive_trivial_overflowing_advanced_add_assign_with_carry_at_least_4_bits { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, COVERAGE_PARAM_MULTI_BIT_MESSAGE_2_CARRY_2_GROUP_2_KS_PBS @@ -54,7 +54,7 @@ create_parametrized_test!(integer_extensive_trivial_overflowing_advanced_add_ass PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 } }); -create_parametrized_test!( +create_parameterized_test!( integer_extensive_trivial_advanced_overflowing_add_assign_with_carry_sequential ); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_bitwise_op.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_bitwise_op.rs index b97d539f8b..f4e8ca3f03 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_bitwise_op.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_bitwise_op.rs @@ -4,23 +4,23 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ unchecked_bitnot_test, unchecked_bitor_test, unchecked_bitxor_test, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::ServerKey; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; -create_parametrized_test!(integer_smart_bitand); -create_parametrized_test!(integer_smart_bitor); -create_parametrized_test!(integer_smart_bitxor); -create_parametrized_test!(integer_default_bitand); -create_parametrized_test!(integer_default_bitor); -create_parametrized_test!(integer_default_bitnot); -create_parametrized_test!(integer_default_bitxor); -create_parametrized_test!(integer_unchecked_bitand); -create_parametrized_test!(integer_unchecked_bitor); -create_parametrized_test!(integer_unchecked_bitnot); -create_parametrized_test!(integer_unchecked_bitxor); +create_parameterized_test!(integer_smart_bitand); +create_parameterized_test!(integer_smart_bitor); +create_parameterized_test!(integer_smart_bitxor); +create_parameterized_test!(integer_default_bitand); +create_parameterized_test!(integer_default_bitor); +create_parameterized_test!(integer_default_bitnot); +create_parameterized_test!(integer_default_bitxor); +create_parameterized_test!(integer_unchecked_bitand); +create_parameterized_test!(integer_unchecked_bitor); +create_parameterized_test!(integer_unchecked_bitnot); +create_parameterized_test!(integer_unchecked_bitxor); fn integer_smart_bitand

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_cmux.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_cmux.rs index 5a0fff4761..0d9988b499 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_cmux.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_cmux.rs @@ -4,7 +4,7 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{FunctionE use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{BooleanBlock, IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -12,8 +12,8 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_smart_if_then_else); -create_parametrized_test!(integer_default_if_then_else); +create_parameterized_test!(integer_smart_if_then_else); +create_parameterized_test!(integer_default_if_then_else); fn integer_smart_if_then_else

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_comparison.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_comparison.rs index da39b4d183..692e9aaa3e 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_comparison.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_comparison.rs @@ -4,7 +4,7 @@ use crate::integer::ciphertext::RadixCiphertext; use crate::integer::keycache::KEY_CACHE; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionExecutor; use crate::integer::server_key::radix_parallel::tests_unsigned::{CpuFunctionExecutor, NB_CTXT}; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{BooleanBlock, IntegerKeyKind, RadixClientKey, ServerKey, U256}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -316,7 +316,7 @@ macro_rules! define_comparison_test_functions { ) } - create_parametrized_test!([] + create_parameterized_test!([] { // Non parallelized does not support 1_1 @@ -328,7 +328,7 @@ macro_rules! define_comparison_test_functions { #[cfg(tarpaulin)] COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -341,7 +341,7 @@ macro_rules! define_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { // Non parallelized does not support 1_1 @@ -356,7 +356,7 @@ macro_rules! define_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -371,7 +371,7 @@ macro_rules! define_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -660,27 +660,27 @@ mod no_coverage { test_default_minmax(params, 2, executor, std::cmp::max::); } - create_parametrized_test!(integer_unchecked_min_parallelized_u256); - create_parametrized_test!(integer_unchecked_max_parallelized_u256); - create_parametrized_test!(integer_smart_min_parallelized_u256 { + create_parameterized_test!(integer_unchecked_min_parallelized_u256); + create_parameterized_test!(integer_unchecked_max_parallelized_u256); + create_parameterized_test!(integer_smart_min_parallelized_u256 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_comparison_test_functions macro PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_smart_max_parallelized_u256 { + create_parameterized_test!(integer_smart_max_parallelized_u256 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_comparison_test_functions macro PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_min_parallelized_u256 { + create_parameterized_test!(integer_min_parallelized_u256 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_comparison_test_functions macro PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_max_parallelized_u256 { + create_parameterized_test!(integer_max_parallelized_u256 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_comparison_test_functions macro @@ -699,7 +699,7 @@ mod no_coverage { #[cfg(tarpaulin)] mod coverage { use super::*; - use crate::integer::tests::create_parametrized_test_classical_params; + use crate::integer::tests::create_parameterized_test_classical_params; //============================================================= // Unsigned comparison tests @@ -735,12 +735,12 @@ mod coverage { test_default_minmax(params, 1, executor, std::cmp::max::); } - create_parametrized_test_classical_params!(integer_unchecked_min_parallelized_u8); - create_parametrized_test_classical_params!(integer_unchecked_max_parallelized_u8); - create_parametrized_test_classical_params!(integer_smart_min_parallelized_u8); - create_parametrized_test_classical_params!(integer_smart_max_parallelized_u8); - create_parametrized_test_classical_params!(integer_min_parallelized_u8); - create_parametrized_test_classical_params!(integer_max_parallelized_u8); + create_parameterized_test_classical_params!(integer_unchecked_min_parallelized_u8); + create_parameterized_test_classical_params!(integer_unchecked_max_parallelized_u8); + create_parameterized_test_classical_params!(integer_smart_min_parallelized_u8); + create_parameterized_test_classical_params!(integer_smart_max_parallelized_u8); + create_parameterized_test_classical_params!(integer_min_parallelized_u8); + create_parameterized_test_classical_params!(integer_max_parallelized_u8); define_comparison_test_functions!(eq, u8); define_comparison_test_functions!(ne, u8); @@ -750,7 +750,7 @@ mod coverage { define_comparison_test_functions!(ge, u8); } -create_parametrized_test!(integer_extensive_trivial_default_comparisons); +create_parameterized_test!(integer_extensive_trivial_default_comparisons); fn integer_extensive_trivial_default_comparisons(params: impl Into) { let lt_executor = CpuFunctionExecutor::new(&ServerKey::lt_parallelized); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_count_zeros_ones.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_count_zeros_ones.rs index b0f9e2a048..9c4f3816a5 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_count_zeros_ones.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_count_zeros_ones.rs @@ -3,7 +3,7 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionEx use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_smaller_for_params, CpuFunctionExecutor, MAX_NB_CTXT, NB_CTXT, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; use crate::shortint::PBSParameters; use rand::Rng; @@ -11,8 +11,8 @@ use std::sync::Arc; use crate::shortint::parameters::*; -create_parametrized_test!(integer_extensive_trivial_default_count_zeros_ones); -create_parametrized_test!(integer_default_count_zeros_ones); +create_parameterized_test!(integer_extensive_trivial_default_count_zeros_ones); +create_parameterized_test!(integer_default_count_zeros_ones); fn integer_extensive_trivial_default_count_zeros_ones

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_div_mod.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_div_mod.rs index c1ffc44683..35f3810a92 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_div_mod.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_div_mod.rs @@ -3,7 +3,7 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionEx use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_smaller_for_params, CpuFunctionExecutor, NB_CTXT, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -11,7 +11,7 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!( +create_parameterized_test!( integer_smart_div_rem { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -30,7 +30,7 @@ create_parametrized_test!( } } ); -create_parametrized_test!( +create_parameterized_test!( integer_smart_div { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -49,7 +49,7 @@ create_parametrized_test!( } } ); -create_parametrized_test!( +create_parameterized_test!( integer_smart_rem { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -68,7 +68,7 @@ create_parametrized_test!( } } ); -create_parametrized_test!( +create_parameterized_test!( integer_default_div_rem { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -87,7 +87,7 @@ create_parametrized_test!( } } ); -create_parametrized_test!( +create_parameterized_test!( integer_default_rem { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -106,7 +106,7 @@ create_parametrized_test!( } } ); -create_parametrized_test!( +create_parameterized_test!( integer_default_div { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_ilog2.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_ilog2.rs index e58eac2ab8..e5ec417295 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_ilog2.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_ilog2.rs @@ -4,7 +4,7 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionEx use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_smaller_for_params, random_non_zero_value, CpuFunctionExecutor, NB_CTXT, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{BooleanBlock, IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -12,12 +12,12 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_default_trailing_zeros); -create_parametrized_test!(integer_default_trailing_ones); -create_parametrized_test!(integer_default_leading_zeros); -create_parametrized_test!(integer_default_leading_ones); -create_parametrized_test!(integer_default_ilog2); -create_parametrized_test!(integer_default_checked_ilog2 { +create_parameterized_test!(integer_default_trailing_zeros); +create_parameterized_test!(integer_default_trailing_ones); +create_parameterized_test!(integer_default_leading_zeros); +create_parameterized_test!(integer_default_leading_ones); +create_parameterized_test!(integer_default_ilog2); +create_parameterized_test!(integer_default_checked_ilog2 { // This uses comparisons, so require more than 1 bit PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_mul.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_mul.rs index acc54eb4bb..70efe3b232 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_mul.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_mul.rs @@ -4,20 +4,20 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ unchecked_mul_corner_cases_test, unchecked_mul_test, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::ServerKey; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; -create_parametrized_test!(integer_unchecked_mul_corner_cases); -create_parametrized_test!(integer_unchecked_block_mul); -create_parametrized_test!(integer_smart_block_mul); -create_parametrized_test!(integer_default_block_mul); -create_parametrized_test!(integer_smart_mul); -create_parametrized_test!(integer_default_mul); -create_parametrized_test!(integer_default_unsigned_overflowing_mul); -create_parametrized_test!(integer_unchecked_mul); +create_parameterized_test!(integer_unchecked_mul_corner_cases); +create_parameterized_test!(integer_unchecked_block_mul); +create_parameterized_test!(integer_smart_block_mul); +create_parameterized_test!(integer_default_block_mul); +create_parameterized_test!(integer_smart_mul); +create_parameterized_test!(integer_default_mul); +create_parameterized_test!(integer_default_unsigned_overflowing_mul); +create_parameterized_test!(integer_unchecked_mul); fn integer_unchecked_mul

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_neg.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_neg.rs index af1a2e80a6..c939f3386a 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_neg.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_neg.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_unsigned::{ panic_if_any_block_values_exceeds_its_degree, unsigned_modulus, CpuFunctionExecutor, ExpectedDegrees, ExpectedNoiseLevels, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -15,8 +15,8 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_smart_neg); -create_parametrized_test!(integer_default_neg); +create_parameterized_test!(integer_smart_neg); +create_parameterized_test!(integer_default_neg); fn integer_smart_neg

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_rotate.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_rotate.rs index fe231c26b3..ec252312a2 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_rotate.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_rotate.rs @@ -3,19 +3,19 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ unchecked_rotate_right_test, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::ServerKey; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; -create_parametrized_test!(integer_unchecked_rotate_right); +create_parameterized_test!(integer_unchecked_rotate_right); -create_parametrized_test!(integer_unchecked_rotate_left); +create_parameterized_test!(integer_unchecked_rotate_left); -create_parametrized_test!(integer_rotate_right); +create_parameterized_test!(integer_rotate_right); -create_parametrized_test!(integer_rotate_left); +create_parameterized_test!(integer_rotate_left); fn integer_unchecked_rotate_right

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_add.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_add.rs index 74e48e179d..d81608da25 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_add.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_add.rs @@ -2,15 +2,15 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ default_overflowing_scalar_add_test, default_scalar_add_test, smart_scalar_add_test, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::ServerKey; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; -create_parametrized_test!(integer_smart_scalar_add); -create_parametrized_test!(integer_default_scalar_add); -create_parametrized_test!(integer_default_overflowing_scalar_add); +create_parameterized_test!(integer_smart_scalar_add); +create_parameterized_test!(integer_default_scalar_add); +create_parameterized_test!(integer_default_overflowing_scalar_add); fn integer_smart_scalar_add

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_bitwise_op.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_bitwise_op.rs index bc675b43cc..926d39406f 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_bitwise_op.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_bitwise_op.rs @@ -2,15 +2,15 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ default_scalar_bitand_test, default_scalar_bitor_test, default_scalar_bitxor_test, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::ServerKey; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; -create_parametrized_test!(integer_default_scalar_bitand); -create_parametrized_test!(integer_default_scalar_bitor); -create_parametrized_test!(integer_default_scalar_bitxor); +create_parameterized_test!(integer_default_scalar_bitand); +create_parameterized_test!(integer_default_scalar_bitor); +create_parameterized_test!(integer_default_scalar_bitxor); fn integer_default_scalar_bitand

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_comparison.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_comparison.rs index 3c1628e703..a02b8ff516 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_comparison.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_comparison.rs @@ -4,7 +4,7 @@ use crate::integer::ciphertext::RadixCiphertext; use crate::integer::keycache::KEY_CACHE; use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionExecutor; use crate::integer::server_key::radix_parallel::tests_unsigned::{CpuFunctionExecutor, NB_CTXT}; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{BooleanBlock, IntegerKeyKind, RadixClientKey, ServerKey, I256, U256}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -242,7 +242,7 @@ macro_rules! define_scalar_comparison_test_functions { ) } - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -256,7 +256,7 @@ macro_rules! define_scalar_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -271,7 +271,7 @@ macro_rules! define_scalar_comparison_test_functions { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); - create_parametrized_test!([] + create_parameterized_test!([] { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, @@ -712,38 +712,38 @@ mod no_coverage { test_default_scalar_minmax(params, 2, executor, std::cmp::max::); } - create_parametrized_test!(integer_unchecked_scalar_min_parallelized_u256 { + create_parameterized_test!(integer_unchecked_scalar_min_parallelized_u256 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_unchecked_scalar_max_parallelized_u256 { + create_parameterized_test!(integer_unchecked_scalar_max_parallelized_u256 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_smart_scalar_min_parallelized_u256 { + create_parameterized_test!(integer_smart_scalar_min_parallelized_u256 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_scalar_comparison_test_functions macro PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_smart_scalar_max_parallelized_u256 { + create_parameterized_test!(integer_smart_scalar_max_parallelized_u256 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_scalar_comparison_test_functions macro PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_scalar_min_parallelized_u256 { + create_parameterized_test!(integer_scalar_min_parallelized_u256 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_scalar_comparison_test_functions macro PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_scalar_max_parallelized_u256 { + create_parameterized_test!(integer_scalar_max_parallelized_u256 { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // No test for 3_3, see define_scalar_comparison_test_functions macro @@ -757,14 +757,14 @@ mod no_coverage { define_scalar_comparison_test_functions!(gt, U256); define_scalar_comparison_test_functions!(ge, U256); - create_parametrized_test!(integer_unchecked_scalar_comparisons_edge { + create_parameterized_test!(integer_unchecked_scalar_comparisons_edge { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_is_scalar_out_of_bounds { + create_parameterized_test!(integer_is_scalar_out_of_bounds { PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, // We don't use PARAM_MESSAGE_3_CARRY_3_KS_PBS, // as the test relies on the ciphertext to encrypt 128bits @@ -772,7 +772,7 @@ mod no_coverage { PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64 }); - create_parametrized_test!(integer_comparisons_for_empty_blocks { + create_parameterized_test!(integer_comparisons_for_empty_blocks { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64, @@ -784,7 +784,7 @@ mod no_coverage { #[cfg(tarpaulin)] mod coverage { use super::*; - use crate::integer::tests::create_parametrized_test_classical_params; + use crate::integer::tests::create_parameterized_test_classical_params; fn integer_unchecked_scalar_min_parallelized_u8(params: crate::shortint::ClassicPBSParameters) { let executor = CpuFunctionExecutor::new(&ServerKey::unchecked_scalar_min_parallelized); @@ -816,12 +816,12 @@ mod coverage { test_default_scalar_minmax(params, 1, executor, std::cmp::max::); } - create_parametrized_test_classical_params!(integer_unchecked_scalar_min_parallelized_u8); - create_parametrized_test_classical_params!(integer_unchecked_scalar_max_parallelized_u8); - create_parametrized_test_classical_params!(integer_smart_scalar_min_parallelized_u8); - create_parametrized_test_classical_params!(integer_smart_scalar_max_parallelized_u8); - create_parametrized_test_classical_params!(integer_scalar_min_parallelized_u8); - create_parametrized_test_classical_params!(integer_scalar_max_parallelized_u8); + create_parameterized_test_classical_params!(integer_unchecked_scalar_min_parallelized_u8); + create_parameterized_test_classical_params!(integer_unchecked_scalar_max_parallelized_u8); + create_parameterized_test_classical_params!(integer_smart_scalar_min_parallelized_u8); + create_parameterized_test_classical_params!(integer_smart_scalar_max_parallelized_u8); + create_parameterized_test_classical_params!(integer_scalar_min_parallelized_u8); + create_parameterized_test_classical_params!(integer_scalar_max_parallelized_u8); define_scalar_comparison_test_functions!(eq, u8); define_scalar_comparison_test_functions!(ne, u8); @@ -830,14 +830,14 @@ mod coverage { define_scalar_comparison_test_functions!(gt, u8); define_scalar_comparison_test_functions!(ge, u8); - create_parametrized_test_classical_params!(integer_unchecked_scalar_comparisons_edge); + create_parameterized_test_classical_params!(integer_unchecked_scalar_comparisons_edge); - create_parametrized_test_classical_params!(integer_is_scalar_out_of_bounds); + create_parameterized_test_classical_params!(integer_is_scalar_out_of_bounds); - create_parametrized_test_classical_params!(integer_comparisons_for_empty_blocks); + create_parameterized_test_classical_params!(integer_comparisons_for_empty_blocks); } -create_parametrized_test!(integer_extensive_trivial_default_scalar_comparisons); +create_parameterized_test!(integer_extensive_trivial_default_scalar_comparisons); fn integer_extensive_trivial_default_scalar_comparisons(params: impl Into) { let lt_executor = CpuFunctionExecutor::new(&ServerKey::scalar_lt_parallelized); diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_div_mod.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_div_mod.rs index 2e7e17bb76..4f985d2310 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_div_mod.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_div_mod.rs @@ -4,7 +4,7 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::FunctionEx use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -12,7 +12,7 @@ use crate::shortint::parameters::*; use rand::prelude::*; use std::sync::Arc; -create_parametrized_test!(integer_default_scalar_div_rem); +create_parameterized_test!(integer_default_scalar_div_rem); fn integer_default_scalar_div_rem

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_mul.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_mul.rs index 7f9bab3d99..63efdd0ac0 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_mul.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_mul.rs @@ -3,13 +3,13 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ smart_scalar_mul_u128_fix_non_reg_test, unchecked_scalar_mul_corner_cases_test, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::ServerKey; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; -create_parametrized_test!( +create_parameterized_test!( integer_smart_scalar_mul_u128_fix_non_reg_test { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -20,8 +20,8 @@ create_parametrized_test!( } } ); -create_parametrized_test!(integer_unchecked_scalar_mul_corner_cases); -create_parametrized_test!( +create_parameterized_test!(integer_unchecked_scalar_mul_corner_cases); +create_parameterized_test!( integer_default_scalar_mul_u128_fix_non_reg_test { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -31,8 +31,8 @@ create_parametrized_test!( } } ); -create_parametrized_test!(integer_smart_scalar_mul); -create_parametrized_test!(integer_default_scalar_mul); +create_parameterized_test!(integer_smart_scalar_mul); +create_parameterized_test!(integer_default_scalar_mul); fn integer_unchecked_scalar_mul_corner_cases

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_rotate.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_rotate.rs index 6cc37c7cc6..1b99a7342e 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_rotate.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_rotate.rs @@ -3,7 +3,7 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{FunctionE use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_for_params, rotate_left_helper, rotate_right_helper, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -11,10 +11,10 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_unchecked_scalar_rotate_left); -create_parametrized_test!(integer_default_scalar_rotate_left); -create_parametrized_test!(integer_unchecked_scalar_rotate_right); -create_parametrized_test!(integer_default_scalar_rotate_right); +create_parameterized_test!(integer_unchecked_scalar_rotate_left); +create_parameterized_test!(integer_default_scalar_rotate_left); +create_parameterized_test!(integer_unchecked_scalar_rotate_right); +create_parameterized_test!(integer_default_scalar_rotate_right); fn integer_default_scalar_rotate_left

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_shift.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_shift.rs index 03dc699277..f5d2509440 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_shift.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_shift.rs @@ -3,16 +3,16 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ unchecked_scalar_left_shift_test, unchecked_scalar_right_shift_test, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::ServerKey; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; -create_parametrized_test!(integer_unchecked_scalar_left_shift); -create_parametrized_test!(integer_default_scalar_left_shift); -create_parametrized_test!(integer_unchecked_scalar_right_shift); -create_parametrized_test!(integer_default_scalar_right_shift); +create_parameterized_test!(integer_unchecked_scalar_left_shift); +create_parameterized_test!(integer_default_scalar_left_shift); +create_parameterized_test!(integer_unchecked_scalar_right_shift); +create_parameterized_test!(integer_default_scalar_right_shift); fn integer_default_scalar_left_shift

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_sub.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_sub.rs index 0e2b69d9c8..bb5944226c 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_sub.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_scalar_sub.rs @@ -2,15 +2,15 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ default_overflowing_scalar_sub_test, default_scalar_sub_test, smart_scalar_sub_test, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::ServerKey; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; -create_parametrized_test!(integer_smart_scalar_sub); -create_parametrized_test!(integer_default_scalar_sub); -create_parametrized_test!(integer_default_overflowing_scalar_sub); +create_parameterized_test!(integer_smart_scalar_sub); +create_parameterized_test!(integer_default_scalar_sub); +create_parameterized_test!(integer_default_overflowing_scalar_sub); fn integer_smart_scalar_sub

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_shift.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_shift.rs index 56481364da..d583bfe203 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_shift.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_shift.rs @@ -3,17 +3,17 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{ unchecked_right_shift_test, }; use crate::integer::server_key::radix_parallel::tests_unsigned::CpuFunctionExecutor; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::ServerKey; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; -create_parametrized_test!(integer_unchecked_left_shift); +create_parameterized_test!(integer_unchecked_left_shift); -create_parametrized_test!(integer_unchecked_right_shift); -create_parametrized_test!(integer_left_shift); -create_parametrized_test!(integer_right_shift); +create_parameterized_test!(integer_unchecked_right_shift); +create_parameterized_test!(integer_left_shift); +create_parameterized_test!(integer_right_shift); fn integer_unchecked_right_shift

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_slice.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_slice.rs index 6cb79e71b3..3eb5b265fa 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_slice.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_slice.rs @@ -9,7 +9,7 @@ use crate::integer::server_key::radix::slice::normalize_range; use crate::integer::server_key::radix_parallel::tests_unsigned::{ overflowing_add_under_modulus, random_non_zero_value, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; use crate::prelude::CastFrom; #[cfg(tarpaulin)] @@ -18,12 +18,12 @@ use crate::shortint::parameters::*; use super::{nb_tests_for_params, CpuFunctionExecutor, FunctionExecutor, PBSParameters, NB_CTXT}; -create_parametrized_test!(integer_unchecked_scalar_slice); -create_parametrized_test!(integer_unchecked_scalar_slice_assign); -create_parametrized_test!(integer_default_scalar_slice); -create_parametrized_test!(integer_default_scalar_slice_assign); -create_parametrized_test!(integer_smart_scalar_slice); -create_parametrized_test!(integer_smart_scalar_slice_assign); +create_parameterized_test!(integer_unchecked_scalar_slice); +create_parameterized_test!(integer_unchecked_scalar_slice_assign); +create_parameterized_test!(integer_default_scalar_slice); +create_parameterized_test!(integer_default_scalar_slice_assign); +create_parameterized_test!(integer_smart_scalar_slice); +create_parameterized_test!(integer_smart_scalar_slice_assign); // Reference implementation of the slice fn slice_reference_impl(value: u64, range: R, modulus: u64) -> u64 diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sub.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sub.rs index 539b192c34..d61306a745 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sub.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sub.rs @@ -7,7 +7,7 @@ use crate::integer::server_key::radix_parallel::tests_unsigned::{ panic_if_any_block_values_exceeds_its_degree, random_non_zero_value, unsigned_modulus, unsigned_modulus_u128, CpuFunctionExecutor, ExpectedDegrees, ExpectedNoiseLevels, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{BooleanBlock, IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -17,13 +17,13 @@ use std::sync::Arc; use super::MAX_NB_CTXT; -create_parametrized_test!(integer_unchecked_sub); -create_parametrized_test!(integer_smart_sub); -create_parametrized_test!(integer_default_sub); -create_parametrized_test!(integer_extensive_trivial_default_sub); -create_parametrized_test!(integer_default_overflowing_sub); -create_parametrized_test!(integer_extensive_trivial_default_overflowing_sub); -create_parametrized_test!(integer_advanced_sub_assign_with_borrow_at_least_4_bits { +create_parameterized_test!(integer_unchecked_sub); +create_parameterized_test!(integer_smart_sub); +create_parameterized_test!(integer_default_sub); +create_parameterized_test!(integer_extensive_trivial_default_sub); +create_parameterized_test!(integer_default_overflowing_sub); +create_parameterized_test!(integer_extensive_trivial_default_overflowing_sub); +create_parameterized_test!(integer_advanced_sub_assign_with_borrow_at_least_4_bits { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, COVERAGE_PARAM_MULTI_BIT_MESSAGE_2_CARRY_2_GROUP_2_KS_PBS @@ -38,7 +38,7 @@ create_parametrized_test!(integer_advanced_sub_assign_with_borrow_at_least_4_bit PARAM_MULTI_BIT_GROUP_3_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64 } }); -create_parametrized_test!(integer_advanced_sub_assign_with_borrow_sequential); +create_parameterized_test!(integer_advanced_sub_assign_with_borrow_sequential); fn integer_unchecked_sub

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sum.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sum.rs index 8c5ebcc003..efac6dc093 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sum.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_sum.rs @@ -3,7 +3,7 @@ use crate::integer::server_key::radix_parallel::tests_cases_unsigned::{FunctionE use crate::integer::server_key::radix_parallel::tests_unsigned::{ nb_tests_smaller_for_params, overflowing_sum_slice_under_modulus, CpuFunctionExecutor, }; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use crate::integer::{IntegerKeyKind, RadixCiphertext, RadixClientKey, ServerKey}; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; @@ -11,9 +11,9 @@ use crate::shortint::parameters::*; use rand::Rng; use std::sync::Arc; -create_parametrized_test!(integer_smart_sum_ciphertexts_slice); -create_parametrized_test!(integer_default_unsigned_overflowing_sum_ciphertexts_vec); -create_parametrized_test!(integer_default_sum_ciphertexts_vec); +create_parameterized_test!(integer_smart_sum_ciphertexts_slice); +create_parameterized_test!(integer_default_unsigned_overflowing_sum_ciphertexts_vec); +create_parameterized_test!(integer_default_sum_ciphertexts_vec); fn integer_default_unsigned_overflowing_sum_ciphertexts_vec

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_vector_comparisons.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_vector_comparisons.rs index cf31d03248..debd4cc21a 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_vector_comparisons.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_vector_comparisons.rs @@ -14,13 +14,13 @@ use std::sync::Arc; use crate::core_crypto::prelude::Numeric; use crate::integer::block_decomposition::DecomposableInto; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use rand::prelude::*; -create_parametrized_test!(integer_unchecked_all_eq_slices_test_case); -create_parametrized_test!(integer_default_all_eq_slices_test_case); +create_parameterized_test!(integer_unchecked_all_eq_slices_test_case); +create_parameterized_test!(integer_default_all_eq_slices_test_case); -create_parametrized_test!(integer_unchecked_contains_slice_test_case); +create_parameterized_test!(integer_unchecked_contains_slice_test_case); fn integer_unchecked_all_eq_slices_test_case

(param: P) where diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_vector_find.rs b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_vector_find.rs index 0ee8b344f3..725aa4655a 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_vector_find.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_unsigned/test_vector_find.rs @@ -10,36 +10,36 @@ use super::{ ExpectedDegrees, ExpectedNoiseLevels, MAX_VEC_LEN, NB_CTXT, }; use crate::integer::server_key::MatchValues; -use crate::integer::tests::create_parametrized_test; +use crate::integer::tests::create_parameterized_test; use rand::prelude::*; #[cfg(tarpaulin)] use crate::shortint::parameters::coverage_parameters::*; use crate::shortint::parameters::*; -create_parametrized_test!(integer_unchecked_match_value); -create_parametrized_test!(integer_unchecked_match_value_or); -create_parametrized_test!(integer_unchecked_contains); -create_parametrized_test!(integer_unchecked_contains_clear); -create_parametrized_test!(integer_unchecked_is_in_clears); -create_parametrized_test!(integer_unchecked_index_in_clears); -create_parametrized_test!(integer_unchecked_first_index_in_clears); -create_parametrized_test!(integer_unchecked_index_of); -create_parametrized_test!(integer_unchecked_index_of_clear); -create_parametrized_test!(integer_unchecked_first_index_of); -create_parametrized_test!(integer_unchecked_first_index_of_clear); - -create_parametrized_test!(integer_default_match_value); -create_parametrized_test!(integer_default_match_value_or); -create_parametrized_test!(integer_default_contains); -create_parametrized_test!(integer_default_contains_clear); -create_parametrized_test!(integer_default_is_in_clears); -create_parametrized_test!(integer_default_index_in_clears); -create_parametrized_test!(integer_default_first_index_in_clears); -create_parametrized_test!(integer_default_index_of); -create_parametrized_test!(integer_default_index_of_clear); -create_parametrized_test!(integer_default_first_index_of); -create_parametrized_test!(integer_default_first_index_of_clear); +create_parameterized_test!(integer_unchecked_match_value); +create_parameterized_test!(integer_unchecked_match_value_or); +create_parameterized_test!(integer_unchecked_contains); +create_parameterized_test!(integer_unchecked_contains_clear); +create_parameterized_test!(integer_unchecked_is_in_clears); +create_parameterized_test!(integer_unchecked_index_in_clears); +create_parameterized_test!(integer_unchecked_first_index_in_clears); +create_parameterized_test!(integer_unchecked_index_of); +create_parameterized_test!(integer_unchecked_index_of_clear); +create_parameterized_test!(integer_unchecked_first_index_of); +create_parameterized_test!(integer_unchecked_first_index_of_clear); + +create_parameterized_test!(integer_default_match_value); +create_parameterized_test!(integer_default_match_value_or); +create_parameterized_test!(integer_default_contains); +create_parameterized_test!(integer_default_contains_clear); +create_parameterized_test!(integer_default_is_in_clears); +create_parameterized_test!(integer_default_index_in_clears); +create_parameterized_test!(integer_default_first_index_in_clears); +create_parameterized_test!(integer_default_index_of); +create_parameterized_test!(integer_default_index_of_clear); +create_parameterized_test!(integer_default_first_index_of); +create_parameterized_test!(integer_default_first_index_of_clear); fn integer_unchecked_match_value

(param: P) where diff --git a/tfhe/src/integer/tests.rs b/tfhe/src/integer/tests.rs index b30fa4f6fe..e11e7a6330 100644 --- a/tfhe/src/integer/tests.rs +++ b/tfhe/src/integer/tests.rs @@ -1,4 +1,4 @@ -macro_rules! create_parametrized_test { +macro_rules! create_parameterized_test { ( $name:ident { $($(#[$cfg:meta])* $param:ident),* @@ -16,7 +16,7 @@ macro_rules! create_parametrized_test { } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -56,11 +56,11 @@ macro_rules! create_parametrized_test { } }; } -macro_rules! create_parametrized_test_classical_params { +macro_rules! create_parameterized_test_classical_params { ( $name:ident ) => { - $crate::integer::tests::create_parametrized_test!($name { + $crate::integer::tests::create_parameterized_test!($name { coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS }, @@ -73,4 +73,4 @@ macro_rules! create_parametrized_test_classical_params { }); }; } -pub(crate) use {create_parametrized_test, create_parametrized_test_classical_params}; +pub(crate) use {create_parameterized_test, create_parameterized_test_classical_params}; diff --git a/tfhe/src/integer/wopbs/test.rs b/tfhe/src/integer/wopbs/test.rs index 86ab2d1c88..4a864def72 100644 --- a/tfhe/src/integer/wopbs/test.rs +++ b/tfhe/src/integer/wopbs/test.rs @@ -19,7 +19,7 @@ const NB_TESTS: usize = 10; #[cfg(tarpaulin)] const NB_TESTS: usize = 1; -macro_rules! create_parametrized_test{ ( +macro_rules! create_parameterized_test{ ( $name:ident { $($(#[$cfg:meta])* ($sks_param:ident, $wopbs_param:ident)),* $(,)? @@ -36,7 +36,7 @@ macro_rules! create_parametrized_test{ ( } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { (PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS), #[cfg(not(tarpaulin))] @@ -47,11 +47,11 @@ macro_rules! create_parametrized_test{ ( }; } -create_parametrized_test!(wopbs_crt); -create_parametrized_test!(wopbs_crt_non_reg); -create_parametrized_test!(wopbs_bivariate_radix); -create_parametrized_test!(wopbs_bivariate_crt); -create_parametrized_test!(wopbs_radix); +create_parameterized_test!(wopbs_crt); +create_parameterized_test!(wopbs_crt_non_reg); +create_parameterized_test!(wopbs_bivariate_radix); +create_parameterized_test!(wopbs_bivariate_crt); +create_parameterized_test!(wopbs_radix); // test wopbs fake crt with different degree for each Ct pub fn wopbs_crt(params: (ClassicPBSParameters, WopbsParameters)) { diff --git a/tfhe/src/shortint/server_key/tests/mod.rs b/tfhe/src/shortint/server_key/tests/mod.rs index d814d27dc7..d4522535c7 100644 --- a/tfhe/src/shortint/server_key/tests/mod.rs +++ b/tfhe/src/shortint/server_key/tests/mod.rs @@ -1,7 +1,7 @@ pub mod modulus_switch_compression; pub mod noise_level; -pub mod parametrized_test; -pub mod parametrized_test_bivariate_pbs_compliant; +pub mod parameterized_test; +pub mod parameterized_test_bivariate_pbs_compliant; pub mod shortint_compact_pk; /// Number of assert in randomized tests diff --git a/tfhe/src/shortint/server_key/tests/modulus_switch_compression.rs b/tfhe/src/shortint/server_key/tests/modulus_switch_compression.rs index 4f4a2832eb..0bdcb437e0 100644 --- a/tfhe/src/shortint/server_key/tests/modulus_switch_compression.rs +++ b/tfhe/src/shortint/server_key/tests/modulus_switch_compression.rs @@ -1,12 +1,12 @@ use super::NB_TESTS; use crate::shortint::keycache::KEY_CACHE; use crate::shortint::parameters::*; -use crate::shortint::server_key::tests::parametrized_test::create_parametrized_test; +use crate::shortint::server_key::tests::parameterized_test::create_parameterized_test; use rand::Rng; // Remove multi bit PBS parameters as // modulus switch compression and multi bit PBS are currently not compatible -create_parametrized_test!(shortint_modulus_switch_compression); +create_parameterized_test!(shortint_modulus_switch_compression); fn shortint_modulus_switch_compression

(param: P) where diff --git a/tfhe/src/shortint/server_key/tests/parametrized_test.rs b/tfhe/src/shortint/server_key/tests/parameterized_test.rs similarity index 94% rename from tfhe/src/shortint/server_key/tests/parametrized_test.rs rename to tfhe/src/shortint/server_key/tests/parameterized_test.rs index 4274876a9f..094f97f146 100644 --- a/tfhe/src/shortint/server_key/tests/parametrized_test.rs +++ b/tfhe/src/shortint/server_key/tests/parameterized_test.rs @@ -6,7 +6,7 @@ use rand::Rng; // Macro to generate tests for all parameter sets #[cfg(not(tarpaulin))] -macro_rules! create_parametrized_test{ +macro_rules! create_parameterized_test{ ($name:ident { $($param:ident),* }) => { ::paste::paste! { $( @@ -18,7 +18,7 @@ macro_rules! create_parametrized_test{ } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, @@ -60,7 +60,7 @@ macro_rules! create_parametrized_test{ // Test against a small subset of parameters to speed up coverage tests #[cfg(tarpaulin)] -macro_rules! create_parametrized_test{ +macro_rules! create_parameterized_test{ ($name:ident { $($param:ident),* }) => { ::paste::paste! { $( @@ -72,7 +72,7 @@ macro_rules! create_parametrized_test{ } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, @@ -81,59 +81,59 @@ macro_rules! create_parametrized_test{ }; } -pub(crate) use create_parametrized_test; +pub(crate) use create_parameterized_test; //These functions are compatible with all parameter sets. -create_parametrized_test!(shortint_encrypt_decrypt); -create_parametrized_test!(shortint_encrypt_with_message_modulus_decrypt); -create_parametrized_test!(shortint_encrypt_decrypt_without_padding); -create_parametrized_test!(shortint_keyswitch_bootstrap); -create_parametrized_test!(shortint_keyswitch_programmable_bootstrap); -create_parametrized_test!(shortint_keyswitch_programmable_bootstrap_many_lut); -create_parametrized_test!(shortint_carry_extract); -create_parametrized_test!(shortint_message_extract); -create_parametrized_test!(shortint_generate_lookup_table); -create_parametrized_test!(shortint_unchecked_add); -create_parametrized_test!(shortint_smart_add); -create_parametrized_test!(shortint_default_add); -create_parametrized_test!(shortint_smart_mul_lsb); -create_parametrized_test!(shortint_default_mul_lsb); -create_parametrized_test!(shortint_unchecked_neg); -create_parametrized_test!(shortint_smart_neg); -create_parametrized_test!(shortint_default_neg); -create_parametrized_test!(shortint_unchecked_scalar_add); -create_parametrized_test!(shortint_smart_scalar_add); -create_parametrized_test!(shortint_default_scalar_add); -create_parametrized_test!(shortint_unchecked_scalar_sub); -create_parametrized_test!(shortint_smart_scalar_sub); -create_parametrized_test!(shortint_default_scalar_sub); -create_parametrized_test!(shortint_unchecked_scalar_mul); -create_parametrized_test!(shortint_smart_scalar_mul); -create_parametrized_test!(shortint_default_scalar_mul); -create_parametrized_test!(shortint_unchecked_right_shift); -create_parametrized_test!(shortint_default_right_shift); -create_parametrized_test!(shortint_unchecked_left_shift); -create_parametrized_test!(shortint_default_left_shift); -create_parametrized_test!(shortint_unchecked_sub); -create_parametrized_test!(shortint_smart_sub); -create_parametrized_test!(shortint_default_sub); -create_parametrized_test!(shortint_mul_small_carry); -create_parametrized_test!(shortint_mux); -create_parametrized_test!(shortint_unchecked_scalar_bitand); -create_parametrized_test!(shortint_unchecked_scalar_bitor); -create_parametrized_test!(shortint_unchecked_scalar_bitxor); -create_parametrized_test!(shortint_smart_scalar_bitand); -create_parametrized_test!(shortint_smart_scalar_bitor); -create_parametrized_test!(shortint_smart_scalar_bitxor); -create_parametrized_test!(shortint_default_scalar_bitand); -create_parametrized_test!(shortint_default_scalar_bitor); -create_parametrized_test!(shortint_default_scalar_bitxor); -create_parametrized_test!(shortint_trivial_pbs); -create_parametrized_test!(shortint_trivial_pbs_many_lut); -create_parametrized_test!( +create_parameterized_test!(shortint_encrypt_decrypt); +create_parameterized_test!(shortint_encrypt_with_message_modulus_decrypt); +create_parameterized_test!(shortint_encrypt_decrypt_without_padding); +create_parameterized_test!(shortint_keyswitch_bootstrap); +create_parameterized_test!(shortint_keyswitch_programmable_bootstrap); +create_parameterized_test!(shortint_keyswitch_programmable_bootstrap_many_lut); +create_parameterized_test!(shortint_carry_extract); +create_parameterized_test!(shortint_message_extract); +create_parameterized_test!(shortint_generate_lookup_table); +create_parameterized_test!(shortint_unchecked_add); +create_parameterized_test!(shortint_smart_add); +create_parameterized_test!(shortint_default_add); +create_parameterized_test!(shortint_smart_mul_lsb); +create_parameterized_test!(shortint_default_mul_lsb); +create_parameterized_test!(shortint_unchecked_neg); +create_parameterized_test!(shortint_smart_neg); +create_parameterized_test!(shortint_default_neg); +create_parameterized_test!(shortint_unchecked_scalar_add); +create_parameterized_test!(shortint_smart_scalar_add); +create_parameterized_test!(shortint_default_scalar_add); +create_parameterized_test!(shortint_unchecked_scalar_sub); +create_parameterized_test!(shortint_smart_scalar_sub); +create_parameterized_test!(shortint_default_scalar_sub); +create_parameterized_test!(shortint_unchecked_scalar_mul); +create_parameterized_test!(shortint_smart_scalar_mul); +create_parameterized_test!(shortint_default_scalar_mul); +create_parameterized_test!(shortint_unchecked_right_shift); +create_parameterized_test!(shortint_default_right_shift); +create_parameterized_test!(shortint_unchecked_left_shift); +create_parameterized_test!(shortint_default_left_shift); +create_parameterized_test!(shortint_unchecked_sub); +create_parameterized_test!(shortint_smart_sub); +create_parameterized_test!(shortint_default_sub); +create_parameterized_test!(shortint_mul_small_carry); +create_parameterized_test!(shortint_mux); +create_parameterized_test!(shortint_unchecked_scalar_bitand); +create_parameterized_test!(shortint_unchecked_scalar_bitor); +create_parameterized_test!(shortint_unchecked_scalar_bitxor); +create_parameterized_test!(shortint_smart_scalar_bitand); +create_parameterized_test!(shortint_smart_scalar_bitor); +create_parameterized_test!(shortint_smart_scalar_bitxor); +create_parameterized_test!(shortint_default_scalar_bitand); +create_parameterized_test!(shortint_default_scalar_bitor); +create_parameterized_test!(shortint_default_scalar_bitxor); +create_parameterized_test!(shortint_trivial_pbs); +create_parameterized_test!(shortint_trivial_pbs_many_lut); +create_parameterized_test!( shortint_encrypt_with_message_modulus_unchecked_mul_lsb_small_carry_and_add ); -create_parametrized_test!( +create_parameterized_test!( shortint_encrypt_with_message_and_carry_modulus_unchecked_mul_lsb_small_carry_and_add ); diff --git a/tfhe/src/shortint/server_key/tests/parametrized_test_bivariate_pbs_compliant.rs b/tfhe/src/shortint/server_key/tests/parameterized_test_bivariate_pbs_compliant.rs similarity index 92% rename from tfhe/src/shortint/server_key/tests/parametrized_test_bivariate_pbs_compliant.rs rename to tfhe/src/shortint/server_key/tests/parameterized_test_bivariate_pbs_compliant.rs index 28b020e824..8cb9b26f2a 100644 --- a/tfhe/src/shortint/server_key/tests/parametrized_test_bivariate_pbs_compliant.rs +++ b/tfhe/src/shortint/server_key/tests/parameterized_test_bivariate_pbs_compliant.rs @@ -1,6 +1,6 @@ use crate::shortint::keycache::KEY_CACHE; use crate::shortint::parameters::*; -use crate::shortint::server_key::tests::parametrized_test::create_parametrized_test; +use crate::shortint::server_key::tests::parameterized_test::create_parameterized_test; use rand::Rng; /// Number of assert in randomized tests @@ -27,7 +27,7 @@ const NB_SUB_TEST_SMART: usize = 5; //Macro to generate tests for parameters sets compatible with the bivariate pbs #[cfg(not(tarpaulin))] -macro_rules! create_parametrized_test_bivariate_pbs_compliant{ +macro_rules! create_parameterized_test_bivariate_pbs_compliant{ ($name:ident { $($param:ident),* }) => { ::paste::paste! { $( @@ -39,7 +39,7 @@ macro_rules! create_parametrized_test_bivariate_pbs_compliant{ } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64, @@ -69,7 +69,7 @@ macro_rules! create_parametrized_test_bivariate_pbs_compliant{ // Test against a small subset of parameters to speed up coverage tests #[cfg(tarpaulin)] -macro_rules! create_parametrized_test_bivariate_pbs_compliant{ +macro_rules! create_parameterized_test_bivariate_pbs_compliant{ ($name:ident { $($param:ident),* }) => { ::paste::paste! { $( @@ -81,7 +81,7 @@ macro_rules! create_parametrized_test_bivariate_pbs_compliant{ } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, PARAM_MULTI_BIT_GROUP_2_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, @@ -113,46 +113,46 @@ fn test_shortint_public_key_smart_add_param_message_2_carry_2_ks_pbs() { //These functions are compatible with some parameter sets where the carry modulus is larger than // the message modulus. -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_bitand); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_bitor); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_bitxor); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_greater); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_greater_or_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_less); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_less_or_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_bitand); -create_parametrized_test_bivariate_pbs_compliant!(shortint_default_bitand); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_bitor); -create_parametrized_test_bivariate_pbs_compliant!(shortint_default_bitor); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_bitxor); -create_parametrized_test_bivariate_pbs_compliant!(shortint_default_bitxor); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_greater); -create_parametrized_test_bivariate_pbs_compliant!(shortint_default_greater); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_greater_or_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_default_greater_or_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_less); -create_parametrized_test_bivariate_pbs_compliant!(shortint_default_less); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_less_or_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_default_less_or_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_default_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_scalar_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_scalar_less); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_scalar_less_or_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_scalar_greater); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_scalar_greater_or_equal); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_div); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_scalar_div); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_mod); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_mul_lsb); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_mul_msb); -create_parametrized_test_bivariate_pbs_compliant!(shortint_smart_mul_msb); -create_parametrized_test_bivariate_pbs_compliant!(shortint_default_mul_msb); -create_parametrized_test_bivariate_pbs_compliant!( +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_bitand); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_bitor); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_bitxor); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_greater); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_greater_or_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_less); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_less_or_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_bitand); +create_parameterized_test_bivariate_pbs_compliant!(shortint_default_bitand); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_bitor); +create_parameterized_test_bivariate_pbs_compliant!(shortint_default_bitor); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_bitxor); +create_parameterized_test_bivariate_pbs_compliant!(shortint_default_bitxor); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_greater); +create_parameterized_test_bivariate_pbs_compliant!(shortint_default_greater); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_greater_or_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_default_greater_or_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_less); +create_parameterized_test_bivariate_pbs_compliant!(shortint_default_less); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_less_or_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_default_less_or_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_default_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_scalar_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_scalar_less); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_scalar_less_or_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_scalar_greater); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_scalar_greater_or_equal); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_div); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_scalar_div); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_mod); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_mul_lsb); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_mul_msb); +create_parameterized_test_bivariate_pbs_compliant!(shortint_smart_mul_msb); +create_parameterized_test_bivariate_pbs_compliant!(shortint_default_mul_msb); +create_parameterized_test_bivariate_pbs_compliant!( shortint_keyswitch_bivariate_programmable_bootstrap ); -create_parametrized_test_bivariate_pbs_compliant!(shortint_unchecked_less_or_equal_trivial); +create_parameterized_test_bivariate_pbs_compliant!(shortint_unchecked_less_or_equal_trivial); fn shortint_keyswitch_bivariate_programmable_bootstrap

(param: P) where diff --git a/tfhe/src/shortint/server_key/tests/shortint_compact_pk.rs b/tfhe/src/shortint/server_key/tests/shortint_compact_pk.rs index dcb88dbabb..5989a305dd 100644 --- a/tfhe/src/shortint/server_key/tests/shortint_compact_pk.rs +++ b/tfhe/src/shortint/server_key/tests/shortint_compact_pk.rs @@ -21,7 +21,7 @@ const NB_SUB_TEST: usize = 5; // Macro to generate tests for all parameter sets #[cfg(not(tarpaulin))] -macro_rules! create_parametrized_test{ +macro_rules! create_parameterized_test{ ($name:ident { $($param:ident),* }) => { ::paste::paste! { $( @@ -33,7 +33,7 @@ macro_rules! create_parametrized_test{ } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS, PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS, @@ -73,7 +73,7 @@ macro_rules! create_parametrized_test{ // Test against a small subset of parameters to speed up coverage tests #[cfg(tarpaulin)] -macro_rules! create_parametrized_test{ +macro_rules! create_parameterized_test{ ($name:ident { $($param:ident),* }) => { ::paste::paste! { $( @@ -85,7 +85,7 @@ macro_rules! create_parametrized_test{ } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS, PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS @@ -93,7 +93,7 @@ macro_rules! create_parametrized_test{ }; } -create_parametrized_test!(shortint_compact_public_key_base_smart_add); +create_parameterized_test!(shortint_compact_public_key_base_smart_add); fn shortint_compact_public_key_base_smart_add(params: ClassicPBSParameters) { let keys = KEY_CACHE.get_from_param(params); @@ -147,7 +147,7 @@ fn shortint_compact_public_key_base_smart_add(params: ClassicPBSParameters) { } } -create_parametrized_test!(shortint_compact_public_key_base_list_smart_sub); +create_parameterized_test!(shortint_compact_public_key_base_list_smart_sub); fn shortint_compact_public_key_base_list_smart_sub(params: ClassicPBSParameters) { let keys = KEY_CACHE.get_from_param(params); diff --git a/tfhe/src/shortint/wopbs/test.rs b/tfhe/src/shortint/wopbs/test.rs index d059196e44..352a5e34e2 100644 --- a/tfhe/src/shortint/wopbs/test.rs +++ b/tfhe/src/shortint/wopbs/test.rs @@ -12,7 +12,7 @@ use rand::Rng; const NB_TESTS: usize = 1; #[cfg(not(tarpaulin))] -macro_rules! create_parametrized_test{ +macro_rules! create_parameterized_test{ ($name:ident { $( ($sks_param:ident, $wopbs_param:ident) ),* }) => { ::paste::paste! { $( @@ -24,7 +24,7 @@ macro_rules! create_parametrized_test{ } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { (PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS), (PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS), @@ -35,7 +35,7 @@ macro_rules! create_parametrized_test{ } #[cfg(not(tarpaulin))] -macro_rules! create_parametrized_wopbs_only_test{ +macro_rules! create_parameterized_wopbs_only_test{ ($name:ident { $( $wopbs_param:ident ),* }) => { ::paste::paste! { $( @@ -47,7 +47,7 @@ macro_rules! create_parametrized_wopbs_only_test{ } }; ($name:ident)=> { - create_parametrized_wopbs_only_test!($name + create_parameterized_wopbs_only_test!($name { WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -59,7 +59,7 @@ macro_rules! create_parametrized_wopbs_only_test{ // Test against a small subset of parameters to speed up coverage tests #[cfg(tarpaulin)] -macro_rules! create_parametrized_test{ +macro_rules! create_parameterized_test{ ($name:ident { $( ($sks_param:ident, $wopbs_param:ident) ),* }) => { ::paste::paste! { $( @@ -71,7 +71,7 @@ macro_rules! create_parametrized_test{ } }; ($name:ident)=> { - create_parametrized_test!($name + create_parameterized_test!($name { (PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64, WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS) }); @@ -79,7 +79,7 @@ macro_rules! create_parametrized_test{ } #[cfg(tarpaulin)] -macro_rules! create_parametrized_wopbs_only_test{ +macro_rules! create_parameterized_wopbs_only_test{ ($name:ident { $( $wopbs_param:ident ),* }) => { ::paste::paste! { $( @@ -91,19 +91,19 @@ macro_rules! create_parametrized_wopbs_only_test{ } }; ($name:ident)=> { - create_parametrized_wopbs_only_test!($name + create_parameterized_wopbs_only_test!($name { WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS }); }; } -create_parametrized_test!(generate_lut); -create_parametrized_test!(generate_lut_modulus); +create_parameterized_test!(generate_lut); +create_parameterized_test!(generate_lut_modulus); #[cfg(not(tarpaulin))] -create_parametrized_wopbs_only_test!(generate_lut_modulus_not_power_of_two); +create_parameterized_wopbs_only_test!(generate_lut_modulus_not_power_of_two); #[cfg(not(tarpaulin))] -create_parametrized_wopbs_only_test!(generate_lut_wop_only { +create_parameterized_wopbs_only_test!(generate_lut_wop_only { WOPBS_ONLY_8_BLOCKS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, WOPBS_ONLY_4_BLOCKS_PARAM_MESSAGE_2_CARRY_2_KS_PBS, WOPBS_ONLY_2_BLOCKS_PARAM_MESSAGE_3_CARRY_3_KS_PBS,