Sorting Network Search
Backtracking for Small Sorting Networks
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CThreadManager Class Reference

Thread manager. More...

#include <ThreadManager.h>

Inheritance diagram for CThreadManager:

Public Member Functions

 CThreadManager ()
 Constructor. More...
 
const size_t GetCount () const
 Get count. More...
 

Protected Member Functions

void ProcessTask (CTask *)
 Process the result of a task. More...
 

Protected Attributes

size_t m_nCount = 0
 Number of comparator networks found that sort. More...
 

Detailed Description

The thread manager takes care of the health and feeding of the threads. It is derived from CBaseThreadManager<CTask>. It has a function CThreadManager::ProcessTask() which overrides the virtual function CBaseThreadManager::ProcessTask() in order to process the results stored in the completed task descriptor.

Definition at line 40 of file ThreadManager.h.

Constructor & Destructor Documentation

◆ CThreadManager()

CThreadManager::CThreadManager ( )

Default constructor.

Definition at line 33 of file ThreadManager.cpp.

Member Function Documentation

◆ GetCount()

const size_t CThreadManager::GetCount ( ) const

Reader function for m_nCount, the number of sorting networks found.

Returns
The count.

Definition at line 48 of file ThreadManager.cpp.

◆ ProcessTask()

void CThreadManager::ProcessTask ( CTask pTask)
protected

Overrides the virtual function CBaseThreadManager::ProcessTask() in order to process the results stored in the completed task descriptor.

Parameters
pTaskPointer to a task descriptor.

Definition at line 40 of file ThreadManager.cpp.

Member Data Documentation

◆ m_nCount

size_t CThreadManager::m_nCount = 0
protected

Definition at line 42 of file ThreadManager.h.