nndeploy C++ API  0.2.0
nndeploy C++ API
Classes | Typedefs | Enumerations | Functions
nndeploy::thread_pool Namespace Reference

Classes

class  LocalThread
 
class  ParallelForApi
 
class  ParallelForApiDefault
 
class  ParallelLoopBody
 Base class for parallel data processors. More...
 
class  ParallelPool
 
class  RunnableTask
 
class  SafeWSQueue
 
class  ThreadPool
 

Typedefs

using RTask = RunnableTask
 

Enumerations

enum  ParallelForApiType : int { kParallelForApiTypeDefault = 0x0000 }
 

Functions

int defaultNumberOfThreads ()
 
std::shared_ptr< ParallelForApi > & getParallelForApi (ParallelForApiType type=kParallelForApiTypeDefault)
 
int getThreadNum ()
 
void parallelFor (const base::Range &range, const ParallelLoopBody &body, double nstripes=-1.0)
 Parallel data processor. More...
 
std::string parallelForApiTypeToString (ParallelForApiType type)
 
void setThreadNum (int num)
 
ParallelForApiType stringToParallelForApiType (const std::string &src)
 

Typedef Documentation

◆ RTask

Definition at line 49 of file runnable_task.h.

Enumeration Type Documentation

◆ ParallelForApiType

Enumerator
kParallelForApiTypeDefault 

Definition at line 15 of file parallel.h.

Function Documentation

◆ defaultNumberOfThreads()

int nndeploy::thread_pool::defaultNumberOfThreads ( )

◆ getParallelForApi()

std::shared_ptr<ParallelForApi>& nndeploy::thread_pool::getParallelForApi ( ParallelForApiType  type = kParallelForApiTypeDefault)

◆ getThreadNum()

int nndeploy::thread_pool::getThreadNum ( )

◆ parallelFor()

void nndeploy::thread_pool::parallelFor ( const base::Range range,
const ParallelLoopBody body,
double  nstripes = -1.0 
)

Parallel data processor.

◆ parallelForApiTypeToString()

std::string nndeploy::thread_pool::parallelForApiTypeToString ( ParallelForApiType  type)

◆ setThreadNum()

void nndeploy::thread_pool::setThreadNum ( int  num)

◆ stringToParallelForApiType()

ParallelForApiType nndeploy::thread_pool::stringToParallelForApiType ( const std::string &  src)