Skip to content

Commit

Permalink
chore(fhe_strings): remove some par_bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeul-zama committed Oct 24, 2024
1 parent 5fa5da3 commit be4be61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 3 additions & 5 deletions tfhe/examples/fhe_strings/server_key/no_patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ impl ServerKey {
// Subtraction by 32 makes the character uppercase
uppercase
.chars_mut()
.iter_mut()
.zip(lowercase_chars)
.par_bridge()
.par_iter_mut()
.zip(lowercase_chars.into_par_iter())
.for_each(|(char, is_lowercase)| {
let mut subtract = self.key.create_trivial_radix(32, 4);

Expand Down Expand Up @@ -206,9 +205,8 @@ impl ServerKey {
// Addition by 32 makes the character lowercase
lowercase
.chars_mut()
.iter_mut()
.par_iter_mut()
.zip(uppercase_chars)
.par_bridge()
.for_each(|(char, is_uppercase)| {
let mut add = self.key.create_trivial_radix(32, 4);

Expand Down
5 changes: 2 additions & 3 deletions tfhe/examples/fhe_strings/server_key/trim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ impl SplitAsciiWhitespace {
// Apply the mask to get the result
result
.chars_mut()
.iter_mut()
.zip(mask.chars())
.par_bridge()
.par_iter_mut()
.zip(mask.chars().par_iter())
.for_each(|(char, mask_u8)| {
sk.key
.bitand_assign_parallelized(char.ciphertext_mut(), mask_u8.ciphertext());
Expand Down

0 comments on commit be4be61

Please sign in to comment.