Download OpenTimer_OpenTimer/ot/taskflow/utility/singleton.hpp from SAIFIINDUSTRIES/verilog_data-2: direct link, hf CLI and curl.
- Browser
- Download file 553 Bytes
-
https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/OpenTimer_OpenTimer/ot/taskflow/utility/singleton.hpp
- Command line
-
hf download hf://datasets/SAIFIINDUSTRIES/verilog_data-2/OpenTimer_OpenTimer/ot/taskflow/utility/singleton.hpp
-
curl -L -o singleton.hpp https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/OpenTimer_OpenTimer/ot/taskflow/utility/singleton.hpp
553 Bytes
| namespace tf { | |
| /** @class Singleton | |
| @brief class template to create a thread-safe singleton object | |
| */ | |
| template <typename T> | |
| class Singleton { | |
| public: | |
| /** | |
| @brief get a reference to the singleton object | |
| */ | |
| inline static T& get() { | |
| static T instance; | |
| return instance; | |
| } | |
| private: | |
| Singleton() = default; | |
| ~Singleton() = default; | |
| Singleton(const Singleton&)= delete; | |
| Singleton& operator=(const Singleton&)= delete; | |
| }; | |
| } // end of namespace tf ----------------------------------------------------- | |