MADNESS  0.10.1
Public Member Functions | Private Attributes | List of all members
madness::ThreadPoolThread Class Reference

ThreadPool thread object. More...

#include <thread.h>

Inheritance diagram for madness::ThreadPoolThread:
Inheritance graph
[legend]
Collaboration diagram for madness::ThreadPoolThread:
Collaboration graph
[legend]

Public Member Functions

 ThreadPoolThread ()
 
virtual ~ThreadPoolThread ()=default
 
profiling::TaskProfilerprofiler ()
 Task profiler accessor. More...
 
- Public Member Functions inherited from madness::Thread
 Thread ()
 Default constructor. More...
 
 Thread (void *(*f)(void *), void *args=nullptr)
 Create a thread and start it running f(args). More...
 
virtual ~Thread ()=default
 
void start (void *(*f)(void *), void *args=nullptr)
 Start the thread by running f(args). More...
 
- Public Member Functions inherited from madness::ThreadBase
 ThreadBase ()
 Default constructor. More...
 
virtual ~ThreadBase ()
 
int cancel () const
 Cancel this thread. More...
 
const pthread_t & get_id () const
 Get the pthread id of this thread (if running). More...
 
int get_pool_thread_index () const
 Get index of this thread in ThreadPool. More...
 
void start ()
 Start the thread running. More...
 

Private Attributes

profiling::TaskProfiler profiler_
 

Additional Inherited Members

- Static Public Member Functions inherited from madness::ThreadBase
static void exit ()
 A thread can call this to terminate its execution. More...
 
static int num_hw_processors ()
 Get number of actual hardware processors. More...
 
static ThreadBasethis_thread ()
 

Detailed Description

ThreadPool thread object.

This class holds thread local data for thread pool threads. It can be accessed via ThreadBase::this_thread().

Constructor & Destructor Documentation

◆ ThreadPoolThread()

madness::ThreadPoolThread::ThreadPoolThread ( )
inline

◆ ~ThreadPoolThread()

virtual madness::ThreadPoolThread::~ThreadPoolThread ( )
virtualdefault

Member Function Documentation

◆ profiler()

profiling::TaskProfiler& madness::ThreadPoolThread::profiler ( )
inline

Task profiler accessor.

Todo:
Description needed.
Returns
Description needed.

References profiler_.

Referenced by madness::ThreadPool::end(), madness::ThreadPool::run_task(), madness::ThreadPool::run_tasks(), and madness::ThreadPool::thread_main().

Member Data Documentation

◆ profiler_

profiling::TaskProfiler madness::ThreadPoolThread::profiler_
private
Todo:
Description needed.

Referenced by profiler().


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