You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implemented a draft (but not complete -- consideration of inverter cost is missing, and maybe some more details, plus documentation and tests etc. are also missing) during research but didn't need it in the end, so just to keep a back-up here in case someone decides that it's useful and makes a PR in the future.
As a public member function of depth_view:
voidALAP()
{
_levels.reset( 0 );
this->incr_trav_id();
this->foreach_po( [&]( autoconst& f ) {
constauto n = this->get_node( f );
if ( !this->is_constant( n ) && this->visited( n ) != this->trav_id() && !this->is_pi( n ) )
{
_levels[n] = _depth;
compute_levels_ALAP( n );
}
} );
}
As a private member function of depth_view:
voidcompute_levels_ALAP( node const& n )
{
this->set_visited( n, this->trav_id() );
this->foreach_fanin( n, [&]( autoconst& fi ) {
autoconst ni = this->get_node( fi );
if ( !this->is_constant( ni ) && !this->is_pi( ni ) )
{
assert( _levels[n] >= _cost_fn( *this, ni ) );
auto fi_level = _levels[n] - _cost_fn( *this, ni );
if ( this->visited( ni ) != this->trav_id() || _levels[ni] > fi_level )
{
_levels[ni] = fi_level;
compute_levels_ALAP( ni );
}
}
} );
}
The text was updated successfully, but these errors were encountered:
I implemented a draft (but not complete -- consideration of inverter cost is missing, and maybe some more details, plus documentation and tests etc. are also missing) during research but didn't need it in the end, so just to keep a back-up here in case someone decides that it's useful and makes a PR in the future.
As a public member function of
depth_view
:As a private member function of
depth_view
:The text was updated successfully, but these errors were encountered: