Download OpenTimer_OpenTimer/ot/timer/pfxt.hpp from SAIFIINDUSTRIES/verilog_data-2: direct link, hf CLI and curl.
- Browser
- Download file 1.59 kB
-
https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/OpenTimer_OpenTimer/ot/timer/pfxt.hpp
- Command line
-
hf download hf://datasets/SAIFIINDUSTRIES/verilog_data-2/OpenTimer_OpenTimer/ot/timer/pfxt.hpp
-
curl -L -o pfxt.hpp https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/OpenTimer_OpenTimer/ot/timer/pfxt.hpp
1.59 kB
| namespace ot { | |
| // Forward declaration | |
| class SfxtCache; | |
| class Arc; | |
| // ------------------------------------------------------------------------------------------------ | |
| // Class: PfxtNode | |
| struct PfxtNode { | |
| float slack; | |
| size_t from; | |
| size_t to; | |
| const Arc* arc {nullptr}; | |
| const PfxtNode* parent {nullptr}; | |
| PfxtNode(float, size_t, size_t, const Arc*, const PfxtNode*); | |
| }; | |
| // ------------------------------------------------------------------------------------------------ | |
| // Class: PfxtCache | |
| class PfxtCache { | |
| friend class Timer; | |
| // Min-heap comparator | |
| struct PfxtNodeComparator { | |
| bool operator () (std::unique_ptr<PfxtNode>& a, std::unique_ptr<PfxtNode>& b) const { | |
| return a->slack > b->slack; | |
| } | |
| }; | |
| public: | |
| inline size_t num_nodes() const; | |
| PfxtCache(const SfxtCache&); | |
| PfxtCache(const PfxtCache&) = delete; | |
| PfxtCache(PfxtCache&&); | |
| PfxtCache& operator = (const PfxtCache&) = delete; | |
| PfxtCache& operator = (PfxtCache&&) = delete; | |
| private: | |
| const SfxtCache& _sfxt; | |
| PfxtNodeComparator _comp; | |
| std::vector<std::unique_ptr<PfxtNode>> _paths; | |
| std::vector<std::unique_ptr<PfxtNode>> _nodes; | |
| void _push(float, size_t, size_t, const Arc*, const PfxtNode*); | |
| PfxtNode* _pop(); | |
| PfxtNode* _top() const; | |
| }; | |
| // Function: num_nodes | |
| inline size_t PfxtCache::num_nodes() const { | |
| return _nodes.size(); | |
| } | |
| }; // end of namespace ot. ---------------------------------------------------------------------- | |