Skip to content

Commit

Permalink
chore(ci): fix doctest by using parameters with enough precision
Browse files Browse the repository at this point in the history
  • Loading branch information
IceTDrinker committed Feb 26, 2024
1 parent e2e75a3 commit fa9dbc0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions tfhe/src/integer/wopbs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,12 @@ impl WopbsKey {
/// # Example
/// ```rust
/// use tfhe::integer::gen_keys;
/// use tfhe::integer::parameters::PARAM_4_BITS_5_BLOCKS;
/// use tfhe::integer::wopbs::WopbsKey;
/// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS;
///
/// let basis: Vec<u64> = vec![9, 11];
///
/// let param = PARAM_4_BITS_5_BLOCKS;
/// let param = WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS;
/// //Generate the client key and the server key:
/// let (cks, sks) = gen_keys(param);
/// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks);
Expand Down Expand Up @@ -629,12 +629,12 @@ impl WopbsKey {
///
/// ```rust
/// use tfhe::integer::gen_keys;
/// use tfhe::integer::parameters::PARAM_4_BITS_5_BLOCKS;
/// use tfhe::integer::wopbs::WopbsKey;
/// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS;
///
/// let basis: Vec<u64> = vec![9, 11];
///
/// let param = PARAM_4_BITS_5_BLOCKS;
/// let param = WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS;
/// //Generate the client key and the server key:
/// let (cks, sks) = gen_keys(param);
/// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks);
Expand Down Expand Up @@ -941,12 +941,12 @@ impl WopbsKey {
///
/// ```rust
/// use tfhe::integer::gen_keys;
/// use tfhe::integer::parameters::PARAM_4_BITS_5_BLOCKS;
/// use tfhe::integer::wopbs::WopbsKey;
/// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS;
///
/// let basis: Vec<u64> = vec![9, 11];
///
/// let param = PARAM_4_BITS_5_BLOCKS;
/// let param = WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS;
/// //Generate the client key and the server key:
/// let (cks, sks) = gen_keys(param);
/// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks);
Expand Down Expand Up @@ -1013,12 +1013,12 @@ impl WopbsKey {
///
/// ```rust
/// use tfhe::integer::gen_keys;
/// use tfhe::integer::parameters::PARAM_4_BITS_5_BLOCKS;
/// use tfhe::integer::wopbs::WopbsKey;
/// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS;
///
/// let basis: Vec<u64> = vec![9, 11];
///
/// let param = PARAM_4_BITS_5_BLOCKS;
/// let param = WOPBS_PARAM_MESSAGE_4_CARRY_4_KS_PBS;
/// //Generate the client key and the server key:
/// let (cks, sks) = gen_keys(param);
/// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks);
Expand Down
8 changes: 4 additions & 4 deletions tfhe/src/shortint/wopbs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,11 @@ impl WopbsKey {
/// ```rust
/// use rand::Rng;
/// use tfhe::shortint::gen_keys;
/// use tfhe::shortint::parameters::parameters_wopbs::WOPBS_PARAM_MESSAGE_3_NORM2_2_KS_PBS;
/// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS;
/// use tfhe::shortint::wopbs::WopbsKey;
///
/// // Generate the client key and the server key:
/// let (cks, sks) = gen_keys(WOPBS_PARAM_MESSAGE_3_NORM2_2_KS_PBS);
/// let (cks, sks) = gen_keys(WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS);
/// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks);
/// let message_modulus = 5;
/// let m = 2;
Expand Down Expand Up @@ -444,10 +444,10 @@ impl WopbsKey {
///
/// ```rust
/// use tfhe::shortint::gen_keys;
/// use tfhe::shortint::parameters::parameters_wopbs::WOPBS_PARAM_MESSAGE_3_NORM2_2_KS_PBS;
/// use tfhe::shortint::parameters::parameters_wopbs_message_carry::WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS;
/// use tfhe::shortint::wopbs::*;
///
/// let (cks, sks) = gen_keys(WOPBS_PARAM_MESSAGE_3_NORM2_2_KS_PBS);
/// let (cks, sks) = gen_keys(WOPBS_PARAM_MESSAGE_3_CARRY_3_KS_PBS);
/// let wopbs_key = WopbsKey::new_wopbs_key_only_for_wopbs(&cks, &sks);
/// let msg = 2;
/// let modulus = 5;
Expand Down

0 comments on commit fa9dbc0

Please sign in to comment.