PCL
pcl::ParallelProcess Class Reference

A process using multiple concurrent execution threads. More...

#include <ParallelProcess.h>

+ Inheritance diagram for pcl::ParallelProcess:

Public Member Functions

 ParallelProcess ()=default
 
 ParallelProcess (const ParallelProcess &)=default
 
void DisableParallelProcessing (bool disable=true) noexcept
 
void EnableParallelProcessing (bool enable=true, int maxProcessors=0) noexcept
 
bool IsParallelProcessingEnabled () const noexcept
 
int MaxProcessors () const noexcept
 
ParallelProcessoperator= (const ParallelProcess &)=default
 
void SetMaxProcessors (int maxProcessors) noexcept
 
void Swap (ParallelProcess &process) noexcept
 

Detailed Description

ParallelProcess is a base class for classes implementing multithreaded processes in PCL.

Definition at line 72 of file ParallelProcess.h.

Constructor & Destructor Documentation

◆ ParallelProcess() [1/2]

pcl::ParallelProcess::ParallelProcess ( )
default

Default constructor.

By default, parallel processing is always enabled, and any process can use the maximum possible number of parallel execution threads.

◆ ParallelProcess() [2/2]

pcl::ParallelProcess::ParallelProcess ( const ParallelProcess )
default

Copy constructor.

Member Function Documentation

◆ DisableParallelProcessing()

void pcl::ParallelProcess::DisableParallelProcessing ( bool  disable = true)
inlinenoexcept

Disables parallel processing for this process.

This is a convenience function, equivalent to:

Definition at line 128 of file ParallelProcess.h.

◆ EnableParallelProcessing()

void pcl::ParallelProcess::EnableParallelProcessing ( bool  enable = true,
int  maxProcessors = 0 
)
inlinenoexcept

Enables parallel processing for this process.

Parameters
enableWhether to enable or disable parallel processing. True by default.
maxProcessorsThe maximum number of processors allowed for this instance. If enable is false this parameter is ignored. A value ≤ 0 is ignored. The default value is zero.

Definition at line 113 of file ParallelProcess.h.

◆ IsParallelProcessingEnabled()

bool pcl::ParallelProcess::IsParallelProcessingEnabled ( ) const
inlinenoexcept

Returns true iff this process is allowed to use multiple parallel execution threads, when multiple threads are permitted and available.

Definition at line 98 of file ParallelProcess.h.

◆ MaxProcessors()

int pcl::ParallelProcess::MaxProcessors ( ) const
inlinenoexcept

Returns the maximum number of processors allowed for this process.

Irrespective of the value returned by this function, a module should not use more processors than the maximum number of parallel threads allowed for external modules on the PixInsight platform. This number is given by the "Process/MaxProcessors" global variable. Refer to the GlobalSettings class for information on global variables.

Definition at line 142 of file ParallelProcess.h.

◆ operator=()

ParallelProcess& pcl::ParallelProcess::operator= ( const ParallelProcess )
default

Copy assignment operator. Returns a reference to this object.

◆ SetMaxProcessors()

void pcl::ParallelProcess::SetMaxProcessors ( int  maxProcessors)
inlinenoexcept

Sets the maximum number of processors allowed for this process.

In the current version of PCL, a module can use a maximum of 1023 processors. The term processor actually refers to the number of threads a module can execute concurrently.

Irrespective of the value specified by this function, a module should not use more processors than the maximum number of parallel threads allowed for external modules on the PixInsight platform. This number is given by the "Process/MaxProcessors" global variable. Refer to the GlobalSettings class for information on global variables.

Definition at line 160 of file ParallelProcess.h.

◆ Swap()

void pcl::ParallelProcess::Swap ( ParallelProcess process)
inlinenoexcept

Exchanges two ParallelProcess instances.

Definition at line 168 of file ParallelProcess.h.

References pcl::Swap().


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