Classes | |
class | Function |
Copyable function object that invokes Thread::operator(). More... | |
Public Member Functions | |
Thread (SgUctSearch &search, std::auto_ptr< SgUctThreadState > state) | |
~Thread () | |
void | StartPlay () |
void | WaitPlayFinished () |
Public Attributes | |
std::auto_ptr< SgUctThreadState > | m_state |
Private Member Functions | |
void | operator() () |
void | PlayGames () |
Private Attributes | |
SgUctSearch & | m_search |
bool | m_quit |
boost::barrier | m_threadReady |
boost::mutex | m_startPlayMutex |
boost::mutex | m_playFinishedMutex |
boost::condition | m_startPlay |
boost::condition | m_playFinished |
boost::mutex::scoped_lock | m_playFinishedLock |
GlobalLock | m_globalLock |
boost::thread | m_thread |
The thread. | |
Friends | |
class | Thread::Function |
Definition at line 863 of file SgUctSearch.h.
SgUctSearch::Thread::Thread | ( | SgUctSearch & | search, | |
std::auto_ptr< SgUctThreadState > | state | |||
) |
Definition at line 165 of file SgUctSearch.cpp.
References m_threadReady.
SgUctSearch::Thread::~Thread | ( | ) |
Definition at line 182 of file SgUctSearch.cpp.
References m_quit, m_thread, and StartPlay().
void SgUctSearch::Thread::operator() | ( | ) | [private] |
Definition at line 189 of file SgUctSearch.cpp.
References m_globalLock, m_playFinished, m_playFinishedMutex, m_quit, m_search, m_startPlay, m_startPlayMutex, m_state, m_threadReady, SgUctSearch::SearchLoop(), and SgDebug().
void SgUctSearch::Thread::PlayGames | ( | ) | [private] |
void SgUctSearch::Thread::StartPlay | ( | ) |
Definition at line 209 of file SgUctSearch.cpp.
References m_startPlay, and m_startPlayMutex.
Referenced by ~Thread().
void SgUctSearch::Thread::WaitPlayFinished | ( | ) |
Definition at line 214 of file SgUctSearch.cpp.
References m_playFinished, and m_playFinishedLock.
friend class Thread::Function [friend] |
Definition at line 891 of file SgUctSearch.h.
GlobalLock SgUctSearch::Thread::m_globalLock [private] |
Definition at line 909 of file SgUctSearch.h.
Referenced by operator()().
boost::condition SgUctSearch::Thread::m_playFinished [private] |
Definition at line 905 of file SgUctSearch.h.
Referenced by operator()(), and WaitPlayFinished().
boost::mutex::scoped_lock SgUctSearch::Thread::m_playFinishedLock [private] |
Definition at line 907 of file SgUctSearch.h.
Referenced by WaitPlayFinished().
boost::mutex SgUctSearch::Thread::m_playFinishedMutex [private] |
Definition at line 901 of file SgUctSearch.h.
Referenced by operator()().
bool SgUctSearch::Thread::m_quit [private] |
Definition at line 895 of file SgUctSearch.h.
Referenced by operator()(), and ~Thread().
SgUctSearch& SgUctSearch::Thread::m_search [private] |
Definition at line 893 of file SgUctSearch.h.
Referenced by operator()().
boost::condition SgUctSearch::Thread::m_startPlay [private] |
Definition at line 903 of file SgUctSearch.h.
Referenced by operator()(), and StartPlay().
boost::mutex SgUctSearch::Thread::m_startPlayMutex [private] |
Definition at line 899 of file SgUctSearch.h.
Referenced by operator()(), and StartPlay().
std::auto_ptr<SgUctThreadState> SgUctSearch::Thread::m_state |
Definition at line 866 of file SgUctSearch.h.
Referenced by operator()().
boost::thread SgUctSearch::Thread::m_thread [private] |
The thread.
Order dependency: must be constructed as the last member, because the constructor starts the thread.
Definition at line 914 of file SgUctSearch.h.
Referenced by ~Thread().
boost::barrier SgUctSearch::Thread::m_threadReady [private] |
Definition at line 897 of file SgUctSearch.h.
Referenced by operator()(), and Thread().