feat(hlapi): Get num_bits from FheUint* types

This commit is contained in:
Titouan Tanguy
2024-07-22 17:27:51 +02:00
committed by titouantanguy
parent d9eca01631
commit fffdc3862e
3 changed files with 12 additions and 0 deletions

View File

@@ -96,6 +96,10 @@ impl FheBool {
self.ciphertext.current_device()
}
pub fn num_bits() -> usize {
1
}
/// Moves (in-place) the ciphertext to the desired device.
///
/// Does nothing if the ciphertext is already in the desired device

View File

@@ -106,6 +106,10 @@ where
}
}
pub fn num_bits() -> usize {
Id::num_bits()
}
/// Moves (in-place) the ciphertext to the desired device.
///
/// Does nothing if the ciphertext is already in the desired device

View File

@@ -151,6 +151,10 @@ where
}
}
pub fn num_bits() -> usize {
Id::num_bits()
}
pub(in crate::high_level_api) fn move_to_device_of_server_key_if_set(&mut self) {
self.ciphertext.move_to_device_of_server_key_if_set();
}