From 4f2c3d4ca5bf985bd34b0b74e1cd162996b8243e Mon Sep 17 00:00:00 2001 From: James Cherry Date: Sun, 19 Jul 2026 10:28:43 -0700 Subject: [PATCH] thread_count_ -> size_t Signed-off-by: James Cherry --- graph/Graph.cc | 4 ++-- include/sta/Graph.hh | 9 +++++---- include/sta/StaState.hh | 4 ++-- search/Bfs.cc | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/graph/Graph.cc b/graph/Graph.cc index 2e7f4e64..77a2691d 100644 --- a/graph/Graph.cc +++ b/graph/Graph.cc @@ -1045,7 +1045,6 @@ Vertex::init(Pin *pin, slews_ = nullptr; paths_ = nullptr; tag_group_index_ = tag_group_index_max; - bfs_in_queue_ = 0; is_bidirect_drvr_ = is_bidirect_drvr; is_reg_clk_ = is_reg_clk; has_checks_ = false; @@ -1053,10 +1052,11 @@ Vertex::init(Pin *pin, has_downstream_clk_pin_ = false; visited1_ = false; visited2_ = false; - bfs_predecessor_changed_ = false; has_sim_value_ = false; level_ = 0; slew_annotated_ = false; + bfs_in_queue_ = 0; + bfs_predecessor_changed_ = false; } Vertex::~Vertex() diff --git a/include/sta/Graph.hh b/include/sta/Graph.hh index 1d22708f..9229fe42 100644 --- a/include/sta/Graph.hh +++ b/include/sta/Graph.hh @@ -287,15 +287,16 @@ public: void setIsCheckClk(bool is_check_clk); [[nodiscard]] bool hasDownstreamClkPin() const { return has_downstream_clk_pin_; } void setHasDownstreamClkPin(bool has_clk_pin); - [[nodiscard]] bool bfsInQueue(BfsIndex index) const; - void setBfsInQueue(BfsIndex index, bool value); - bool bfsPredecessorChanged() const { return bfs_predecessor_changed_; } - void setBfsPredecessorChanged(bool changed); [[nodiscard]] bool isRegClk() const { return is_reg_clk_; } // Has sim value in some mode. [[nodiscard]] bool hasSimValue() const { return has_sim_value_; } void setHasSimValue(bool has_sim); + [[nodiscard]] bool bfsInQueue(BfsIndex index) const; + void setBfsInQueue(BfsIndex index, bool value); + [[nodiscard]] bool bfsPredecessorChanged() const { return bfs_predecessor_changed_; } + void setBfsPredecessorChanged(bool changed); + // ObjectTable interface. [[nodiscard]] ObjectIdx objectIdx() const { return object_idx_; } void setObjectIdx(ObjectIdx idx); diff --git a/include/sta/StaState.hh b/include/sta/StaState.hh index d0062d7c..e418d683 100644 --- a/include/sta/StaState.hh +++ b/include/sta/StaState.hh @@ -100,7 +100,7 @@ public: const DelayOps *delayOps() const { return delay_ops_; } Latches *latches() { return latches_; } Latches *latches() const { return latches_; } - unsigned threadCount() const { return thread_count_; } + size_t threadCount() const { return thread_count_; } bool crprActive(const Mode *mode) const; Variables *variables() { return variables_; } const Variables *variables() const { return variables_; } @@ -139,7 +139,7 @@ protected: DelayOps *delay_ops_; Latches *latches_; Variables *variables_; - int thread_count_; + size_t thread_count_; DispatchQueue *dispatch_queue_; }; diff --git a/search/Bfs.cc b/search/Bfs.cc index 0cf8bf37..eff1299d 100644 --- a/search/Bfs.cc +++ b/search/Bfs.cc @@ -162,7 +162,7 @@ BfsIterator::visitParallel(Level to_level, else { std::vector visitors; visitors.reserve(thread_count_); - for (int k = 0; k < thread_count_; k++) + for (size_t k = 0; k < thread_count_; k++) visitors.push_back(visitor->copy()); while (levelLessOrEqual(first_level_, last_level_) && levelLessOrEqual(first_level_, to_level)) {