@@ -58,7 +58,7 @@ public static void IterateRows<T>(
5858 {
5959 for ( int y = top ; y < bottom ; y ++ )
6060 {
61- Unsafe . AsRef ( operation ) . Invoke ( y ) ;
61+ Unsafe . AsRef ( in operation ) . Invoke ( y ) ;
6262 }
6363
6464 return ;
@@ -118,7 +118,7 @@ public static void IterateRows<T, TBuffer>(
118118 int maxSteps = DivideCeil ( width * ( long ) height , parallelSettings . MinimumPixelsProcessedPerTask ) ;
119119 int numOfSteps = Math . Min ( parallelSettings . MaxDegreeOfParallelism , maxSteps ) ;
120120 MemoryAllocator allocator = parallelSettings . MemoryAllocator ;
121- int bufferLength = Unsafe . AsRef ( operation ) . GetRequiredBufferLength ( rectangle ) ;
121+ int bufferLength = Unsafe . AsRef ( in operation ) . GetRequiredBufferLength ( rectangle ) ;
122122
123123 // Avoid TPL overhead in this trivial case:
124124 if ( numOfSteps == 1 )
@@ -128,7 +128,7 @@ public static void IterateRows<T, TBuffer>(
128128
129129 for ( int y = top ; y < bottom ; y ++ )
130130 {
131- Unsafe . AsRef ( operation ) . Invoke ( y , span ) ;
131+ Unsafe . AsRef ( in operation ) . Invoke ( y , span ) ;
132132 }
133133
134134 return ;
@@ -245,15 +245,15 @@ public static void IterateRowIntervals<T, TBuffer>(
245245 int maxSteps = DivideCeil ( width * ( long ) height , parallelSettings . MinimumPixelsProcessedPerTask ) ;
246246 int numOfSteps = Math . Min ( parallelSettings . MaxDegreeOfParallelism , maxSteps ) ;
247247 MemoryAllocator allocator = parallelSettings . MemoryAllocator ;
248- int bufferLength = Unsafe . AsRef ( operation ) . GetRequiredBufferLength ( rectangle ) ;
248+ int bufferLength = Unsafe . AsRef ( in operation ) . GetRequiredBufferLength ( rectangle ) ;
249249
250250 // Avoid TPL overhead in this trivial case:
251251 if ( numOfSteps == 1 )
252252 {
253253 var rows = new RowInterval ( top , bottom ) ;
254254 using IMemoryOwner < TBuffer > buffer = allocator . Allocate < TBuffer > ( bufferLength ) ;
255255
256- Unsafe . AsRef ( operation ) . Invoke ( in rows , buffer . Memory . Span ) ;
256+ Unsafe . AsRef ( in operation ) . Invoke ( in rows , buffer . Memory . Span ) ;
257257
258258 return ;
259259 }
0 commit comments