Download OpenTimer_OpenTimer/ot/timer/cppr.hpp from SAIFIINDUSTRIES/verilog_data-2: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/OpenTimer_OpenTimer/ot/timer/cppr.hpp
- Command line
-
hf download hf://datasets/SAIFIINDUSTRIES/verilog_data-2/OpenTimer_OpenTimer/ot/timer/cppr.hpp
-
curl -L -o cppr.hpp https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/OpenTimer_OpenTimer/ot/timer/cppr.hpp
1.39 kB
| namespace ot { | |
| // Forward declaration | |
| class Pin; | |
| // ---------------------------------------------------------------------------- | |
| // Struct: CpprAnalysis | |
| struct CpprAnalysis { | |
| // TODO | |
| }; | |
| // ---------------------------------------------------------------------------- | |
| // Struct: Cppr | |
| struct Cppr { | |
| Pin& pin; | |
| Tran rf; | |
| float credit; | |
| inline Cppr(Pin&, Tran, float); | |
| inline operator float() const; | |
| }; | |
| // Constructor | |
| inline Cppr::Cppr(Pin& pin, Tran rf, float c) : | |
| pin {pin}, | |
| rf {rf}, | |
| credit {c} { | |
| } | |
| // operator | |
| inline Cppr::operator float() const { | |
| return credit; | |
| } | |
| // ---------------------------------------------------------------------------- | |
| // CpprCache: The internal thread-local storage for cppr. | |
| class CpprCache { | |
| friend class Timer; | |
| public: | |
| CpprCache(size_t); | |
| CpprCache(const CpprCache&) = delete; | |
| CpprCache(CpprCache&&); | |
| ~CpprCache(); | |
| CpprCache& operator = (const CpprCache&) = delete; | |
| CpprCache& operator = (CpprCache&&) = delete; | |
| private: | |
| inline thread_local static std::vector<std::optional<size_t>> __capp; | |
| size_t _capb; // beg | |
| size_t _cape; // end | |
| std::unordered_set<size_t> _pins; | |
| }; | |
| }; // end of namespace ot. ----------------------------------------------------------------------- | |