PCL
|
A process using multiple concurrent execution threads. More...
#include <ParallelProcess.h>
Public Member Functions | |
ParallelProcess ()=default | |
ParallelProcess (const ParallelProcess &)=default | |
virtual | ~ParallelProcess () |
void | DisableParallelProcessing (bool disable=true) noexcept |
void | EnableParallelProcessing (bool enable=true, int maxProcessors=0) noexcept |
bool | IsParallelProcessingEnabled () const noexcept |
int | MaxProcessors () const noexcept |
ParallelProcess & | operator= (const ParallelProcess &)=default |
void | SetMaxProcessors (int maxProcessors) noexcept |
void | Swap (ParallelProcess &process) noexcept |
ParallelProcess is a base class for classes implementing multithreaded processes in PCL.
Definition at line 72 of file ParallelProcess.h.
|
default |
Default constructor.
By default, parallel processing is always enabled, and any process can use the maximum possible number of parallel execution threads.
|
default |
Copy constructor.
|
inlinevirtual |
Virtual destructor.
Definition at line 92 of file ParallelProcess.h.
|
inlinenoexcept |
Disables parallel processing for this process.
This is a convenience function, equivalent to:
Definition at line 135 of file ParallelProcess.h.
|
inlinenoexcept |
Enables parallel processing for this process.
enable | Whether to enable or disable parallel processing. True by default. |
maxProcessors | The 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 120 of file ParallelProcess.h.
|
inlinenoexcept |
Returns true iff this process is allowed to use multiple parallel execution threads, when multiple threads are permitted and available.
Definition at line 105 of file ParallelProcess.h.
|
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 149 of file ParallelProcess.h.
|
default |
Copy assignment operator. Returns a reference to this object.
|
inlinenoexcept |
Sets the maximum number of processors allowed for this process.
A value of maxProcessors ≤ 0 is ignored and causes the call to this function to have no effect.
In the current version of PCL, a module can use a maximum of 1023 processors. The term processors 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 170 of file ParallelProcess.h.
|
inlinenoexcept |
Exchanges two ParallelProcess instances.
Definition at line 179 of file ParallelProcess.h.
References pcl::Swap().