diff --git a/tfhe/benches/integer/bench.rs b/tfhe/benches/integer/bench.rs index abb7d8581a..59e1bf7010 100644 --- a/tfhe/benches/integer/bench.rs +++ b/tfhe/benches/integer/bench.rs @@ -607,7 +607,7 @@ macro_rules! define_server_key_bench_unary_fn ( concat!("integer::", stringify!($server_key_method)), stringify!($name), |server_key, lhs| { - server_key.$server_key_method(lhs); + server_key.$server_key_method(lhs); }) } } @@ -621,54 +621,55 @@ macro_rules! define_server_key_bench_unary_default_fn ( concat!("integer::", stringify!($server_key_method)), stringify!($name), |server_key, lhs| { - server_key.$server_key_method(lhs); + server_key.$server_key_method(lhs); }) } } ); macro_rules! define_server_key_bench_fn ( - (method_name: $server_key_method:ident, display_name:$name:ident) => { - fn $server_key_method(c: &mut Criterion) { - bench_server_key_binary_function_dirty_inputs( - c, - concat!("integer::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs| { - server_key.$server_key_method(lhs, rhs); - }) - } - } + (method_name: $server_key_method:ident, display_name:$name:ident) => { + fn $server_key_method(c: &mut Criterion) { + bench_server_key_binary_function_dirty_inputs( + c, + concat!("integer::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs| { + server_key.$server_key_method(lhs, rhs); + } + ) + } + } ); macro_rules! define_server_key_bench_default_fn ( (method_name: $server_key_method:ident, display_name:$name:ident) => { fn $server_key_method(c: &mut Criterion) { - bench_server_key_binary_function_clean_inputs( + bench_server_key_binary_function_clean_inputs( c, concat!("integer::", stringify!($server_key_method)), stringify!($name), |server_key, lhs, rhs| { - server_key.$server_key_method(lhs, rhs); + server_key.$server_key_method(lhs, rhs); }) } } - ); +); macro_rules! define_server_key_bench_scalar_fn ( (method_name: $server_key_method:ident, display_name:$name:ident, rng_func:$($rng_fn:tt)*) => { - fn $server_key_method(c: &mut Criterion) { - bench_server_key_binary_scalar_function_dirty_inputs( - c, - concat!("integer::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs| { - server_key.$server_key_method(lhs, rhs); - }, - $($rng_fn)* - ) - } - } + fn $server_key_method(c: &mut Criterion) { + bench_server_key_binary_scalar_function_dirty_inputs( + c, + concat!("integer::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs| { + server_key.$server_key_method(lhs, rhs); + }, + $($rng_fn)* + ) + } + } ); macro_rules! define_server_key_bench_scalar_default_fn ( @@ -679,13 +680,13 @@ macro_rules! define_server_key_bench_scalar_default_fn ( concat!("integer::", stringify!($server_key_method)), stringify!($name), |server_key, lhs, rhs| { - server_key.$server_key_method(lhs, rhs); + server_key.$server_key_method(lhs, rhs); }, $($rng_fn)* ) } } - ); +); define_server_key_bench_fn!(method_name: smart_add, display_name: add); define_server_key_bench_fn!(method_name: smart_sub, display_name: sub); @@ -1482,43 +1483,42 @@ mod cuda { ) } } - } - ); + }); macro_rules! define_cuda_server_key_bench_clean_input_fn ( - (method_name: $server_key_method:ident, display_name:$name:ident) => { - ::paste::paste!{ - fn [](c: &mut Criterion) { - bench_cuda_server_key_binary_function_clean_inputs( - c, - concat!("integer::cuda::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs, stream| { - server_key.$server_key_method(lhs, rhs, stream); - } - ) + (method_name: $server_key_method:ident, display_name:$name:ident) => { + ::paste::paste!{ + fn [](c: &mut Criterion) { + bench_cuda_server_key_binary_function_clean_inputs( + c, + concat!("integer::cuda::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs, stream| { + server_key.$server_key_method(lhs, rhs, stream); + } + ) + } } } - } - ); + ); macro_rules! define_cuda_server_key_bench_clean_input_scalar_fn ( - (method_name: $server_key_method:ident, display_name:$name:ident, rng_func:$($rng_fn:tt)*) => { - ::paste::paste!{ - fn [](c: &mut Criterion) { - bench_cuda_server_key_binary_scalar_function_clean_inputs( - c, - concat!("integer::cuda::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs, stream| { - server_key.$server_key_method(lhs, rhs, stream); - }, - $($rng_fn)* - ) + (method_name: $server_key_method:ident, display_name:$name:ident, rng_func:$($rng_fn:tt)*) => { + ::paste::paste!{ + fn [](c: &mut Criterion) { + bench_cuda_server_key_binary_scalar_function_clean_inputs( + c, + concat!("integer::cuda::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs, stream| { + server_key.$server_key_method(lhs, rhs, stream); + }, + $($rng_fn)* + ) + } } } - } - ); + ); //=========================================== // Unchecked @@ -2306,17 +2306,17 @@ fn bench_server_key_cast_function( } macro_rules! define_server_key_bench_cast_fn ( - (method_name: $server_key_method:ident, display_name:$name:ident) => { - fn $server_key_method(c: &mut Criterion) { - bench_server_key_cast_function( - c, - concat!("integer::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs| { - server_key.$server_key_method(lhs, rhs); - }) - } - } + (method_name: $server_key_method:ident, display_name:$name:ident) => { + fn $server_key_method(c: &mut Criterion) { + bench_server_key_cast_function( + c, + concat!("integer::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs| { + server_key.$server_key_method(lhs, rhs); + }) + } + } ); define_server_key_bench_cast_fn!(method_name: cast_to_unsigned, display_name: cast_to_unsigned); diff --git a/tfhe/benches/integer/signed_bench.rs b/tfhe/benches/integer/signed_bench.rs index 09740f689f..f13778aa1f 100644 --- a/tfhe/benches/integer/signed_bench.rs +++ b/tfhe/benches/integer/signed_bench.rs @@ -315,7 +315,7 @@ macro_rules! define_server_key_bench_binary_signed_clean_inputs_fn ( ) } } - ); +); macro_rules! define_server_key_bench_unary_signed_clean_input_fn ( (method_name: $server_key_method:ident, display_name:$name:ident $(,)?) => { @@ -330,7 +330,7 @@ macro_rules! define_server_key_bench_unary_signed_clean_input_fn ( ) } }; - ); +); define_server_key_bench_unary_signed_clean_input_fn!( method_name: neg_parallelized, @@ -835,7 +835,7 @@ macro_rules! define_server_key_bench_binary_scalar_clean_inputs_fn ( }, $($rng_fn)*) } } - ); +); define_server_key_bench_binary_scalar_clean_inputs_fn!( method_name: scalar_add_parallelized, @@ -1180,17 +1180,17 @@ fn bench_server_key_signed_cast_function( } macro_rules! define_server_key_bench_cast_fn ( - (method_name: $server_key_method:ident, display_name:$name:ident) => { - fn $server_key_method(c: &mut Criterion) { - bench_server_key_signed_cast_function( - c, - concat!("integer::signed::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs| { - server_key.$server_key_method(lhs, rhs); - }) - } - } + (method_name: $server_key_method:ident, display_name:$name:ident) => { + fn $server_key_method(c: &mut Criterion) { + bench_server_key_signed_cast_function( + c, + concat!("integer::signed::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs| { + server_key.$server_key_method(lhs, rhs); + }) + } + } ); define_server_key_bench_cast_fn!(method_name: cast_to_unsigned, display_name: cast_to_unsigned); @@ -1283,21 +1283,21 @@ mod cuda { } macro_rules! define_cuda_server_key_bench_clean_input_signed_fn ( - (method_name: $server_key_method:ident, display_name:$name:ident) => { - ::paste::paste!{ - fn [](c: &mut Criterion) { - bench_cuda_server_key_binary_signed_function_clean_inputs( - c, - concat!("integer::cuda::signed::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs, stream| { - server_key.$server_key_method(lhs, rhs, stream); - } - ) + (method_name: $server_key_method:ident, display_name:$name:ident) => { + ::paste::paste!{ + fn [](c: &mut Criterion) { + bench_cuda_server_key_binary_signed_function_clean_inputs( + c, + concat!("integer::cuda::signed::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs, stream| { + server_key.$server_key_method(lhs, rhs, stream); + } + ) + } } } - } - ); + ); /// Base function to bench a server key function that is a unary operation, input ciphertext /// will contain only zero carries @@ -1361,21 +1361,21 @@ mod cuda { } macro_rules! define_cuda_server_key_bench_clean_input_signed_unary_fn ( - (method_name: $server_key_method:ident, display_name:$name:ident) => { - ::paste::paste!{ - fn [](c: &mut Criterion) { - bench_cuda_server_key_unary_signed_function_clean_inputs( - c, - concat!("integer::cuda::signed::", stringify!($server_key_method)), - stringify!($name), - |server_key, input, stream| { - server_key.$server_key_method(input, stream); - } - ) + (method_name: $server_key_method:ident, display_name:$name:ident) => { + ::paste::paste!{ + fn [](c: &mut Criterion) { + bench_cuda_server_key_unary_signed_function_clean_inputs( + c, + concat!("integer::cuda::signed::", stringify!($server_key_method)), + stringify!($name), + |server_key, input, stream| { + server_key.$server_key_method(input, stream); + } + ) + } } } - } - ); + ); fn bench_cuda_server_key_binary_scalar_signed_function_clean_inputs( c: &mut Criterion, @@ -1447,22 +1447,22 @@ mod cuda { } macro_rules! define_cuda_server_key_bench_clean_input_scalar_signed_fn ( - (method_name: $server_key_method:ident, display_name:$name:ident, rng_func:$($rng_fn:tt)*) => { - ::paste::paste!{ - fn [](c: &mut Criterion) { - bench_cuda_server_key_binary_scalar_signed_function_clean_inputs( - c, - concat!("integer::cuda::signed::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs, stream| { - server_key.$server_key_method(lhs, rhs, stream); - }, - $($rng_fn)* - ) + (method_name: $server_key_method:ident, display_name:$name:ident, rng_func:$($rng_fn:tt)*) => { + ::paste::paste!{ + fn [](c: &mut Criterion) { + bench_cuda_server_key_binary_scalar_signed_function_clean_inputs( + c, + concat!("integer::cuda::signed::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs, stream| { + server_key.$server_key_method(lhs, rhs, stream); + }, + $($rng_fn)* + ) + } } - } - } - ); + } + ); // Functions used to apply different way of selecting a scalar based on the context. fn default_signed_scalar(rng: &mut ThreadRng, _clear_bit_size: usize) -> ScalarType { diff --git a/tfhe/benches/shortint/bench.rs b/tfhe/benches/shortint/bench.rs index 61764da03d..7f86bdf246 100644 --- a/tfhe/benches/shortint/bench.rs +++ b/tfhe/benches/shortint/bench.rs @@ -415,71 +415,76 @@ fn _bench_wopbs_param_message_8_norm2_5(c: &mut Criterion) { } macro_rules! define_server_key_unary_bench_fn ( - (method_name:$server_key_method:ident, display_name:$name:ident, $params_set:expr) => { - fn $server_key_method(c: &mut Criterion) { - bench_server_key_unary_function( - c, - concat!("shortint::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs| { - let _ = server_key.$server_key_method(lhs);}, - $params_set) - } - } + (method_name:$server_key_method:ident, display_name:$name:ident, $params_set:expr) => { + fn $server_key_method(c: &mut Criterion) { + bench_server_key_unary_function( + c, + concat!("shortint::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs| { + let _ = server_key.$server_key_method(lhs);}, + $params_set + ) + } + } ); macro_rules! define_server_key_bench_fn ( - (method_name:$server_key_method:ident, display_name:$name:ident, $params_set:expr) => { - fn $server_key_method(c: &mut Criterion) { - bench_server_key_binary_function( - c, - concat!("shortint::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs| { - let _ = server_key.$server_key_method(lhs, rhs);}, - $params_set) - } - } + (method_name:$server_key_method:ident, display_name:$name:ident, $params_set:expr) => { + fn $server_key_method(c: &mut Criterion) { + bench_server_key_binary_function( + c, + concat!("shortint::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs| { + let _ = server_key.$server_key_method(lhs, rhs);}, + $params_set + ) + } + } ); macro_rules! define_server_key_scalar_bench_fn ( - (method_name:$server_key_method:ident, display_name:$name:ident, $params_set:expr) => { - fn $server_key_method(c: &mut Criterion) { - bench_server_key_binary_scalar_function( - c, - concat!("shortint::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs| { - let _ = server_key.$server_key_method(lhs, rhs);}, - $params_set) - } - } + (method_name:$server_key_method:ident, display_name:$name:ident, $params_set:expr) => { + fn $server_key_method(c: &mut Criterion) { + bench_server_key_binary_scalar_function( + c, + concat!("shortint::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs| { + let _ = server_key.$server_key_method(lhs, rhs);}, + $params_set + ) + } + } ); macro_rules! define_server_key_scalar_div_bench_fn ( - (method_name:$server_key_method:ident, display_name:$name:ident, $params_set:expr) => { - fn $server_key_method(c: &mut Criterion) { - bench_server_key_binary_scalar_division_function( - c, - concat!("shortint::", stringify!($server_key_method)), - stringify!($name), - |server_key, lhs, rhs| { - let _ = server_key.$server_key_method(lhs, rhs);}, - $params_set) - } - } + (method_name:$server_key_method:ident, display_name:$name:ident, $params_set:expr) => { + fn $server_key_method(c: &mut Criterion) { + bench_server_key_binary_scalar_division_function( + c, + concat!("shortint::", stringify!($server_key_method)), + stringify!($name), + |server_key, lhs, rhs| { + let _ = server_key.$server_key_method(lhs, rhs);}, + $params_set + ) + } + } ); macro_rules! define_custom_bench_fn ( - (function_name:$function:ident, $params_set:expr) => { - fn $function(c: &mut Criterion) { - ::paste::paste! { - [<$function _bench>]( - c, - $params_set) - } - } - } + (function_name:$function:ident, $params_set:expr) => { + fn $function(c: &mut Criterion) { + ::paste::paste! { + [<$function _bench>]( + c, + $params_set + ) + } + } + } ); define_server_key_unary_bench_fn!( diff --git a/tfhe/src/c_api/high_level_api/integers.rs b/tfhe/src/c_api/high_level_api/integers.rs index d2a06687c9..50dc702434 100644 --- a/tfhe/src/c_api/high_level_api/integers.rs +++ b/tfhe/src/c_api/high_level_api/integers.rs @@ -222,8 +222,8 @@ macro_rules! impl_operations_for_integer_type { }) } - // map cmux to if_then_else - pub unsafe extern "C" fn [<$name:snake _cmux>]( + // map cmux to if_then_else + pub unsafe extern "C" fn [<$name:snake _cmux>]( condition_ct: *const FheBool, then_ct: *const $name, else_ct: *const $name, diff --git a/tfhe/src/c_api/high_level_api/utils.rs b/tfhe/src/c_api/high_level_api/utils.rs index 3fd101e4ca..69df135242 100644 --- a/tfhe/src/c_api/high_level_api/utils.rs +++ b/tfhe/src/c_api/high_level_api/utils.rs @@ -368,14 +368,14 @@ macro_rules! impl_binary_fn_on_type { // // In practice, this is used for shifts on signed type, // where lhs is a signed type and rhs is an unsigned type - ( + ( lhs_type: $lhs_type:ty, rhs_type: $rhs_type:ty, binary_fn_names: $($binary_fn_name:ident),* $(,)? ) => { - $( // unroll binary_fn_names - ::paste::paste! { + $( // unroll binary_fn_names + ::paste::paste! { #[no_mangle] pub unsafe extern "C" fn [<$lhs_type:snake _ $binary_fn_name>]( lhs: *const $lhs_type, @@ -392,7 +392,7 @@ macro_rules! impl_binary_fn_on_type { }) } } - )* + )* }; @@ -407,14 +407,14 @@ macro_rules! impl_binary_fn_on_type { } // Like binary fn, but an extra output value is needed for the overflow flag macro_rules! impl_binary_overflowing_fn_on_type { - ( + ( lhs_type: $lhs_type:ty, rhs_type: $rhs_type:ty, binary_fn_names: $($binary_fn_name:ident),* $(,)? ) => { - $( // unroll binary_fn_names - ::paste::paste! { + $( // unroll binary_fn_names + ::paste::paste! { #[no_mangle] pub unsafe extern "C" fn [<$lhs_type:snake _ $binary_fn_name>]( lhs: *const $lhs_type, @@ -433,7 +433,7 @@ macro_rules! impl_binary_overflowing_fn_on_type { }) } } - )* + )* }; @@ -450,14 +450,14 @@ macro_rules! impl_binary_overflowing_fn_on_type { // Comparisons returns FheBool so we use a specialized // macro for them macro_rules! impl_comparison_fn_on_type { - ( + ( lhs_type: $lhs_type:ty, rhs_type: $rhs_type:ty, comparison_fn_names: $($comparison_fn_name:ident),* $(,)? ) => { - $( // unroll comparison_fn_names - ::paste::paste! { + $( // unroll comparison_fn_names + ::paste::paste! { #[no_mangle] pub unsafe extern "C" fn [<$lhs_type:snake _ $comparison_fn_name>]( lhs: *const $lhs_type, @@ -475,19 +475,19 @@ macro_rules! impl_comparison_fn_on_type { }) } } - )* + )* }; } macro_rules! impl_scalar_comparison_fn_on_type { - ( + ( lhs_type: $lhs_type:ty, clear_type: $scalar_type:ty, comparison_fn_names: $($comparison_fn_name:ident),* $(,)? ) => { - $( // unroll comparison_fn_names - ::paste::paste! { + $( // unroll comparison_fn_names + ::paste::paste! { #[no_mangle] pub unsafe extern "C" fn [<$lhs_type:snake _scalar_ $comparison_fn_name>]( lhs: *const $lhs_type, @@ -506,14 +506,14 @@ macro_rules! impl_scalar_comparison_fn_on_type { }) } } - )* + )* }; } macro_rules! impl_unary_fn_on_type { ($wrapper_type:ty => $($unary_fn_name:ident),* $(,)?) => { $( - ::paste::paste! { + ::paste::paste! { #[no_mangle] pub unsafe extern "C" fn [<$wrapper_type:snake _ $unary_fn_name>]( lhs: *const $wrapper_type, @@ -547,7 +547,7 @@ macro_rules! impl_binary_assign_fn_on_type { $(,)? ) => { $( - ::paste::paste! { + ::paste::paste! { #[no_mangle] pub unsafe extern "C" fn [<$lhs_type:snake _ $binary_assign_fn_name>]( lhs: *mut $lhs_type, @@ -564,7 +564,7 @@ macro_rules! impl_binary_assign_fn_on_type { )* }; ($wrapper_type:ty => $($binary_assign_fn_name:ident),* $(,)?) => { - impl_binary_assign_fn_on_type!( + impl_binary_assign_fn_on_type!( lhs_type: $wrapper_type, rhs_type: $wrapper_type, binary_fn_names: $($binary_assign_fn_name),* @@ -576,7 +576,7 @@ macro_rules! impl_binary_assign_fn_on_type { macro_rules! impl_scalar_binary_fn_on_type { ($wrapper_type:ty, $scalar_type:ty => $($binary_fn_name:ident),* $(,)?) => { $( - ::paste::paste! { + ::paste::paste! { #[no_mangle] pub unsafe extern "C" fn [<$wrapper_type:snake _scalar_ $binary_fn_name>]( lhs: *const $wrapper_type, @@ -601,7 +601,7 @@ macro_rules! impl_scalar_binary_fn_on_type { macro_rules! impl_scalar_binary_assign_fn_on_type { ($wrapper_type:ty, $scalar_type:ty => $($binary_assign_fn_name:ident),* $(,)?) => { $( - ::paste::paste! { + ::paste::paste! { #[no_mangle] pub unsafe extern "C" fn [<$wrapper_type:snake _scalar_ $binary_assign_fn_name>]( lhs: *mut $wrapper_type, diff --git a/tfhe/src/core_crypto/algorithms/test/mod.rs b/tfhe/src/core_crypto/algorithms/test/mod.rs index db0cfb6222..832cf45430 100644 --- a/tfhe/src/core_crypto/algorithms/test/mod.rs +++ b/tfhe/src/core_crypto/algorithms/test/mod.rs @@ -491,7 +491,7 @@ macro_rules! create_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { TEST_PARAMS_4_BITS_NATIVE_U64, diff --git a/tfhe/src/core_crypto/gpu/algorithms/test/mod.rs b/tfhe/src/core_crypto/gpu/algorithms/test/mod.rs index ead3719982..0436ae189f 100644 --- a/tfhe/src/core_crypto/gpu/algorithms/test/mod.rs +++ b/tfhe/src/core_crypto/gpu/algorithms/test/mod.rs @@ -19,7 +19,7 @@ macro_rules! create_gpu_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_gpu_parametrized_test!($name { TEST_PARAMS_4_BITS_NATIVE_U64 @@ -37,7 +37,7 @@ macro_rules! create_gpu_multi_bit_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_gpu_multi_bit_parametrized_test!($name { MULTI_BIT_2_2_2_PARAMS, diff --git a/tfhe/src/high_level_api/integers/signed/static_.rs b/tfhe/src/high_level_api/integers/signed/static_.rs index 671ca8ecb5..925e8ec7bb 100644 --- a/tfhe/src/high_level_api/integers/signed/static_.rs +++ b/tfhe/src/high_level_api/integers/signed/static_.rs @@ -71,61 +71,61 @@ static_int_type! { } static_int_type! { - Signed { + Signed { num_bits: 8, } } static_int_type! { - Signed { + Signed { num_bits: 10, } } static_int_type! { - Signed { + Signed { num_bits: 12, } } static_int_type! { - Signed { + Signed { num_bits: 14, } } static_int_type! { - Signed { + Signed { num_bits: 16, } } static_int_type! { - Signed { + Signed { num_bits: 32, } } static_int_type! { - Signed { + Signed { num_bits: 64, } } static_int_type! { - Signed { + Signed { num_bits: 128, } } static_int_type! { - Signed { + Signed { num_bits: 160, } } static_int_type! { - Signed { + Signed { num_bits: 256, } } diff --git a/tfhe/src/high_level_api/integers/unsigned/ops.rs b/tfhe/src/high_level_api/integers/unsigned/ops.rs index 63e176d8ca..8ff3588aca 100644 --- a/tfhe/src/high_level_api/integers/unsigned/ops.rs +++ b/tfhe/src/high_level_api/integers/unsigned/ops.rs @@ -720,8 +720,8 @@ generic_integer_impl_operation!( /// let result: u16 = result.decrypt(&client_key); /// assert_eq!(result, 23u16 + 3u16); /// ``` - rust_trait: Add(add), - implem: { + rust_trait: Add(add), + implem: { |lhs: &FheUint<_>, rhs: &FheUint<_>| { global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { @@ -740,7 +740,7 @@ generic_integer_impl_operation!( } }) } - }, + }, ); generic_integer_impl_operation!( /// Subtracts two [FheUint] @@ -763,8 +763,8 @@ generic_integer_impl_operation!( /// let result: u16 = result.decrypt(&client_key); /// assert_eq!(result, 3u16.wrapping_sub(37849u16)); /// ``` - rust_trait: Sub(sub), - implem: { + rust_trait: Sub(sub), + implem: { |lhs: &FheUint<_>, rhs: &FheUint<_>| { global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { @@ -783,7 +783,7 @@ generic_integer_impl_operation!( } }) } - }, + }, ); generic_integer_impl_operation!( /// Multiplies two [FheUint] @@ -806,8 +806,8 @@ generic_integer_impl_operation!( /// let result: u16 = result.decrypt(&client_key); /// assert_eq!(result, 3u16.wrapping_mul(37849u16)); /// ``` - rust_trait: Mul(mul), - implem: { + rust_trait: Mul(mul), + implem: { |lhs: &FheUint<_>, rhs: &FheUint<_>| { global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { @@ -826,7 +826,7 @@ generic_integer_impl_operation!( } }) } - }, + }, ); generic_integer_impl_operation!( /// Performs a bitwise 'and' between two [FheUint] @@ -847,8 +847,8 @@ generic_integer_impl_operation!( /// let result: u16 = result.decrypt(&client_key); /// assert_eq!(result, 3u16 & 37849u16); /// ``` - rust_trait: BitAnd(bitand), - implem: { + rust_trait: BitAnd(bitand), + implem: { |lhs: &FheUint<_>, rhs: &FheUint<_>| { global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { @@ -867,7 +867,7 @@ generic_integer_impl_operation!( } }) } - }, + }, ); generic_integer_impl_operation!( /// Performs a bitwise 'or' between two [FheUint] @@ -888,8 +888,8 @@ generic_integer_impl_operation!( /// let result: u16 = result.decrypt(&client_key); /// assert_eq!(result, 3u16 | 37849u16); /// ``` - rust_trait: BitOr(bitor), - implem: { + rust_trait: BitOr(bitor), + implem: { |lhs: &FheUint<_>, rhs: &FheUint<_>| { global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { @@ -908,7 +908,7 @@ generic_integer_impl_operation!( } }) } - }, + }, ); generic_integer_impl_operation!( /// Performs a bitwise 'xor' between two [FheUint] @@ -929,8 +929,8 @@ generic_integer_impl_operation!( /// let result: u16 = result.decrypt(&client_key); /// assert_eq!(result, 3u16 ^ 37849u16); /// ``` - rust_trait: BitXor(bitxor), - implem: { + rust_trait: BitXor(bitxor), + implem: { |lhs: &FheUint<_>, rhs: &FheUint<_>| { global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { @@ -949,7 +949,7 @@ generic_integer_impl_operation!( } }) } - }, + }, ); generic_integer_impl_operation!( /// Divides two [FheUint] and returns the quotient @@ -978,8 +978,8 @@ generic_integer_impl_operation!( /// let result: u16 = result.decrypt(&client_key); /// assert_eq!(result, 37849u16 / 3u16); /// ``` - rust_trait: Div(div), - implem: { + rust_trait: Div(div), + implem: { |lhs: &FheUint<_>, rhs: &FheUint<_>| { global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { @@ -994,7 +994,7 @@ generic_integer_impl_operation!( } }) } - }, + }, ); generic_integer_impl_operation!( /// Divides two [FheUint] and returns the remainder @@ -1024,8 +1024,8 @@ generic_integer_impl_operation!( /// let result: u16 = result.decrypt(&client_key); /// assert_eq!(result, 37849u16 % 3u16); /// ``` - rust_trait: Rem(rem), - implem: { + rust_trait: Rem(rem), + implem: { |lhs: &FheUint<_>, rhs: &FheUint<_>| { global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { @@ -1036,11 +1036,11 @@ generic_integer_impl_operation!( }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(_cuda_key) => { - panic!("Remainder/Modulo '%' is not yet supported by Cuda devices") + panic!("Remainder/Modulo '%' is not yet supported by Cuda devices") } }) } - }, + }, ); // Shifts and rotations are special cases where the right hand side // is for now, required to be a unsigned integer type. @@ -1107,7 +1107,7 @@ macro_rules! generic_integer_impl_shift_rotate ( $(#[$outer])* fn $rust_trait_method(self, rhs: &FheUint) -> Self::Output { - $closure(self, rhs.borrow()) + $closure(self, rhs.borrow()) } } } diff --git a/tfhe/src/high_level_api/integers/unsigned/scalar_ops.rs b/tfhe/src/high_level_api/integers/unsigned/scalar_ops.rs index 9bdb98c69f..0341e9822c 100644 --- a/tfhe/src/high_level_api/integers/unsigned/scalar_ops.rs +++ b/tfhe/src/high_level_api/integers/unsigned/scalar_ops.rs @@ -459,7 +459,7 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_add_parallelized(&*lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(cuda_key) => { @@ -497,10 +497,10 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_sub_parallelized(&*lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] - InternalServerKey::Cuda(cuda_key) => { + InternalServerKey::Cuda(cuda_key) => { let inner_result = with_thread_local_cuda_stream(|stream| { cuda_key.key.scalar_sub( &*lhs.ciphertext.on_gpu(), rhs, stream @@ -535,7 +535,7 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_mul_parallelized(&*lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(_) => { @@ -568,7 +568,7 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_bitand_parallelized(&*lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(cuda_key) => { @@ -606,7 +606,7 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_bitor_parallelized(&*lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(cuda_key) => { @@ -644,7 +644,7 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_bitxor_parallelized(&*lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] @@ -683,7 +683,7 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_left_shift_parallelized(&*lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(cuda_key) => { @@ -721,11 +721,11 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_right_shift_parallelized(&*lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(cuda_key) => { - let inner_result = with_thread_local_cuda_stream(|stream| { + let inner_result = with_thread_local_cuda_stream(|stream| { cuda_key.key.scalar_right_shift( &lhs.ciphertext.on_gpu(), u64::cast_from(rhs), stream ) @@ -759,7 +759,7 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_rotate_left_parallelized(&*lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(cuda_key) => { @@ -797,7 +797,7 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_rotate_right_parallelized(&*lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(cuda_key) => { @@ -835,7 +835,7 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_div_parallelized(&lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(_) => { @@ -868,7 +868,7 @@ generic_integer_impl_scalar_operation!( let inner_result = cpu_key .pbs_key() .scalar_rem_parallelized(&lhs.ciphertext.on_cpu(), rhs); - RadixCiphertext::Cpu(inner_result) + RadixCiphertext::Cpu(inner_result) }, #[cfg(feature = "gpu")] InternalServerKey::Cuda(_) => { @@ -1247,7 +1247,7 @@ macro_rules! generic_integer_impl_scalar_operation_assign { implem: { $closure:expr }, - // A 'list' of tuple, where the first element is the concrete Fhe type + // A 'list' of tuple, where the first element is the concrete Fhe type // e.g (FheUint8 and the rest is scalar types (u8, u16, etc) fhe_and_scalar_type: $( ($concrete_type:ty, $($(#[$doc:meta])* $scalar_type:ty),*) @@ -1271,15 +1271,15 @@ macro_rules! generic_integer_impl_scalar_operation_assign { generic_integer_impl_scalar_operation_assign!( rust_trait: AddAssign(add_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() .scalar_add_assign_parallelized(lhs.ciphertext.as_cpu_mut(), rhs); }, #[cfg(feature = "gpu")] - InternalServerKey::Cuda(cuda_key) => { + InternalServerKey::Cuda(cuda_key) => { with_thread_local_cuda_stream(|stream| { cuda_key.key .scalar_add_assign(lhs.ciphertext.as_gpu_mut(), rhs, stream); @@ -1328,8 +1328,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: SubAssign(sub_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() @@ -1363,8 +1363,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: MulAssign(mul_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() @@ -1395,8 +1395,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: BitAndAssign(bitand_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() @@ -1430,8 +1430,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: BitOrAssign(bitor_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() @@ -1465,8 +1465,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: BitXorAssign(bitxor_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() @@ -1500,8 +1500,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: ShlAssign(shl_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() @@ -1535,8 +1535,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: ShrAssign(shr_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() @@ -1570,8 +1570,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: RotateLeftAssign(rotate_left_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() @@ -1605,8 +1605,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: RotateRightAssign(rotate_right_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() @@ -1640,8 +1640,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: DivAssign(div_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() @@ -1672,8 +1672,8 @@ generic_integer_impl_scalar_operation_assign!( generic_integer_impl_scalar_operation_assign!( rust_trait: RemAssign(rem_assign), implem: { - |lhs: &mut FheUint<_>, rhs| { - global_state::with_internal_keys(|key| match key { + |lhs: &mut FheUint<_>, rhs| { + global_state::with_internal_keys(|key| match key { InternalServerKey::Cpu(cpu_key) => { cpu_key .pbs_key() diff --git a/tfhe/src/high_level_api/mod.rs b/tfhe/src/high_level_api/mod.rs index 96df431497..358f0397aa 100644 --- a/tfhe/src/high_level_api/mod.rs +++ b/tfhe/src/high_level_api/mod.rs @@ -5,7 +5,7 @@ #[allow(unused)] macro_rules! expand_pub_use_fhe_type( ( - pub use $module_path:path { $($fhe_type_name:ident),* $(,)? }; + pub use $module_path:path { $($fhe_type_name:ident),* $(,)? }; )=> { ::paste::paste! { 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 822d3ecad9..202dde9779 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 @@ -26,7 +26,7 @@ macro_rules! create_gpu_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_gpu_parametrized_test!($name { // PARAM_MESSAGE_1_CARRY_1_KS_PBS, diff --git a/tfhe/src/integer/server_key/radix_parallel/tests_cases_unsigned.rs b/tfhe/src/integer/server_key/radix_parallel/tests_cases_unsigned.rs index bd8a951d2a..0d3137c535 100644 --- a/tfhe/src/integer/server_key/radix_parallel/tests_cases_unsigned.rs +++ b/tfhe/src/integer/server_key/radix_parallel/tests_cases_unsigned.rs @@ -1643,11 +1643,11 @@ where expected {expected_result}, got {decrypted_result}" ); assert_eq!( - decrypted_overflowed, - expected_overflowed, - "Invalid overflow flag result for overflowing_mul for ({clear_0} * {clear_1}) % {modulus} - expected overflow flag {expected_overflowed}, got {decrypted_overflowed}" - ); + decrypted_overflowed, + expected_overflowed, + "Invalid overflow flag result for overflowing_mul for ({clear_0} * {clear_1}) % {modulus} + expected overflow flag {expected_overflowed}, got {decrypted_overflowed}" + ); assert_eq!(result_overflowed.0.degree.get(), 1); assert_eq!(result_overflowed.0.noise_level(), NoiseLevel::NOMINAL); 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 cac3482614..9da056725b 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 @@ -62,7 +62,7 @@ macro_rules! create_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { #[cfg(not(tarpaulin))] @@ -840,7 +840,7 @@ create_parametrized_test!(integer_signed_default_absolute_value); create_parametrized_test!( integer_signed_default_left_shift { - coverage => { + coverage => { COVERAGE_PARAM_MESSAGE_2_CARRY_2_KS_PBS, COVERAGE_PARAM_MULTI_BIT_MESSAGE_2_CARRY_2_GROUP_2_KS_PBS, }, 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 eeb738c9fe..7fd0784dff 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 @@ -95,7 +95,7 @@ fn integer_signed_default_overflowing_mul(param: impl Into) { decrypted_overflowed, expected_overflowed, "Invalid overflow flag result for overflowing_mul for ({clear_0} * {clear_1}) % {modulus} - expected overflow flag {expected_overflowed}, got {decrypted_overflowed}" + expected overflow flag {expected_overflowed}, got {decrypted_overflowed}" ); assert_eq!(result_overflowed.0.degree.get(), 1); assert_eq!(result_overflowed.0.noise_level(), NoiseLevel::NOMINAL); 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 3456da2cfa..465e9ab678 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 @@ -309,7 +309,7 @@ macro_rules! create_parametrized_test { )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { #[cfg(not(tarpaulin))] diff --git a/tfhe/src/integer/tests.rs b/tfhe/src/integer/tests.rs index 61003abde4..9fba46149a 100644 --- a/tfhe/src/integer/tests.rs +++ b/tfhe/src/integer/tests.rs @@ -15,7 +15,7 @@ macro_rules! create_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { #[cfg(not(tarpaulin))] diff --git a/tfhe/src/integer/wopbs/test.rs b/tfhe/src/integer/wopbs/test.rs index 6f6439c0bf..7c75301e44 100644 --- a/tfhe/src/integer/wopbs/test.rs +++ b/tfhe/src/integer/wopbs/test.rs @@ -36,7 +36,7 @@ macro_rules! create_parametrized_test{ ( )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { (PARAM_MESSAGE_2_CARRY_2_KS_PBS, WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS), diff --git a/tfhe/src/shortint/server_key/tests/shortint.rs b/tfhe/src/shortint/server_key/tests/shortint.rs index b0e0b00338..03a4c7c581 100644 --- a/tfhe/src/shortint/server_key/tests/shortint.rs +++ b/tfhe/src/shortint/server_key/tests/shortint.rs @@ -40,7 +40,7 @@ macro_rules! create_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { PARAM_MESSAGE_1_CARRY_1_KS_PBS, @@ -94,7 +94,7 @@ macro_rules! create_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { PARAM_MESSAGE_2_CARRY_2_KS_PBS, @@ -117,7 +117,7 @@ macro_rules! create_parametrized_test_bivariate_pbs_compliant{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { PARAM_MESSAGE_1_CARRY_1_KS_PBS, @@ -159,7 +159,7 @@ macro_rules! create_parametrized_test_bivariate_pbs_compliant{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { PARAM_MESSAGE_2_CARRY_2_KS_PBS, 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 d60e868765..7eda5409ca 100644 --- a/tfhe/src/shortint/server_key/tests/shortint_compact_pk.rs +++ b/tfhe/src/shortint/server_key/tests/shortint_compact_pk.rs @@ -33,7 +33,7 @@ macro_rules! create_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS, @@ -109,7 +109,7 @@ macro_rules! create_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS, diff --git a/tfhe/src/shortint/wopbs/test.rs b/tfhe/src/shortint/wopbs/test.rs index df9fc5dc7b..0d99e499a9 100644 --- a/tfhe/src/shortint/wopbs/test.rs +++ b/tfhe/src/shortint/wopbs/test.rs @@ -23,7 +23,7 @@ macro_rules! create_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { (PARAM_MESSAGE_1_CARRY_1_KS_PBS, WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS), @@ -46,7 +46,7 @@ macro_rules! create_parametrized_wopbs_only_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_wopbs_only_test!($name { WOPBS_PARAM_MESSAGE_1_CARRY_1_KS_PBS, @@ -70,7 +70,7 @@ macro_rules! create_parametrized_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_test!($name { (PARAM_MESSAGE_2_CARRY_2_KS_PBS, WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS) @@ -90,7 +90,7 @@ macro_rules! create_parametrized_wopbs_only_test{ )* } }; - ($name:ident)=> { + ($name:ident)=> { create_parametrized_wopbs_only_test!($name { WOPBS_PARAM_MESSAGE_2_CARRY_2_KS_PBS