Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgUctSearch::Thread Class Reference

List of all members.

Detailed Description

Definition at line 926 of file SgUctSearch.h.

Public Member Functions

 Thread (SgUctSearch &search, std::auto_ptr< SgUctThreadState > state)
 ~Thread ()
void StartPlay ()
void WaitPlayFinished ()

Public Attributes

std::auto_ptr< SgUctThreadStatem_state

Private Member Functions

void operator() ()
void PlayGames ()

Private Attributes

SgUctSearchm_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

Classes

class  Function
 Copyable function object that invokes Thread::operator(). More...


Constructor & Destructor Documentation

SgUctSearch::Thread::Thread ( SgUctSearch search,
std::auto_ptr< SgUctThreadState state 
)

Definition at line 122 of file SgUctSearch.cpp.

References m_threadReady.

SgUctSearch::Thread::~Thread (  ) 

Definition at line 139 of file SgUctSearch.cpp.

References m_quit, m_thread, and StartPlay().


Member Function Documentation

void SgUctSearch::Thread::operator() (  )  [private]

Definition at line 146 of file SgUctSearch.cpp.

References DEBUG_THREADS, m_globalLock, m_playFinished, m_playFinishedMutex, m_quit, m_search, m_startPlay, m_startPlayMutex, m_state, m_threadReady, Notify(), SgUctSearch::SearchLoop(), and SgDebug().

void SgUctSearch::Thread::PlayGames (  )  [private]

void SgUctSearch::Thread::StartPlay (  ) 

Definition at line 166 of file SgUctSearch.cpp.

References m_startPlay, m_startPlayMutex, and Notify().

Referenced by ~Thread().

void SgUctSearch::Thread::WaitPlayFinished (  ) 

Definition at line 171 of file SgUctSearch.cpp.

References m_playFinished, and m_playFinishedLock.


Friends And Related Function Documentation

friend class Thread::Function [friend]

Definition at line 955 of file SgUctSearch.h.


Member Data Documentation

GlobalLock SgUctSearch::Thread::m_globalLock [private]

Definition at line 973 of file SgUctSearch.h.

Referenced by operator()().

boost::condition SgUctSearch::Thread::m_playFinished [private]

Definition at line 969 of file SgUctSearch.h.

Referenced by operator()(), and WaitPlayFinished().

boost::mutex::scoped_lock SgUctSearch::Thread::m_playFinishedLock [private]

Definition at line 971 of file SgUctSearch.h.

Referenced by WaitPlayFinished().

boost::mutex SgUctSearch::Thread::m_playFinishedMutex [private]

Definition at line 965 of file SgUctSearch.h.

Referenced by operator()().

bool SgUctSearch::Thread::m_quit [private]

Definition at line 959 of file SgUctSearch.h.

Referenced by operator()(), and ~Thread().

SgUctSearch& SgUctSearch::Thread::m_search [private]

Definition at line 957 of file SgUctSearch.h.

Referenced by operator()().

boost::condition SgUctSearch::Thread::m_startPlay [private]

Definition at line 967 of file SgUctSearch.h.

Referenced by operator()(), and StartPlay().

boost::mutex SgUctSearch::Thread::m_startPlayMutex [private]

Definition at line 963 of file SgUctSearch.h.

Referenced by operator()(), and StartPlay().

std::auto_ptr<SgUctThreadState> SgUctSearch::Thread::m_state

Definition at line 929 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 979 of file SgUctSearch.h.

Referenced by ~Thread().

boost::barrier SgUctSearch::Thread::m_threadReady [private]

Definition at line 961 of file SgUctSearch.h.

Referenced by operator()(), and Thread().


The documentation for this class was generated from the following files:


17 Jun 2010 Doxygen 1.4.7