Skip to content

Commit

Permalink
Use correct sentinel value for delay
Browse files Browse the repository at this point in the history
Currently we're assigning float-max to a `uint32_t` which is technically
undefined behavior.
  • Loading branch information
rocallahan committed Jun 27, 2024
1 parent bfcee23 commit 3774ed1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/mockturtle/algorithms/emap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4707,7 +4707,7 @@ class emap_impl
#pragma region Cuts and matching utils
void compute_cut_data( cut_t& cut, node<Ntk> const& n )
{
cut->delay = std::numeric_limits<float>::max();
cut->delay = std::numeric_limits<uint32_t>::max();
cut->flow = std::numeric_limits<float>::max();
cut->ignore = false;

Expand Down Expand Up @@ -4767,7 +4767,7 @@ class emap_impl

void compute_cut_data_structural( cut_t& cut, node<Ntk> const& n )
{
cut->delay = std::numeric_limits<float>::max();
cut->delay = std::numeric_limits<uint32_t>::max();
cut->flow = std::numeric_limits<float>::max();
cut->ignore = false;

Expand Down

0 comments on commit 3774ed1

Please sign in to comment.