working kmeans test

This commit is contained in:
Ubuntu
2021-11-30 04:17:53 +00:00
parent 51e5bfdf28
commit 201f41d941
4 changed files with 6 additions and 7 deletions

View File

@@ -1,8 +1,8 @@
int main(__attribute__((private(0))) int a[200], __attribute__((private(1))) int b[200])
{
int D = 2;
int NA = 50;
int NB = 50;
int NA = 10;
int NB = 10;
int NC = 5;
int PRECISION = 4;
int LEN = NA + NB;

View File

@@ -211,7 +211,6 @@ fn build_ilp(c: &Computation, costs: &CostModel) -> SharingMap {
variable().binary(),
format!("c_{}_{}2{}", def_i, from_ty.char(), to_ty.char()),
);
dbg!((from_ty, to_ty));
conv_vars.insert(
(def.clone(), *from_ty, *to_ty),
(v, *costs.conversions.get(&(*from_ty, *to_ty)).unwrap()),

View File

@@ -205,16 +205,16 @@ impl ToABY {
}
/// Return constant gate evaluating to 0
// TODO: const should not be hardcoded to bcirc
// TODO: const should not be hardcoded to acirc
#[allow(dead_code)]
fn zero() -> String {
format!("bcirc->PutCONSGate((uint64_t)0, (uint32_t)1)")
format!("acirc->PutCONSGate((uint64_t)0, (uint32_t)1)")
}
/// Return constant gate evaluating to 1
// TODO: const should not be hardcoded to bcirc
// TODO: const should not be hardcoded to acirc
fn one() -> String {
format!("bcirc->PutCONSGate((uint64_t)1, (uint32_t)1)")
format!("acirc->PutCONSGate((uint64_t)1, (uint32_t)1)")
}
fn remove_cons_gate(&self, circ: String) -> String {