nndeploy C++ API  0.2.0
nndeploy C++ API
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
nndeploy::thread_pool::ParallelPool Class Reference

#include <parallel_for_api_default.h>

Public Member Functions

int getThreadNum () const
 
void parallelFor (const base::Range &range, const ParallelLoopBody &body, double nstripes)
 
 ParallelPool ()
 
void setThreadNum (int num)
 
void stop ()
 
 ~ParallelPool ()
 

Static Public Member Functions

static ParallelPoolgetInstance ()
 

Public Attributes

std::condition_variable job_complete_
 
std::mutex mutex_notify_
 

Detailed Description

Definition at line 14 of file parallel_for_api_default.h.

Constructor & Destructor Documentation

◆ ParallelPool()

nndeploy::thread_pool::ParallelPool::ParallelPool ( )

◆ ~ParallelPool()

nndeploy::thread_pool::ParallelPool::~ParallelPool ( )

Member Function Documentation

◆ getInstance()

static ParallelPool& nndeploy::thread_pool::ParallelPool::getInstance ( )
inlinestatic

Definition at line 16 of file parallel_for_api_default.h.

Here is the call graph for this function:

◆ getThreadNum()

int nndeploy::thread_pool::ParallelPool::getThreadNum ( ) const

◆ parallelFor()

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

◆ setThreadNum()

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

◆ stop()

void nndeploy::thread_pool::ParallelPool::stop ( )
inline

Definition at line 32 of file parallel_for_api_default.h.

Member Data Documentation

◆ job_complete_

std::condition_variable nndeploy::thread_pool::ParallelPool::job_complete_

Definition at line 39 of file parallel_for_api_default.h.

◆ mutex_notify_

std::mutex nndeploy::thread_pool::ParallelPool::mutex_notify_

Definition at line 38 of file parallel_for_api_default.h.


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