Struct ParallelExecutionSettings
Defines execution settings for methods in ParallelRowIterator.
Inherited Members
Namespace: SixLabors.ImageSharp.Advanced
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct ParallelExecutionSettings
Constructors
| Improve this Doc View SourceParallelExecutionSettings(Int32, MemoryAllocator)
Initializes a new instance of the ParallelExecutionSettings struct.
Declaration
public ParallelExecutionSettings(int maxDegreeOfParallelism, MemoryAllocator memoryAllocator)
Parameters
Type | Name | Description |
---|---|---|
Int32 | maxDegreeOfParallelism | The value used for initializing MaxDegreeOfParallelism when using TPL. |
MemoryAllocator | memoryAllocator | The MemoryAllocator. |
ParallelExecutionSettings(Int32, Int32, MemoryAllocator)
Initializes a new instance of the ParallelExecutionSettings struct.
Declaration
public ParallelExecutionSettings(int maxDegreeOfParallelism, int minimumPixelsProcessedPerTask, MemoryAllocator memoryAllocator)
Parameters
Type | Name | Description |
---|---|---|
Int32 | maxDegreeOfParallelism | The value used for initializing MaxDegreeOfParallelism when using TPL. |
Int32 | minimumPixelsProcessedPerTask | The value for MinimumPixelsProcessedPerTask. |
MemoryAllocator | memoryAllocator | The MemoryAllocator. |
Fields
| Improve this Doc View SourceDefaultMinimumPixelsProcessedPerTask
Default value for MinimumPixelsProcessedPerTask.
Declaration
public const int DefaultMinimumPixelsProcessedPerTask = 4096
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceMaxDegreeOfParallelism
Gets the value used for initializing MaxDegreeOfParallelism when using TPL.
Declaration
public readonly int MaxDegreeOfParallelism { get; }
Property Value
Type | Description |
---|---|
Int32 |
MemoryAllocator
Gets the MemoryAllocator.
Declaration
public readonly MemoryAllocator MemoryAllocator { get; }
Property Value
Type | Description |
---|---|
MemoryAllocator |
MinimumPixelsProcessedPerTask
Gets the minimum number of pixels being processed by a single task when parallelizing operations with TPL. Launching tasks for pixel regions below this limit is not worth the overhead. Initialized with DefaultMinimumPixelsProcessedPerTask by default, the optimum value is operation specific. (The cheaper the operation, the larger the value is.)
Declaration
public readonly int MinimumPixelsProcessedPerTask { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceFromConfiguration(Configuration)
Get the default ParallelExecutionSettings for a Configuration
Declaration
public static ParallelExecutionSettings FromConfiguration(Configuration configuration)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The Configuration. |
Returns
Type | Description |
---|---|
ParallelExecutionSettings |
MultiplyMinimumPixelsPerTask(Int32)
Creates a new instance of ParallelExecutionSettings
having MinimumPixelsProcessedPerTask multiplied by multiplier
Declaration
public readonly ParallelExecutionSettings MultiplyMinimumPixelsPerTask(int multiplier)
Parameters
Type | Name | Description |
---|---|---|
Int32 | multiplier | The value to multiply MinimumPixelsProcessedPerTask with. |
Returns
Type | Description |
---|---|
ParallelExecutionSettings | The modified ParallelExecutionSettings. |