OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
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 
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 
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>
39  {
40  }
41 
42  template<typename TDatums, typename TWorker>
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 
58 }
59 
60 #endif // OPENPOSE_THREAD_THREAD_NO_QUEUE_HPP
DELETE_COPY(SubThreadNoQueue)
SubThreadNoQueue(const std::vector< TWorker > &tWorkers)
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")