mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 14:47:56 -05:00
chore: detect degree in compact list conformance
This commit is contained in:
committed by
Nicolas Sarlin
parent
f8ee0b3649
commit
4d6aeebd0c
@@ -105,15 +105,15 @@ fn main() {
|
||||
let msgs = [27, 188u8];
|
||||
let mut builder = CompactCiphertextList::builder(&public_key);
|
||||
builder.extend(msgs.iter().copied());
|
||||
let compact_list = builder.build();
|
||||
let compact_list = builder.build_packed();
|
||||
|
||||
let mut buffer = vec![];
|
||||
safe_serialize(&compact_list, &mut buffer, 1 << 20).unwrap();
|
||||
|
||||
let conformance_params = CompactCiphertextListConformanceParams {
|
||||
shortint_params: params_1.to_shortint_conformance_param(),
|
||||
num_elements_constraint: ListSizeConstraint::exact_size(2),
|
||||
};
|
||||
let conformance_params =
|
||||
CompactCiphertextListConformanceParams::from_parameters_and_size_constraint(
|
||||
params_1.try_into().unwrap(),
|
||||
ListSizeConstraint::exact_size(2));
|
||||
safe_deserialize_conformant::<CompactCiphertextList>(buffer.as_slice(), 1 << 20, &conformance_params)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user