Helios++
Helios software for LiDAR simulations
PulseThreadPoolFactory Class Reference

Factory to build different types of pulse thread pools. More...

#include <PulseThreadPoolFactory.h>

Collaboration diagram for PulseThreadPoolFactory:

Public Member Functions

 PulseThreadPoolFactory (int const parallelizationStrategy, std::size_t const poolSize, double const deviceAccuracy, int const chunkSize, int const warehouseFactor=1)
 Default constructor.
 
std::shared_ptr< PulseThreadPoolInterfacemakePulseThreadPool ()
 Build the pulse thread pool corresponding with current factory configuration/state. More...
 
std::shared_ptr< PulseThreadPoolmakeBasicPulseThreadPool () const
 Build a basic pulse thread pool. More...
 
std::shared_ptr< PulseWarehouseThreadPoolmakePulseWarehouseThreadPool () const
 Build a warehouse based pulse thread pool. More...
 

Protected Attributes

int parallelizationStrategy
 The parallelization strategy defining the thread pool. More...
 
std::size_t poolSize
 How many threads the thread pool should use. More...
 
double deviceAccuracy
 The accuracy of the detector in meters. More...
 
int chunkSize
 The size of chunks handled by the thread pool, if needed. More...
 
int warehouseFactor
 The warehouse factor for the thread pool, if needed. The maximum number of tasks for a TaskWarehouse will be the pool size multiplied by this factor. More...
 

Detailed Description

Factory to build different types of pulse thread pools.

Author
Alberto M. Esmoris Pena
Version
1.0
See also
PulseThreadPool
PulseWarehouseThreadPool
PulseThreadPoolInterface

Member Function Documentation

◆ makeBasicPulseThreadPool()

std::shared_ptr<PulseThreadPool> PulseThreadPoolFactory::makeBasicPulseThreadPool ( ) const
inline

Build a basic pulse thread pool.

Returns
Built basic pulse thread pool
See also
PulseThreadPool

◆ makePulseThreadPool()

std::shared_ptr<PulseThreadPoolInterface> PulseThreadPoolFactory::makePulseThreadPool ( )
inline

Build the pulse thread pool corresponding with current factory configuration/state.

Returns
Built pulse thread pool

◆ makePulseWarehouseThreadPool()

std::shared_ptr<PulseWarehouseThreadPool> PulseThreadPoolFactory::makePulseWarehouseThreadPool ( ) const
inline

Build a warehouse based pulse thread pool.

Returns
Built warehouse based pulse thread pool
See also
PulseWarehouseThreadPool

Member Data Documentation

◆ chunkSize

int PulseThreadPoolFactory::chunkSize
protected

The size of chunks handled by the thread pool, if needed.

See also
TaskDropper::maxTasks

◆ deviceAccuracy

double PulseThreadPoolFactory::deviceAccuracy
protected

The accuracy of the detector in meters.

See also
AbstractDetector::cfg_device_accuracy_m

◆ parallelizationStrategy

int PulseThreadPoolFactory::parallelizationStrategy
protected

The parallelization strategy defining the thread pool.

Strategy 0 is a chunk based strategy while strategy 1 is a warehouse based strategy

◆ poolSize

std::size_t PulseThreadPoolFactory::poolSize
protected

How many threads the thread pool should use.

See also
ThreadPool::pool_size

◆ warehouseFactor

int PulseThreadPoolFactory::warehouseFactor
protected

The warehouse factor for the thread pool, if needed. The maximum number of tasks for a TaskWarehouse will be the pool size multiplied by this factor.

See also
TaskWarehouse::maxTasks

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