File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,20 +7,20 @@ namespace caffe {
77
88/* *
99 * A minimal wrapper for boost::thread to force host compilation for boost
10- * Defined in caffe/util/thread_wrapper.cpp
10+ * Defined in caffe/util/thread.hpp
1111 */
12- class ThreadWrapper {
12+ class Thread {
1313 public:
1414 template <typename Callable, class A1 >
15- ThreadWrapper (Callable func, A1 a1);
15+ Thread (Callable func, A1 a1);
1616 void join ();
1717 bool joinable ();
1818 private:
1919 void * thread_;
2020};
2121
2222/* *
23- * Virutal class encapsulate boost::thread for use in base class
23+ * Virtual class encapsulate boost::thread for use in base class
2424 * The child class will acquire the ability to run a single thread,
2525 * by reimplementing the virutal function InternalThreadEntry.
2626 */
Original file line number Diff line number Diff line change 1- #ifndef CAFFE_THREAD_WRAPPER_CPP_HPP_
2- #define CAFFE_THREAD_WRAPPER_CPP_HPP_
1+ #ifndef CAFFE_THREAD_CPP_HPP_
2+ #define CAFFE_THREAD_CPP_HPP_
33
44#include < boost/thread.hpp>
55#include " caffe/common.hpp"
88namespace caffe {
99
1010template <typename Callable, class A1 >
11- ThreadWrapper::ThreadWrapper (Callable func, A1 a1) {
11+ Thread::Thread (Callable func, A1 a1) {
1212 this ->thread_ = new boost::thread (func, a1);
1313}
1414
15- void ThreadWrapper ::join () {
15+ void Thread ::join () {
1616 static_cast <boost::thread*>(this ->thread_ )->join ();
1717}
1818
19- bool ThreadWrapper ::joinable () {
19+ bool Thread ::joinable () {
2020 return static_cast <boost::thread*>(this ->thread_ )->joinable ();
2121}
2222
Original file line number Diff line number Diff line change 11#include " caffe/internal_thread.hpp"
22
3- #include " caffe/util/thread_wrapper .hpp"
3+ #include " caffe/util/thread .hpp"
44
55namespace caffe {
66
You can’t perform that action at this time.
0 commit comments