Skip to content

Commit c66dd0c

Browse files
Rename things
1 parent b5d055f commit c66dd0c

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/ImageSharp/Advanced/ParallelRowIterator.Wrappers.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,35 @@ namespace SixLabors.ImageSharp.Advanced
1717
/// </content>
1818
public static partial class ParallelRowIterator
1919
{
20-
private readonly struct WrappingRowIntervalInfo
20+
private readonly struct IterationParameters
2121
{
2222
public readonly int MinY;
2323
public readonly int MaxY;
2424
public readonly int StepY;
25-
public readonly int MaxX;
25+
public readonly int Width;
2626

27-
public WrappingRowIntervalInfo(int minY, int maxY, int stepY)
27+
public IterationParameters(int minY, int maxY, int stepY)
2828
: this(minY, maxY, stepY, 0)
2929
{
3030
}
3131

32-
public WrappingRowIntervalInfo(int minY, int maxY, int stepY, int maxX)
32+
public IterationParameters(int minY, int maxY, int stepY, int width)
3333
{
3434
this.MinY = minY;
3535
this.MaxY = maxY;
3636
this.StepY = stepY;
37-
this.MaxX = maxX;
37+
this.Width = width;
3838
}
3939
}
4040

41-
private readonly struct WrappingRowIntervalOperation<T>
41+
private readonly struct RowIntervalOperationWrapper<T>
4242
where T : struct, IRowIntervalOperation
4343
{
44-
private readonly WrappingRowIntervalInfo info;
44+
private readonly IterationParameters info;
4545
private readonly T operation;
4646

4747
[MethodImpl(InliningOptions.ShortMethod)]
48-
public WrappingRowIntervalOperation(in WrappingRowIntervalInfo info, in T operation)
48+
public RowIntervalOperationWrapper(in IterationParameters info, in T operation)
4949
{
5050
this.info = info;
5151
this.operation = operation;
@@ -69,17 +69,17 @@ public void Invoke(int i)
6969
}
7070
}
7171

72-
private readonly struct WrappingRowIntervalBufferOperation<T, TBuffer>
72+
private readonly struct RowIntervalOperationWrapper<T, TBuffer>
7373
where T : struct, IRowIntervalOperation<TBuffer>
7474
where TBuffer : unmanaged
7575
{
76-
private readonly WrappingRowIntervalInfo info;
76+
private readonly IterationParameters info;
7777
private readonly MemoryAllocator allocator;
7878
private readonly T operation;
7979

8080
[MethodImpl(InliningOptions.ShortMethod)]
81-
public WrappingRowIntervalBufferOperation(
82-
in WrappingRowIntervalInfo info,
81+
public RowIntervalOperationWrapper(
82+
in IterationParameters info,
8383
MemoryAllocator allocator,
8484
in T operation)
8585
{
@@ -101,7 +101,7 @@ public void Invoke(int i)
101101
int yMax = Math.Min(yMin + this.info.StepY, this.info.MaxY);
102102
var rows = new RowInterval(yMin, yMax);
103103

104-
using IMemoryOwner<TBuffer> buffer = this.allocator.Allocate<TBuffer>(this.info.MaxX);
104+
using IMemoryOwner<TBuffer> buffer = this.allocator.Allocate<TBuffer>(this.info.Width);
105105

106106
Unsafe.AsRef(in this.operation).Invoke(in rows, buffer.Memory.Span);
107107
}

src/ImageSharp/Advanced/ParallelRowIterator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public static void IterateRows<T>(
6565

6666
int verticalStep = DivideCeil(rectangle.Height, numOfSteps);
6767
var parallelOptions = new ParallelOptions { MaxDegreeOfParallelism = numOfSteps };
68-
var info = new WrappingRowIntervalInfo(top, bottom, verticalStep);
69-
var wrappingOperation = new WrappingRowIntervalOperation<T>(in info, in operation);
68+
var info = new IterationParameters(top, bottom, verticalStep);
69+
var wrappingOperation = new RowIntervalOperationWrapper<T>(in info, in operation);
7070

7171
Parallel.For(
7272
0,
@@ -133,8 +133,8 @@ public static void IterateRows<T, TBuffer>(
133133

134134
int verticalStep = DivideCeil(height, numOfSteps);
135135
var parallelOptions = new ParallelOptions { MaxDegreeOfParallelism = numOfSteps };
136-
var info = new WrappingRowIntervalInfo(top, bottom, verticalStep, width);
137-
var wrappingOperation = new WrappingRowIntervalBufferOperation<T, TBuffer>(in info, allocator, in operation);
136+
var info = new IterationParameters(top, bottom, verticalStep, width);
137+
var wrappingOperation = new RowIntervalOperationWrapper<T, TBuffer>(in info, allocator, in operation);
138138

139139
Parallel.For(
140140
0,

0 commit comments

Comments
 (0)