mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
fix(runtime): enable concurrent key usage by cloning it on get operation.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include "concrete-ffi.h"
|
||||
#include "zamalang/Runtime/context.h"
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -6,5 +7,10 @@ LweKeyswitchKey_u64 *get_keyswitch_key(RuntimeContext *context) {
|
||||
}
|
||||
|
||||
LweBootstrapKey_u64 *get_bootstrap_key(RuntimeContext *context) {
|
||||
return context->bsk;
|
||||
int err;
|
||||
LweBootstrapKey_u64 *clone =
|
||||
clone_lwe_bootstrap_key_u64(&err, context->bsk);
|
||||
if (err != 0)
|
||||
fprintf(stderr, "Runtime: cloning bootstrap key failed.\n");
|
||||
return clone;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user