Class ParallelRowIterator
- Namespace
- SixLabors.ImageSharp.Advanced
- Assembly
- SixLabors.ImageSharp.dll
Utility methods for batched processing of pixel row intervals. Parallel execution is optimized for image processing based on values defined ParallelExecutionSettings or Configuration. Using this class is preferred over direct usage of Parallel utility methods.
public static class ParallelRowIterator
- Inheritance
-
ParallelRowIterator
- Inherited Members
Methods
IterateRowIntervals<T>(Configuration, Rectangle, in T)
Iterate through the rows of a rectangle in optimized batches defined by RowInterval-s.
public static void IterateRowIntervals<T>(Configuration configuration, Rectangle rectangle, in T operation) where T : struct, IRowIntervalOperation
Parameters
configuration
ConfigurationThe Configuration to get the parallel settings from.
rectangle
RectangleThe Rectangle.
operation
TThe operation defining the iteration logic on a single RowInterval.
Type Parameters
T
The type of row operation to perform.
IterateRowIntervals<T>(Rectangle, in ParallelExecutionSettings, in T)
Iterate through the rows of a rectangle in optimized batches defined by RowInterval-s.
public static void IterateRowIntervals<T>(Rectangle rectangle, in ParallelExecutionSettings parallelSettings, in T operation) where T : struct, IRowIntervalOperation
Parameters
rectangle
RectangleThe Rectangle.
parallelSettings
ParallelExecutionSettingsoperation
TThe operation defining the iteration logic on a single RowInterval.
Type Parameters
T
The type of row operation to perform.
IterateRowIntervals<T, TBuffer>(Configuration, Rectangle, in T)
Iterate through the rows of a rectangle in optimized batches defined by RowInterval-s
instantiating a temporary buffer for each operation
invocation.
public static void IterateRowIntervals<T, TBuffer>(Configuration configuration, Rectangle rectangle, in T operation) where T : struct, IRowIntervalOperation<TBuffer> where TBuffer : unmanaged
Parameters
configuration
ConfigurationThe Configuration to get the parallel settings from.
rectangle
RectangleThe Rectangle.
operation
TThe operation defining the iteration logic on a single RowInterval.
Type Parameters
T
The type of row operation to perform.
TBuffer
The type of buffer elements.
IterateRowIntervals<T, TBuffer>(Rectangle, in ParallelExecutionSettings, in T)
Iterate through the rows of a rectangle in optimized batches defined by RowInterval-s
instantiating a temporary buffer for each operation
invocation.
public static void IterateRowIntervals<T, TBuffer>(Rectangle rectangle, in ParallelExecutionSettings parallelSettings, in T operation) where T : struct, IRowIntervalOperation<TBuffer> where TBuffer : unmanaged
Parameters
rectangle
RectangleThe Rectangle.
parallelSettings
ParallelExecutionSettingsoperation
TThe operation defining the iteration logic on a single RowInterval.
Type Parameters
T
The type of row operation to perform.
TBuffer
The type of buffer elements.
IterateRows<T>(Configuration, Rectangle, in T)
Iterate through the rows of a rectangle in optimized batches.
public static void IterateRows<T>(Configuration configuration, Rectangle rectangle, in T operation) where T : struct, IRowOperation
Parameters
configuration
ConfigurationThe Configuration to get the parallel settings from.
rectangle
RectangleThe Rectangle.
operation
TThe operation defining the iteration logic on a single row.
Type Parameters
T
The type of row operation to perform.
IterateRows<T>(Rectangle, in ParallelExecutionSettings, in T)
Iterate through the rows of a rectangle in optimized batches.
public static void IterateRows<T>(Rectangle rectangle, in ParallelExecutionSettings parallelSettings, in T operation) where T : struct, IRowOperation
Parameters
rectangle
RectangleThe Rectangle.
parallelSettings
ParallelExecutionSettingsoperation
TThe operation defining the iteration logic on a single row.
Type Parameters
T
The type of row operation to perform.
IterateRows<T, TBuffer>(Configuration, Rectangle, in T)
Iterate through the rows of a rectangle in optimized batches.
instantiating a temporary buffer for each operation
invocation.
public static void IterateRows<T, TBuffer>(Configuration configuration, Rectangle rectangle, in T operation) where T : struct, IRowOperation<TBuffer> where TBuffer : unmanaged
Parameters
configuration
ConfigurationThe Configuration to get the parallel settings from.
rectangle
RectangleThe Rectangle.
operation
TThe operation defining the iteration logic on a single row.
Type Parameters
T
The type of row operation to perform.
TBuffer
The type of buffer elements.
IterateRows<T, TBuffer>(Rectangle, in ParallelExecutionSettings, in T)
Iterate through the rows of a rectangle in optimized batches.
instantiating a temporary buffer for each operation
invocation.
public static void IterateRows<T, TBuffer>(Rectangle rectangle, in ParallelExecutionSettings parallelSettings, in T operation) where T : struct, IRowOperation<TBuffer> where TBuffer : unmanaged
Parameters
rectangle
RectangleThe Rectangle.
parallelSettings
ParallelExecutionSettingsoperation
TThe operation defining the iteration logic on a single row.
Type Parameters
T
The type of row operation to perform.
TBuffer
The type of buffer elements.