Skip to content

Commit f7d4685

Browse files
committed
chore: update v1_1 parameters so that comments are doc comments
- this allows to keep relevant information with param_dedup, as param_dedup uses syn, comments are lost as syn does not preserver comments in the AST
1 parent c1f4267 commit f7d4685

File tree

26 files changed

+480
-480
lines changed

26 files changed

+480
-480
lines changed

tfhe/src/shortint/parameters/v1_1/classic/compact_pk/gaussian/p_fail_2_minus_128/ks_pbs.rs

Lines changed: 72 additions & 72 deletions
Large diffs are not rendered by default.

tfhe/src/shortint/parameters/v1_1/classic/compact_pk/gaussian/p_fail_2_minus_128/pbs_ks.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::shortint::parameters::{
66
StandardDev, Variance,
77
};
88

9-
// p-fail = 2^-139.952, algorithmic cost ~ 78, 2-norm = 3
10-
// Average number of encryptions of 0s ~ 16, peak noise ~ Variance(0.0000207432665142053)
9+
/// p-fail = 2^-139.952, algorithmic cost ~ 78, 2-norm = 3
10+
/// Average number of encryptions of 0s ~ 16, peak noise ~ Variance(0.0000207432665142053)
1111
pub const V1_1_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M128: ClassicPBSParameters =
1212
ClassicPBSParameters {
1313
lwe_dimension: LweDimension(1024),
@@ -37,8 +37,8 @@ pub const V1_1_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M128: Classic
3737
}),
3838
};
3939

40-
// p-fail = 2^-129.632, algorithmic cost ~ 130, 2-norm = 5
41-
// Average number of encryptions of 0s ~ 17, peak noise ~ Variance(0.00000140242017242477)
40+
/// p-fail = 2^-129.632, algorithmic cost ~ 130, 2-norm = 5
41+
/// Average number of encryptions of 0s ~ 17, peak noise ~ Variance(0.00000140242017242477)
4242
pub const V1_1_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M128: ClassicPBSParameters =
4343
ClassicPBSParameters {
4444
lwe_dimension: LweDimension(1024),
@@ -68,8 +68,8 @@ pub const V1_1_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M128: Classic
6868
}),
6969
};
7070

71-
// p-fail = 2^-276.943, algorithmic cost ~ 3355, 2-norm = 9
72-
// Average number of encryptions of 0s ~ 16, peak noise ~ Variance(4.04169957228641E-8)
71+
/// p-fail = 2^-276.943, algorithmic cost ~ 3355, 2-norm = 9
72+
/// Average number of encryptions of 0s ~ 16, peak noise ~ Variance(4.04169957228641E-8)
7373
pub const V1_1_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M128: ClassicPBSParameters =
7474
ClassicPBSParameters {
7575
lwe_dimension: LweDimension(2048),
@@ -99,8 +99,8 @@ pub const V1_1_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M128: Classic
9999
}),
100100
};
101101

102-
// p-fail = 2^-273.01, algorithmic cost ~ 20401, 2-norm = 17
103-
// Average number of encryptions of 0s ~ 16, peak noise ~ Variance(2.56297356349261E-9)
102+
/// p-fail = 2^-273.01, algorithmic cost ~ 20401, 2-norm = 17
103+
/// Average number of encryptions of 0s ~ 16, peak noise ~ Variance(2.56297356349261E-9)
104104
pub const V1_1_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M128: ClassicPBSParameters =
105105
ClassicPBSParameters {
106106
lwe_dimension: LweDimension(2048),

tfhe/src/shortint/parameters/v1_1/classic/compact_pk/gaussian/p_fail_2_minus_64/ks_pbs.rs

Lines changed: 36 additions & 36 deletions
Large diffs are not rendered by default.

tfhe/src/shortint/parameters/v1_1/classic/compact_pk/gaussian/p_fail_2_minus_64/pbs_ks.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::shortint::parameters::{
44
MaxNoiseLevel, MessageModulus, PolynomialSize, StandardDev,
55
};
66

7-
// p-fail = 2^-66.829, algorithmic cost ~ 74, 2-norm = 3
7+
/// p-fail = 2^-66.829, algorithmic cost ~ 74, 2-norm = 3
88
pub const V1_1_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters =
99
ClassicPBSParameters {
1010
lwe_dimension: LweDimension(1024),
@@ -29,7 +29,7 @@ pub const V1_1_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicP
2929
modulus_switch_noise_reduction_params: None,
3030
};
3131

32-
// p-fail = 2^-64.438, algorithmic cost ~ 126, 2-norm = 5
32+
/// p-fail = 2^-64.438, algorithmic cost ~ 126, 2-norm = 5
3333
pub const V1_1_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters =
3434
ClassicPBSParameters {
3535
lwe_dimension: LweDimension(1024),
@@ -54,7 +54,7 @@ pub const V1_1_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicP
5454
modulus_switch_noise_reduction_params: None,
5555
};
5656

57-
// p-fail = 2^-141.376, algorithmic cost ~ 3355, 2-norm = 9
57+
/// p-fail = 2^-141.376, algorithmic cost ~ 3355, 2-norm = 9
5858
pub const V1_1_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters =
5959
ClassicPBSParameters {
6060
lwe_dimension: LweDimension(2048),
@@ -79,7 +79,7 @@ pub const V1_1_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicP
7979
modulus_switch_noise_reduction_params: None,
8080
};
8181

82-
// p-fail = 2^-140.367, algorithmic cost ~ 20401, 2-norm = 17
82+
/// p-fail = 2^-140.367, algorithmic cost ~ 20401, 2-norm = 17
8383
pub const V1_1_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64: ClassicPBSParameters =
8484
ClassicPBSParameters {
8585
lwe_dimension: LweDimension(2048),

tfhe/src/shortint/parameters/v1_1/classic/gaussian/p_fail_2_minus_128/ks_pbs.rs

Lines changed: 72 additions & 72 deletions
Large diffs are not rendered by default.

tfhe/src/shortint/parameters/v1_1/classic/gaussian/p_fail_2_minus_128/pbs_ks.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::shortint::parameters::{
66
StandardDev, Variance,
77
};
88

9-
// p-fail = 2^-128.181, algorithmic cost ~ 70, 2-norm = 3
10-
// Average number of encryptions of 0s ~ 17, peak noise ~ Variance(0.0000226994502138943)
9+
/// p-fail = 2^-128.181, algorithmic cost ~ 70, 2-norm = 3
10+
/// Average number of encryptions of 0s ~ 17, peak noise ~ Variance(0.0000226994502138943)
1111
pub const V1_1_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M128: ClassicPBSParameters =
1212
ClassicPBSParameters {
1313
lwe_dimension: LweDimension(914),
@@ -37,8 +37,8 @@ pub const V1_1_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M128: ClassicPBSParamete
3737
}),
3838
};
3939

40-
// p-fail = 2^-128.163, algorithmic cost ~ 128, 2-norm = 5
41-
// Average number of encryptions of 0s ~ 17, peak noise ~ Variance(0.00000141892645707080)
40+
/// p-fail = 2^-128.163, algorithmic cost ~ 128, 2-norm = 5
41+
/// Average number of encryptions of 0s ~ 17, peak noise ~ Variance(0.00000141892645707080)
4242
pub const V1_1_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M128: ClassicPBSParameters =
4343
ClassicPBSParameters {
4444
lwe_dimension: LweDimension(979),
@@ -68,8 +68,8 @@ pub const V1_1_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M128: ClassicPBSParamete
6868
}),
6969
};
7070

71-
// p-fail = 2^-128.674, algorithmic cost ~ 2030, 2-norm = 9
72-
// Average number of encryptions of 0s ~ 34, peak noise ~ Variance(8.83211431719384E-8)
71+
/// p-fail = 2^-128.674, algorithmic cost ~ 2030, 2-norm = 9
72+
/// Average number of encryptions of 0s ~ 34, peak noise ~ Variance(8.83211431719384E-8)
7373
pub const V1_1_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M128: ClassicPBSParameters =
7474
ClassicPBSParameters {
7575
lwe_dimension: LweDimension(1106),
@@ -99,8 +99,8 @@ pub const V1_1_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M128: ClassicPBSParamete
9999
}),
100100
};
101101

102-
// p-fail = 2^-129.799, algorithmic cost ~ 13785, 2-norm = 17
103-
// Average number of encryptions of 0s ~ 34, peak noise ~ Variance(5.47094548750703E-9)
102+
/// p-fail = 2^-129.799, algorithmic cost ~ 13785, 2-norm = 17
103+
/// Average number of encryptions of 0s ~ 34, peak noise ~ Variance(5.47094548750703E-9)
104104
pub const V1_1_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M128: ClassicPBSParameters =
105105
ClassicPBSParameters {
106106
lwe_dimension: LweDimension(1267),

tfhe/src/shortint/parameters/v1_1/classic/gaussian/p_fail_2_minus_40/ks_pbs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::shortint::parameters::{
44
MaxNoiseLevel, MessageModulus, PolynomialSize, StandardDev,
55
};
66

7-
// p-fail = 2^-40.004, algorithmic cost ~ 44, 2-norm = 3
7+
/// p-fail = 2^-40.004, algorithmic cost ~ 44, 2-norm = 3
88
pub const V1_1_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M40: ClassicPBSParameters =
99
ClassicPBSParameters {
1010
lwe_dimension: LweDimension(750),
@@ -29,7 +29,7 @@ pub const V1_1_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M40: ClassicPBSParameter
2929
modulus_switch_noise_reduction_params: None,
3030
};
3131

32-
// p-fail = 2^-40.489, algorithmic cost ~ 101, 2-norm = 5
32+
/// p-fail = 2^-40.489, algorithmic cost ~ 101, 2-norm = 5
3333
pub const V1_1_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M40: ClassicPBSParameters =
3434
ClassicPBSParameters {
3535
lwe_dimension: LweDimension(796),
@@ -54,7 +54,7 @@ pub const V1_1_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M40: ClassicPBSParameter
5454
modulus_switch_noise_reduction_params: None,
5555
};
5656

57-
// p-fail = 2^-40.298, algorithmic cost ~ 788, 2-norm = 9
57+
/// p-fail = 2^-40.298, algorithmic cost ~ 788, 2-norm = 9
5858
pub const V1_1_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M40: ClassicPBSParameters =
5959
ClassicPBSParameters {
6060
lwe_dimension: LweDimension(925),
@@ -79,7 +79,7 @@ pub const V1_1_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M40: ClassicPBSParameter
7979
modulus_switch_noise_reduction_params: None,
8080
};
8181

82-
// p-fail = 2^-40.107, algorithmic cost ~ 4095, 2-norm = 17
82+
/// p-fail = 2^-40.107, algorithmic cost ~ 4095, 2-norm = 17
8383
pub const V1_1_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M40: ClassicPBSParameters =
8484
ClassicPBSParameters {
8585
lwe_dimension: LweDimension(1096),

tfhe/src/shortint/parameters/v1_1/classic/gaussian/p_fail_2_minus_64/ks_pbs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::shortint::parameters::{
44
MaxNoiseLevel, MessageModulus, PolynomialSize, StandardDev,
55
};
66

7-
// p-fail = 2^-64.01, algorithmic cost ~ 60, 2-norm = 3
7+
/// p-fail = 2^-64.01, algorithmic cost ~ 60, 2-norm = 3
88
pub const V1_1_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters =
99
ClassicPBSParameters {
1010
lwe_dimension: LweDimension(781),
@@ -29,7 +29,7 @@ pub const V1_1_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameter
2929
modulus_switch_noise_reduction_params: None,
3030
};
3131

32-
// p-fail = 2^-64.014, algorithmic cost ~ 106, 2-norm = 5
32+
/// p-fail = 2^-64.014, algorithmic cost ~ 106, 2-norm = 5
3333
pub const V1_1_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters =
3434
ClassicPBSParameters {
3535
lwe_dimension: LweDimension(833),
@@ -54,7 +54,7 @@ pub const V1_1_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameter
5454
modulus_switch_noise_reduction_params: None,
5555
};
5656

57-
// p-fail = 2^-64.177, algorithmic cost ~ 833, 2-norm = 9
57+
/// p-fail = 2^-64.177, algorithmic cost ~ 833, 2-norm = 9
5858
pub const V1_1_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters =
5959
ClassicPBSParameters {
6060
lwe_dimension: LweDimension(977),
@@ -79,7 +79,7 @@ pub const V1_1_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameter
7979
modulus_switch_noise_reduction_params: None,
8080
};
8181

82-
// p-fail = 2^-64.014, algorithmic cost ~ 5893, 2-norm = 17
82+
/// p-fail = 2^-64.014, algorithmic cost ~ 5893, 2-norm = 17
8383
pub const V1_1_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64: ClassicPBSParameters =
8484
ClassicPBSParameters {
8585
lwe_dimension: LweDimension(1110),

tfhe/src/shortint/parameters/v1_1/classic/tuniform/p_fail_2_minus_128/ks_pbs.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::shortint::parameters::{
66
Variance,
77
};
88

9-
// p-fail = 2^-144.044, algorithmic cost ~ 67, 2-norm = 3
10-
// Average number of encryptions of 0s ~ 15, peak noise ~ Variance(0.0000201396668936698)
9+
/// p-fail = 2^-144.044, algorithmic cost ~ 67, 2-norm = 3
10+
/// Average number of encryptions of 0s ~ 15, peak noise ~ Variance(0.0000201396668936698)
1111
pub const V1_1_PARAM_MESSAGE_1_CARRY_1_KS_PBS_TUNIFORM_2M128: ClassicPBSParameters =
1212
ClassicPBSParameters {
1313
lwe_dimension: LweDimension(879),
@@ -33,8 +33,8 @@ pub const V1_1_PARAM_MESSAGE_1_CARRY_1_KS_PBS_TUNIFORM_2M128: ClassicPBSParamete
3333
}),
3434
};
3535

36-
// p-fail = 2^-129.358, algorithmic cost ~ 113, 2-norm = 5
37-
// Average number of encryptions of 0s ~ 17, peak noise ~ Variance(0.00000140546154228955)
36+
/// p-fail = 2^-129.358, algorithmic cost ~ 113, 2-norm = 5
37+
/// Average number of encryptions of 0s ~ 17, peak noise ~ Variance(0.00000140546154228955)
3838
pub const V1_1_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128: ClassicPBSParameters =
3939
ClassicPBSParameters {
4040
lwe_dimension: LweDimension(918),
@@ -60,8 +60,8 @@ pub const V1_1_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128: ClassicPBSParamete
6060
}),
6161
};
6262

63-
// p-fail = 2^-128.771, algorithmic cost ~ 900, 2-norm = 9
64-
// Average number of encryptions of 0s ~ 17, peak noise ~ Variance(8.82526029096167E-8)
63+
/// p-fail = 2^-128.771, algorithmic cost ~ 900, 2-norm = 9
64+
/// Average number of encryptions of 0s ~ 17, peak noise ~ Variance(8.82526029096167E-8)
6565
pub const V1_1_PARAM_MESSAGE_3_CARRY_3_KS_PBS_TUNIFORM_2M128: ClassicPBSParameters =
6666
ClassicPBSParameters {
6767
lwe_dimension: LweDimension(1077),
@@ -87,8 +87,8 @@ pub const V1_1_PARAM_MESSAGE_3_CARRY_3_KS_PBS_TUNIFORM_2M128: ClassicPBSParamete
8787
}),
8888
};
8989

90-
// p-fail = 2^-141.493, algorithmic cost ~ 11860, 2-norm = 17
91-
// Average number of encryptions of 0s ~ 31, peak noise ~ Variance(5.00776611824111E-9)
90+
/// p-fail = 2^-141.493, algorithmic cost ~ 11860, 2-norm = 17
91+
/// Average number of encryptions of 0s ~ 31, peak noise ~ Variance(5.00776611824111E-9)
9292
pub const V1_1_PARAM_MESSAGE_4_CARRY_4_KS_PBS_TUNIFORM_2M128: ClassicPBSParameters =
9393
ClassicPBSParameters {
9494
lwe_dimension: LweDimension(1117),

tfhe/src/shortint/parameters/v1_1/classic/tuniform/p_fail_2_minus_40/ks_pbs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::shortint::parameters::{
44
MaxNoiseLevel, MessageModulus, PolynomialSize,
55
};
66

7-
// p-fail = 2^-40.525, algorithmic cost ~ 49, 2-norm = 3
7+
/// p-fail = 2^-40.525, algorithmic cost ~ 49, 2-norm = 3
88
pub const V1_1_PARAM_MESSAGE_1_CARRY_1_KS_PBS_TUNIFORM_2M40: ClassicPBSParameters =
99
ClassicPBSParameters {
1010
lwe_dimension: LweDimension(799),
@@ -25,7 +25,7 @@ pub const V1_1_PARAM_MESSAGE_1_CARRY_1_KS_PBS_TUNIFORM_2M40: ClassicPBSParameter
2525
modulus_switch_noise_reduction_params: None,
2626
};
2727

28-
// p-fail = 2^-57.015, algorithmic cost ~ 107, 2-norm = 5
28+
/// p-fail = 2^-57.015, algorithmic cost ~ 107, 2-norm = 5
2929
pub const V1_1_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M40: ClassicPBSParameters =
3030
ClassicPBSParameters {
3131
lwe_dimension: LweDimension(839),
@@ -46,7 +46,7 @@ pub const V1_1_PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M40: ClassicPBSParameter
4646
modulus_switch_noise_reduction_params: None,
4747
};
4848

49-
// p-fail = 2^-50.002, algorithmic cost ~ 816, 2-norm = 9
49+
/// p-fail = 2^-50.002, algorithmic cost ~ 816, 2-norm = 9
5050
pub const V1_1_PARAM_MESSAGE_3_CARRY_3_KS_PBS_TUNIFORM_2M40: ClassicPBSParameters =
5151
ClassicPBSParameters {
5252
lwe_dimension: LweDimension(958),
@@ -67,7 +67,7 @@ pub const V1_1_PARAM_MESSAGE_3_CARRY_3_KS_PBS_TUNIFORM_2M40: ClassicPBSParameter
6767
modulus_switch_noise_reduction_params: None,
6868
};
6969

70-
// p-fail = 2^-41.009, algorithmic cost ~ 4165, 2-norm = 17
70+
/// p-fail = 2^-41.009, algorithmic cost ~ 4165, 2-norm = 17
7171
pub const V1_1_PARAM_MESSAGE_4_CARRY_4_KS_PBS_TUNIFORM_2M40: ClassicPBSParameters =
7272
ClassicPBSParameters {
7373
lwe_dimension: LweDimension(1077),

0 commit comments

Comments
 (0)