39 #ifndef LINEAR_PIPELINE_HPP__ 40 #define LINEAR_PIPELINE_HPP__ 44 #include <boost/bind.hpp> 45 #include <boost/thread.hpp> 46 #include <boost/shared_ptr.hpp> 50 template<
typename WorkTypeA,
typename WorkTypeB>
58 void AddStage(boost::shared_ptr<AbstractStage > stage)
72 boost::shared_ptr<BlockingQueue >(
78 boost::shared_ptr<BlockingQueue >(
84 m_queues[numStage-1], m_queues[numStage]
105 for(
size_t i=0; i<
m_stages.size(); ++i)
108 boost::shared_ptr<boost::thread>(
new boost::thread(
117 for(
size_t i=0; i<
m_stages.size(); ++i)
131 boost::shared_ptr<AbstractStage >
135 boost::shared_ptr<BlockingQueue >
139 boost::shared_ptr<boost::thread>
142 #endif // LinearPipeline_h__
std::vector< boost::shared_ptr< AbstractStage > > m_stages
void AddWork(WorkTypeA work)
void StartStage(size_t index)
std::vector< boost::shared_ptr< BlockingQueue > > m_queues
void AddStage(boost::shared_ptr< AbstractStage > stage)
std::vector< boost::shared_ptr< boost::thread > > m_threads