Function UpdateVarDescedantsList(const std::vector<ComponentVarAndCls>&, VariableIndex, std::vector<bool>&, std::vector<ComponentVarAndCls>, VariableIndex)

Function Documentation

VariableIndex UpdateVarDescedantsList(const std::vector<ComponentVarAndCls> &ref_vars, VariableIndex ref_num_vars, std::vector<bool> &varInDescendants, std::vector<ComponentVarAndCls> descendant_vars, VariableIndex desc_num_vars)

Helper function for determining freed variables.

It goes through a list of variables and marks any that appears in the descendant list. If it is appears, then it is by definition not free.

See
ref_vars (exclusive)
See
ref_vars. This is a set of non-free vars.
See
descendant_vars (exclusive)
Return
Number of descendant elements marked as present
Parameters
  • ref_vars: Superset list of reference variables.
  • ref_num_vars: Number of variables in
Parameters
  • varInDescendants: One to one mapping of variables currently or previous marked as non-free. A variable should only ever be marked as non-free (i.e., true).
  • descendant_vars: Subset of
Parameters
  • desc_num_vars: Number of variables in