Skip to content

Commit

Permalink
Update server key initialization and destruction for workers
Browse files Browse the repository at this point in the history
Co-authored-by: Dimitris Mouris <[email protected]>
  • Loading branch information
cgouert and jimouris committed Sep 6, 2023
1 parent 747cdf3 commit c1da8f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,9 @@ impl<'a> EvalCircuit<FheType> for ArithCircuit<'a> {
.map(|(i, (key, value))| ((key, i), Arc::new(RwLock::new(value.clone()))))
.unzip();

set_server_key(self.server_key.clone());
rayon::broadcast(|_| set_server_key(self.server_key.clone()));

// For each level
let total_levels = self.circuit.level_map.len();
for (level, gates) in self
Expand Down Expand Up @@ -917,7 +918,9 @@ impl<'a> EvalCircuit<FheType> for ArithCircuit<'a> {
});
println!(" Evaluated gates in level [{}/{}]", level, total_levels);
}

rayon::broadcast(|_| unset_server_key());
unset_server_key();

key_to_index
.iter()
Expand Down

0 comments on commit c1da8f6

Please sign in to comment.