Helios++
Helios software for LiDAR simulations
|
Class implementing a scanning pulse process which works with a pulse task dropper based on budding task dropper and a pulse warehouse thread pool based on an asynchronous warehouse thread pool. More...
#include <WarehouseScanningPulseProcess.h>
Public Member Functions | |
WarehouseScanningPulseProcess (std::shared_ptr< Scanner > scanner, PulseTaskDropper &dropper, PulseWarehouseThreadPool &pool, RandomnessGenerator< double > &randGen1, RandomnessGenerator< double > &randGen2, UniformNoiseSource< double > &intersectionHandlingNoiseSource) | |
Constructor for warehouse scanning pulse process. More... | |
void | handlePulseComputation (SimulatedPulse const &sp) override |
Implementation of handle pulse computation method for the pair budding task dropper and pulse warehouse thread pool. More... | |
void | onLegComplete () override |
Handle sequential computation of a chunk of pulses through task dropper. | |
void | onSimulationFinished () override |
Handle shutdown of warehouse thread pool (final join) More... | |
![]() | |
ScanningPulseProcess (std::shared_ptr< Scanner > scanner) | |
Default constructor for scanning pulse process. | |
std::shared_ptr< Scanner > | getScanner () const |
Obtain the scanner. More... | |
bool | isWriteWaveform () const |
Obtain the scanner's write waveform flag. More... | |
bool | isCalcEchowidth () const |
Obtain the scanner's calc echowidth flag. More... | |
std::shared_ptr< std::vector< Measurement > > & | getAllMeasurements () const |
Obtain the scanner's all measurements vector. More... | |
std::shared_ptr< std::mutex > & | getAllMeasurementsMutex () const |
Obtain the scanner's all measurements mutex. More... | |
std::shared_ptr< std::vector< Measurement > > & | getCycleMeasurements () const |
Obtain the scanner's cycle measurements vector. More... | |
std::shared_ptr< std::mutex > & | getCycleMeasurementsMutex () const |
Obtain the scanner's cycle measurements mutex. More... | |
Protected Member Functions | |
virtual void | handlePulseComputationSequential (SimulatedPulse const &sp) |
Handle sequential computation of scanning pulses. More... | |
virtual void | handlePulseComputationParallel (SimulatedPulse const &sp) |
Handle parallel computation of scanning pulses using a warehouse of task-chunks based strategy. More... | |
Protected Attributes | |
PulseTaskDropper & | dropper |
The task dropper used to handle job chunks. | |
PulseWarehouseThreadPool & | pool |
Thread pool to be used to handle multi threading pulse computation. | |
std::function< void(SimulatedPulse const &sp)> | handler |
Pulse computation handling function. It will be configured at construction depending on thread pool size to assign sequential or parallel computing method as corresponds. | |
std::vector< std::vector< double > > | apMatrix |
Alpha-Prime Matrix for sequential executions (either single thread or main thread workload) More... | |
RandomnessGenerator< double > & | randGen1 |
First randomness generator for single thread mode. More... | |
RandomnessGenerator< double > & | randGen2 |
Second randomness generator for single thread mode. More... | |
UniformNoiseSource< double > & | intersectionHandlingNoiseSource |
Uniform noise source for single thread mode. More... | |
![]() | |
PulseTaskFactory | ptf |
The pulse task factory to build pulse tasks. More... | |
std::shared_ptr< Scanner > | scanner |
The scanner emitting the pulses. More... | |
Class implementing a scanning pulse process which works with a pulse task dropper based on budding task dropper and a pulse warehouse thread pool based on an asynchronous warehouse thread pool.
WarehouseScanningPulseProcess::WarehouseScanningPulseProcess | ( | std::shared_ptr< Scanner > | scanner, |
PulseTaskDropper & | dropper, | ||
PulseWarehouseThreadPool & | pool, | ||
RandomnessGenerator< double > & | randGen1, | ||
RandomnessGenerator< double > & | randGen2, | ||
UniformNoiseSource< double > & | intersectionHandlingNoiseSource | ||
) |
Constructor for warehouse scanning pulse process.
dropper | The task dropper used to handle job chunks |
pool | Thread pool to be used to handle multi threading pulse computation |
randGen1 | First randomness generator for single thread |
randGen2 | Second randomness generator for single thread mode |
intersectionHandlingNoiseSource | Uniform noise source for single thread mode |
|
inlineoverridevirtual |
Implementation of handle pulse computation method for the pair budding task dropper and pulse warehouse thread pool.
Implements ScanningPulseProcess.
|
protectedvirtual |
Handle parallel computation of scanning pulses using a warehouse of task-chunks based strategy.
|
protectedvirtual |
Handle sequential computation of scanning pulses.
|
overridevirtual |
Handle shutdown of warehouse thread pool (final join)
Reimplemented from ScanningPulseProcess.
|
protected |
Alpha-Prime Matrix for sequential executions (either single thread or main thread workload)
|
protected |
Uniform noise source for single thread mode.
|
protected |
First randomness generator for single thread mode.
|
protected |
Second randomness generator for single thread mode.