Skip to content

Commit

Permalink
chore(doc): rename acc->lut to better match shortint API naming in do…
Browse files Browse the repository at this point in the history
…ctest
  • Loading branch information
IceTDrinker committed Feb 5, 2024
1 parent 90da50d commit a0b75d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tfhe/src/shortint/server_key/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,8 @@ impl ServerKey {
///
/// // Generate the lookup table for the function f: x -> x*x mod 4
/// let f = |x: u64| x.pow(2) % 4;
/// let acc = sks.generate_lookup_table(f);
/// let ct_res = sks.apply_lookup_table(&ct, &acc);
/// let lut = sks.generate_lookup_table(f);
/// let ct_res = sks.apply_lookup_table(&ct, &lut);
///
/// let dec = cks.decrypt(&ct_res);
/// // 3**2 mod 4 = 1
Expand Down Expand Up @@ -596,8 +596,8 @@ impl ServerKey {
/// // Generate the lookup table on message for the function f: x -> x*x
/// let f = |x: u64| x.pow(2);
///
/// let acc = sks.generate_msg_lookup_table(f, ct.message_modulus);
/// let ct_res = sks.apply_lookup_table(&ct, &acc);
/// let lut = sks.generate_msg_lookup_table(f, ct.message_modulus);
/// let ct_res = sks.apply_lookup_table(&ct, &lut);
///
/// let dec = cks.decrypt(&ct_res);
/// // 3^2 mod 4 = 1
Expand Down Expand Up @@ -706,8 +706,8 @@ impl ServerKey {
/// let modulus = cks.parameters.message_modulus().0 as u64;
///
/// // Generate the lookup table for the function f: x -> x*x*x mod 4
/// let acc = sks.generate_lookup_table(|x| x * x * x % modulus);
/// let ct_res = sks.apply_lookup_table(&ct, &acc);
/// let lut = sks.generate_lookup_table(|x| x * x * x % modulus);
/// let ct_res = sks.apply_lookup_table(&ct, &lut);
///
/// let dec = cks.decrypt(&ct_res);
/// // (3*3*3) mod 4 = 3
Expand Down

0 comments on commit a0b75d9

Please sign in to comment.