cairo_lang_sierra_gas

Function compute_postcost_info

source
pub fn compute_postcost_info<CostType: PostCostTypeEx>(
    program: &Program,
    get_ap_change_fn: &dyn Fn(&StatementIdx) -> usize,
    precost_gas_info: &GasInfo,
    enforced_function_costs: &OrderedHashMap<FunctionId, CostType>,
) -> Result<GasInfo, CostError>
Expand description

Calculates gas postcost information for a given program.

CostType can be either i32 to get the total gas cost for CASM generation, or ConstCost to get the separate components (steps, holes, range-checks).