Download modules/gapi/src/streaming/onevpl/accelerators/utils/shared_lock.hpp from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/tgollogly/test/resolve/main/modules/gapi/src/streaming/onevpl/accelerators/utils/shared_lock.hpp
- Command line
-
hf download hf://tgollogly/test/modules/gapi/src/streaming/onevpl/accelerators/utils/shared_lock.hpp
-
curl -L -o shared_lock.hpp https://huggingface.co/tgollogly/test/resolve/main/modules/gapi/src/streaming/onevpl/accelerators/utils/shared_lock.hpp
1.19 kB
| // This file is part of OpenCV project. | |
| // It is subject to the license terms in the LICENSE file found in the top-level directory | |
| // of this distribution and at http://opencv.org/license.html. | |
| // | |
| // Copyright (C) 2021 Intel Corporation | |
| namespace cv { | |
| namespace gapi { | |
| namespace wip { | |
| namespace onevpl { | |
| class GAPI_EXPORTS SharedLock { | |
| public: | |
| SharedLock(); | |
| ~SharedLock() = default; | |
| size_t shared_lock(); | |
| size_t unlock_shared(); | |
| void lock(); | |
| bool try_lock(); | |
| void unlock(); | |
| bool owns() const; | |
| private: | |
| SharedLock(const SharedLock&) = delete; | |
| SharedLock& operator= (const SharedLock&) = delete; | |
| SharedLock(SharedLock&&) = delete; | |
| SharedLock& operator== (SharedLock&&) = delete; | |
| std::atomic<bool> exclusive_lock; | |
| std::atomic<size_t> shared_counter; | |
| }; | |
| } // namespace onevpl | |
| } // namespace wip | |
| } // namespace gapi | |
| } // namespace cv | |