Skip to content

Commit

Permalink
chore(wasm): allow parallel generation of shortint server key
Browse files Browse the repository at this point in the history
  • Loading branch information
soonum committed Mar 14, 2024
1 parent 20d92af commit 54ba8de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tfhe/src/shortint/engine/server_side.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl ShortintEngine {
) -> CompressedServerKey {
let bootstrapping_key = match cks.parameters.pbs_parameters().unwrap() {
crate::shortint::PBSParameters::PBS(pbs_params) => {
#[cfg(not(feature = "__wasm_api"))]
#[cfg(any(not(feature = "__wasm_api"), feature = "parallel-wasm-api"))]
let bootstrapping_key = par_allocate_and_generate_new_seeded_lwe_bootstrap_key(
&cks.small_lwe_secret_key(),
&cks.glwe_secret_key,
Expand All @@ -203,7 +203,7 @@ impl ShortintEngine {
&mut self.seeder,
);

#[cfg(feature = "__wasm_api")]
#[cfg(all(feature = "__wasm_api", not(feature = "parallel-wasm-api")))]
let bootstrapping_key = allocate_and_generate_new_seeded_lwe_bootstrap_key(
&cks.small_lwe_secret_key(),
&cks.glwe_secret_key,
Expand All @@ -217,7 +217,7 @@ impl ShortintEngine {
ShortintCompressedBootstrappingKey::Classic(bootstrapping_key)
}
crate::shortint::PBSParameters::MultiBitPBS(pbs_params) => {
#[cfg(not(feature = "__wasm_api"))]
#[cfg(any(not(feature = "__wasm_api"), feature = "parallel-wasm-api"))]
let bootstrapping_key =
par_allocate_and_generate_new_seeded_lwe_multi_bit_bootstrap_key(
&cks.small_lwe_secret_key(),
Expand All @@ -230,7 +230,7 @@ impl ShortintEngine {
&mut self.seeder,
);

#[cfg(feature = "__wasm_api")]
#[cfg(all(feature = "__wasm_api", not(feature = "parallel-wasm-api")))]
let bootstrapping_key =
allocate_and_generate_new_seeded_lwe_multi_bit_bootstrap_key(
&cks.small_lwe_secret_key(),
Expand Down
Empty file.

0 comments on commit 54ba8de

Please sign in to comment.