internal_thread.hpp
#ifndef CAFFE_INTERNAL_THREAD_HPP_
#define CAFFE_INTERNAL_THREAD_HPP_
#include "caffe/common.hpp"
namespace boost { class thread; }
namespace caffe {
class InternalThread {
public:
InternalThread() : thread_() {}
virtual ~InternalThread();
void StartInternalThread();
void StopInternalThread();
bool is_started() const;
protected:
/* Implement this method in your subclass
with the code you want your thread to run. */
virtual void InternalThreadEntry() {}
/* Should be tested when running loops to exit when requested. */
bool must_stop();
private:
void entry(int device, Caffe::Brew mode, int rand_seed,
int solver_count, int solver_rank, bool multiprocess);
shared_ptr<boost::thread> thread_;
};
} // namespace caffe
#endif // CAFFE_INTERNAL_THREAD_HPP_
caffe::InternalThread::StartInternalThread
void StartInternalThread()
Definition: internal_thread.cpp:21
boost
Definition: internal_thread.hpp:10
caffe::InternalThread::StopInternalThread
void StopInternalThread()
Definition: internal_thread.cpp:56
caffe
A layer factory that allows one to register layers. During runtime, registered layers can be called b...
Definition: blob.hpp:14
caffe::InternalThread
Definition: internal_thread.hpp:19