Skip to content

Commit

Permalink
XMG Rewrite.
Browse files Browse the repository at this point in the history
  • Loading branch information
msoeken committed Nov 6, 2017
1 parent 216331b commit 536ec5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/classical/xmg/xmg_rewrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,12 @@ std::vector<xmg_function> xmg_rewrite_top_down_inplace( xmg_graph& dest,
std::map<xmg_node, xmg_function> old_to_new;

old_to_new[0] = dest.get_constant( false );
for ( const auto& pi : index( xmg.inputs() ) )
if ( !pi_mapping.empty() )
{
old_to_new[pi.value.first] = pi_mapping[pi.index];
for ( const auto& pi : index( xmg.inputs() ) )
{
old_to_new[pi.value.first] = pi_mapping[pi.index];
}
}

/* prefill */
Expand Down

0 comments on commit 536ec5e

Please sign in to comment.