Helios++
Helios software for LiDAR simulations
PulseThreadPoolInterface Class Referenceabstract

Interface for thread pools supporting pulse tasks. More...

#include <PulseThreadPoolInterface.h>

Inheritance diagram for PulseThreadPoolInterface:

Public Member Functions

virtual void run_pulse_task (TaskDropper< PulseTask, PulseThreadPoolInterface, std::vector< std::vector< double >> &, RandomnessGenerator< double > &, RandomnessGenerator< double > &, NoiseSource< double > & > &dropper)=0
 Compute a chunk of pulse tasks in parallel, blocking fashion. More...
 
virtual bool try_run_pulse_task (TaskDropper< PulseTask, PulseThreadPoolInterface, std::vector< std::vector< double >> &, RandomnessGenerator< double > &, RandomnessGenerator< double > &, NoiseSource< double > & > &dropper)=0
 Compute a chunk of pulse tasks in parallel, non-blocking fashion. More...
 
virtual void join ()=0
 Block until pending parallel executions have finished.
 

Detailed Description

Interface for thread pools supporting pulse tasks.

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

Member Function Documentation

◆ run_pulse_task()

virtual void PulseThreadPoolInterface::run_pulse_task ( TaskDropper< PulseTask, PulseThreadPoolInterface, std::vector< std::vector< double >> &, RandomnessGenerator< double > &, RandomnessGenerator< double > &, NoiseSource< double > & > &  dropper)
pure virtual

Compute a chunk of pulse tasks in parallel, blocking fashion.

Parameters
dropperThe pulse task dropper defining the chunk of pulse tasks to be computed
See also
PulseTaskDropper

Implemented in PulseWarehouseThreadPool, and PulseThreadPool.

◆ try_run_pulse_task()

virtual bool PulseThreadPoolInterface::try_run_pulse_task ( TaskDropper< PulseTask, PulseThreadPoolInterface, std::vector< std::vector< double >> &, RandomnessGenerator< double > &, RandomnessGenerator< double > &, NoiseSource< double > & > &  dropper)
pure virtual

Compute a chunk of pulse tasks in parallel, non-blocking fashion.

Strictly speaking, it can be blocking. But the idea behind this method is that it will block only for thread-safe access purposes and not until running is guaranteed. So it might block, for instance, to post or submit a task to be computed, but not to run it.

Parameters
dropperThe pulse task dropper defining the chunk of pulse tasks to be computed
See also
PulseTaskDropper

Implemented in PulseWarehouseThreadPool, and PulseThreadPool.


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