OpenPose 1.0.0rc2 OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
subThreadNoQueue.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_THREAD_THREAD_NO_QUEUE_HPP
2 #define OPENPOSE_THREAD_THREAD_NO_QUEUE_HPP
3
4 #include <openpose/core/common.hpp>
5 #include <openpose/thread/thread.hpp>
6 #include <openpose/thread/worker.hpp>
7
8 namespace op
9 {
10 template<typename TDatums, typename TWorker = std::shared_ptr<Worker<TDatums>>>
11 class SubThreadNoQueue : public SubThread<TDatums, TWorker>
12 {
13 public:
14 explicit SubThreadNoQueue(const std::vector<TWorker>& tWorkers);
15
16 virtual ~SubThreadNoQueue();
17
18 bool work();
19
20 DELETE_COPY(SubThreadNoQueue);
21 };
22 }
23
24
25
26
27
28 // Implementation
29 namespace op
30 {
31 template<typename TDatums, typename TWorker>
32 SubThreadNoQueue<TDatums, TWorker>::SubThreadNoQueue(const std::vector<TWorker>& tWorkers) :
33 SubThread<TDatums, TWorker>{tWorkers}
34 {
35 }
36
37 template<typename TDatums, typename TWorker>
38 SubThreadNoQueue<TDatums, TWorker>::~SubThreadNoQueue()
39 {
40 }
41
42 template<typename TDatums, typename TWorker>
43 bool SubThreadNoQueue<TDatums, TWorker>::work()
44 {
45 try
46 {
47 TDatums tDatums;
48 return this->workTWorkers(tDatums, true);
49 }
50 catch (const std::exception& e)
51 {
52 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
53 return false;
54 }
55 }
56
57 COMPILE_TEMPLATE_DATUM(SubThreadNoQueue);
58 }
59
60 #endif // OPENPOSE_THREAD_THREAD_NO_QUEUE_HPP
op::SubThread
Definition: subThread.hpp:10
op::SubThreadNoQueue::~SubThreadNoQueue
virtual ~SubThreadNoQueue()
common.hpp
op::error
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
thread.hpp
op::SubThreadNoQueue::work
bool work()
op::SubThreadNoQueue::DELETE_COPY
DELETE_COPY(SubThreadNoQueue)
worker.hpp
op::SubThreadNoQueue::SubThreadNoQueue
SubThreadNoQueue(const std::vector< TWorker > &tWorkers)
Definition: subThreadNoQueue.hpp:32
op::COMPILE_TEMPLATE_DATUM
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)
op::SubThreadNoQueue
Definition: subThreadNoQueue.hpp:11