-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tm/boolean ifthenelse #1155
Tm/boolean ifthenelse #1155
Conversation
This adds a prelude to integer. To access blocks from an integer ciphertext, some traits needs to be in scope. The common way to make it easy for end users it via a prelude. ```rust use tfhe::integer::prelude::*; ```
ca55f6a
to
e304d88
Compare
pub fn if_then_else_parallelized<T>( | ||
fn if_then_else_parallelized( | ||
&self, | ||
condition: &BooleanBlock, | ||
true_ct: &BooleanBlock, | ||
false_ct: &BooleanBlock, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this one tested ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a docstring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the docstrings are inverted 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small question about tests
66f5c98
to
cdfc783
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
make pcc 😭 |
This adds if_then_else/cmux on BoleanBlock for integer API and FheBool for HLAPI. To have the same name for both default version of the API in integer a trait was introduced. Ideally we would have wanted to do the boolean cmux in one PBS by packing data like this `(cond * 4) + (if * 2) + else` but this would not respect the max norm2. BREAKING CHANGE: integer::ServerKey::if_then_else_parallelized requires the trait ServerKeyDefaultCMux to be in scope.
cdfc783
to
b7b0651
Compare
This adds if_then_else/cmux on BoleanBlock for integer API
and FheBool for HLAPI.
To have the same name for both default version of the API
in integer a trait was introduced.
Ideally we would have wanted to do the boolean cmux in one PBS by
packing data like this
(cond * 4) + (if * 2) + else
but thiswould not respect the max norm2.
BREAKING CHANGE: integer::ServerKey::if_then_else_parallelized requires the
trait ServerKeyDefaultCMux to be in scope.
Fixes #825
This PR also has the commit that creates the prelude