mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-11 15:48:20 -05:00
Compare commits
1 Commits
al/paper_b
...
al/fix_lon
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67f19bfd93 |
@@ -41,10 +41,10 @@ where
|
||||
let clear_mul = |x, y| x * y;
|
||||
// Warning this rotate definition only works with 64-bit ciphertexts
|
||||
let clear_rotate_left = |x: u64, y: u64| x.rotate_left(y as u32);
|
||||
let clear_left_shift = |x, y| x << y;
|
||||
let clear_left_shift = |x: u64, y: u64| x.overflowing_shl(y as u32).0;
|
||||
// Warning this rotate definition only works with 64-bit ciphertexts
|
||||
let clear_rotate_right = |x: u64, y: u64| x.rotate_right(y as u32);
|
||||
let clear_right_shift = |x, y| x >> y;
|
||||
let clear_right_shift = |x: u64, y: u64| x.overflowing_shr(y as u32).0;
|
||||
let clear_max = |x: u64, y: u64| max(x, y);
|
||||
let clear_min = |x: u64, y: u64| min(x, y);
|
||||
|
||||
|
||||
@@ -68,10 +68,10 @@ where
|
||||
let right_shift_executor = GpuMultiDeviceFunctionExecutor::new(&CudaServerKey::right_shift);
|
||||
// Warning this rotate definition only works with 64-bit ciphertexts
|
||||
let clear_rotate_left = |x: i64, y: u64| x.rotate_left(y as u32);
|
||||
let clear_left_shift = |x: i64, y: u64| x << y;
|
||||
let clear_left_shift = |x: i64, y: u64| x.overflowing_shl(y as u32).0;
|
||||
// Warning this rotate definition only works with 64-bit ciphertexts
|
||||
let clear_rotate_right = |x: i64, y: u64| x.rotate_right(y as u32);
|
||||
let clear_right_shift = |x: i64, y: u64| x >> y;
|
||||
let clear_right_shift = |x: i64, y: u64| x.overflowing_shr(y as u32).0;
|
||||
#[allow(clippy::type_complexity)]
|
||||
let mut shift_rotate_ops: Vec<(
|
||||
SignedShiftRotateExecutor,
|
||||
|
||||
@@ -82,10 +82,10 @@ where
|
||||
let clear_mul = |x: u64, y: u64| x.wrapping_mul(y);
|
||||
// Warning this rotate definition only works with 64-bit ciphertexts
|
||||
let clear_rotate_left = |x: u64, y: u64| x.rotate_left(y as u32);
|
||||
let clear_left_shift = |x, y| x << y;
|
||||
let clear_left_shift = |x: u64, y: u64| x.overflowing_shl(y as u32).0;
|
||||
// Warning this rotate definition only works with 64-bit ciphertexts
|
||||
let clear_rotate_right = |x: u64, y: u64| x.rotate_right(y as u32);
|
||||
let clear_right_shift = |x, y| x >> y;
|
||||
let clear_right_shift = |x: u64, y: u64| x.overflowing_shr(y as u32).0;
|
||||
let clear_max = |x: u64, y: u64| max(x, y);
|
||||
let clear_min = |x: u64, y: u64| min(x, y);
|
||||
|
||||
|
||||
@@ -135,10 +135,10 @@ where
|
||||
let right_shift_executor = CpuFunctionExecutor::new(&ServerKey::right_shift_parallelized);
|
||||
// Warning this rotate definition only works with 64-bit ciphertexts
|
||||
let clear_rotate_left = |x: i64, y: u64| x.rotate_left(y as u32);
|
||||
let clear_left_shift = |x: i64, y: u64| x << y;
|
||||
let clear_left_shift = |x: i64, y: u64| x.overflowing_shl(y as u32).0;
|
||||
// Warning this rotate definition only works with 64-bit ciphertexts
|
||||
let clear_rotate_right = |x: i64, y: u64| x.rotate_right(y as u32);
|
||||
let clear_right_shift = |x: i64, y: u64| x >> y;
|
||||
let clear_right_shift = |x: i64, y: u64| x.overflowing_shr(y as u32).0;
|
||||
#[allow(clippy::type_complexity)]
|
||||
let mut rotate_shift_ops: Vec<(
|
||||
SignedShiftRotateExecutor,
|
||||
|
||||
Reference in New Issue
Block a user