Add placeholders for cost model

This commit is contained in:
microproofs 2023-08-02 11:16:14 -04:00 committed by Kasey
parent 33d6d3049e
commit 40e1d39f8b
1 changed files with 34 additions and 6 deletions

View File

@ -145,8 +145,15 @@ impl MachineCosts {
mem: 100, mem: 100,
cpu: 23000, cpu: 23000,
}, },
constr: todo!(), // Placeholder values
case: todo!(), constr: ExBudget {
mem: 40000000,
cpu: 400000000000,
},
case: ExBudget {
mem: 40000000,
cpu: 400000000000,
},
} }
} }
} }
@ -184,8 +191,15 @@ impl Default for MachineCosts {
mem: 100, mem: 100,
cpu: 23000, cpu: 23000,
}, },
constr: todo!(), // Placeholder values
case: todo!(), constr: ExBudget {
mem: 40000000,
cpu: 400000000000,
},
case: ExBudget {
mem: 40000000,
cpu: 400000000000,
},
} }
} }
} }
@ -2238,8 +2252,22 @@ pub fn initialize_cost_model(version: &Language, costs: &[i64]) -> CostModel {
.get("cek_builtin_cost-exBudgetCPU") .get("cek_builtin_cost-exBudgetCPU")
.unwrap_or(&30000000000), .unwrap_or(&30000000000),
}, },
constr: todo!(), constr: ExBudget {
case: todo!(), mem: *cost_map
.get("cek_constr_cost-exBudgetmem")
.unwrap_or(&30000000000),
cpu: *cost_map
.get("cek_constr_cost-exBudgetCPU")
.unwrap_or(&30000000000),
},
case: ExBudget {
mem: *cost_map
.get("cek_case_cost-exBudgetmem")
.unwrap_or(&30000000000),
cpu: *cost_map
.get("cek_case_cost-exBudgetCPU")
.unwrap_or(&30000000000),
},
}, },
builtin_costs: BuiltinCosts { builtin_costs: BuiltinCosts {
add_integer: CostingFun { add_integer: CostingFun {