Type Alias tract_hir::infer::InferenceModelPatch

source ·
pub type InferenceModelPatch = ModelPatch<InferenceFact, Box<dyn InferenceOp>>;
Expand description

A ModelPatch for InferenceModel.

Aliased Type§

struct InferenceModelPatch {
    pub context: Vec<String>,
    pub dont_apply_twice: Option<String>,
    pub model: Graph<InferenceFact, Box<dyn InferenceOp>>,
    pub inputs: HashMap<usize, usize>,
    pub taps: HashMap<OutletId, OutletId>,
    pub shunts: HashMap<OutletId, OutletId>,
    pub obliterate: Vec<usize>,
}

Fields§

§context: Vec<String>

patch label for auditing and debugging

§dont_apply_twice: Option<String>

optimizer will ignore this patch in node to node loop if it was already encountered

§model: Graph<InferenceFact, Box<dyn InferenceOp>>

the model-like ‘patch’ of nodes to add to the model

§inputs: HashMap<usize, usize>

map of replaced inputs (patch node id to model node id)

§taps: HashMap<OutletId, OutletId>

map of patch inputs to model wires

§shunts: HashMap<OutletId, OutletId>

map of old model wires to be replaced by wires from the patch

§obliterate: Vec<usize>

operations to discard from the model