The SKIRT project
advanced radiative transfer for astrophysics
SerialParallel Class Reference

#include <SerialParallel.hpp>

Inheritance diagram for SerialParallel:

Public Member Functions

void call (size_t maxIndex, std::function< void(size_t firstIndex, size_t numIndices)> target) override
Public Member Functions inherited from Parallel
virtual ~Parallel ()

Private Member Functions

 SerialParallel (int threadCount)

Friends

class ParallelFactory

Additional Inherited Members

Protected Member Functions inherited from Parallel
 Parallel ()

Detailed Description

This class implements the Parallel base class interface using a single execution threads in a single process. In other words, all tasks are serialized in the thread invoking the call() function. Because of the simplicity of the "parallelization" scheme, overhead is minimal. Also, any exceptions thrown by the target function are simply passed through.

Constructor & Destructor Documentation

◆ SerialParallel()

SerialParallel::SerialParallel ( int threadCount)
explicitprivate

Constructs a SerialParallel instance. The specified number of execution threads is ignored. The constructor is private; use the ParallelFactory::parallel() function instead.

Member Function Documentation

◆ call()

void SerialParallel::call ( size_t maxIndex,
std::function< void(size_t firstIndex, size_t numIndices)> target )
overridevirtual

This function implements the call() interface described in the Parallel base class for the parallelization scheme offered by this subclass.

Implements Parallel.


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