mirror of
https://github.com/Sunscreen-tech/Sunscreen.git
synced 2026-04-19 03:00:06 -04:00
fmt fixes
This commit is contained in:
@@ -13,10 +13,14 @@ async fn main() {
|
||||
|
||||
#[fhe_program(scheme = "bfv")]
|
||||
fn add_squares(a: Cipher<Signed>, b: Cipher<Signed>) -> Cipher<Signed> {
|
||||
a*a + b*b
|
||||
a * a + b * b
|
||||
}
|
||||
|
||||
let app = Compiler::new().fhe_program(mad).fhe_program(add_squares).compile().unwrap();
|
||||
let app = Compiler::new()
|
||||
.fhe_program(mad)
|
||||
.fhe_program(add_squares)
|
||||
.compile()
|
||||
.unwrap();
|
||||
|
||||
let runtime = Runtime::new_fhe(app.params()).unwrap();
|
||||
|
||||
@@ -27,20 +31,20 @@ async fn main() {
|
||||
let c = a.clone();
|
||||
|
||||
let args1: Vec<FheProgramInput> = vec![a.clone().into(), b.clone().into(), c.clone().into()];
|
||||
|
||||
|
||||
runtime
|
||||
.debug_fhe_program(
|
||||
app.get_fhe_program("mad").unwrap(),
|
||||
args1,
|
||||
&public,
|
||||
&private.0,
|
||||
&mad.source()
|
||||
&mad.source(),
|
||||
)
|
||||
.await;
|
||||
|
||||
// TODO: figure out how to set it up so that we can have multiple running at the same time
|
||||
// maybe set up a server once at the start of the main method, then just have endpoints like
|
||||
// /programs/{function name} to be able to see
|
||||
// maybe set up a server once at the start of the main method, then just have endpoints like
|
||||
// /programs/{function name} to be able to see
|
||||
let args2: Vec<FheProgramInput> = vec![a.clone().into(), b.clone().into()];
|
||||
|
||||
runtime
|
||||
@@ -49,7 +53,7 @@ async fn main() {
|
||||
args2,
|
||||
&public,
|
||||
&private.0,
|
||||
&add_squares.source()
|
||||
&add_squares.source(),
|
||||
)
|
||||
.await;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user