mirror of
https://github.com/circify/circ.git
synced 2026-04-21 03:00:54 -04:00
More efficient comparison calls (#14)
This commit is contained in:
@@ -272,12 +272,11 @@ impl ToABY {
|
||||
|
||||
match op {
|
||||
BvBinPred::Uge => {
|
||||
let eq = self.embed_eq(t.clone(), &t.cs[0], &t.cs[1]);
|
||||
self.cache.insert(
|
||||
t.clone(),
|
||||
EmbeddedTerm::Bool(format!(
|
||||
"((BooleanCircuit *)circ)->PutORGate(circ->PutGTGate({}, {}), {})",
|
||||
a, b, eq
|
||||
"((BooleanCircuit *)circ)->PutINVGate(circ->PutGTGate({}, {}))",
|
||||
b, a
|
||||
)),
|
||||
);
|
||||
}
|
||||
@@ -288,12 +287,11 @@ impl ToABY {
|
||||
);
|
||||
}
|
||||
BvBinPred::Ule => {
|
||||
let eq = self.embed_eq(t.clone(), &t.cs[0], &t.cs[1]);
|
||||
self.cache.insert(
|
||||
t.clone(),
|
||||
EmbeddedTerm::Bool(format!(
|
||||
"((BooleanCircuit *)circ)->PutORGate(circ->PutGTGate({}, {}), {})",
|
||||
b, a, eq
|
||||
"((BooleanCircuit *)circ)->PutINVGate(circ->PutGTGate({}, {}))",
|
||||
a, b
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user