NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Attributes | List of all members

Search Toolkit Book for CThreadable

Class that supports setting the number of threads to use with a given algorithm. More...

#include <algo/blast/api/setup_factory.hpp>

+ Inheritance diagram for CThreadable:
+ Collaboration diagram for CThreadable:

Public Types

enum  { kMinNumThreads = 1 }
 Never have less than 1 thread. More...
 

Public Member Functions

 CThreadable (void)
 Default ctor. More...
 
virtual ~CThreadable (void)
 Our virtual destructor. More...
 
virtual void SetNumberOfThreads (size_t nthreads)
 Mutator for the number of threads. More...
 
size_t GetNumberOfThreads (void) const
 Accessor for the number of threads to use. More...
 
bool IsMultiThreaded (void) const
 Returns true if more than 1 thread is specified. More...
 

Protected Attributes

size_t m_NumThreads
 Keep track of how many threads should be used. More...
 

Detailed Description

Class that supports setting the number of threads to use with a given algorithm.

Ensures that this number is greater than or equal to 1.

Definition at line 162 of file setup_factory.hpp.


The documentation for this class was generated from the following file:
Modified on Wed Apr 17 13:10:48 2024 by modify_doxy.py rev. 669887