Replace parallel row iteration with sequential loops in Crop/Convolution Processors#3113
Open
JimBobSquarePants wants to merge 3 commits intomainfrom
Open
Replace parallel row iteration with sequential loops in Crop/Convolution Processors#3113JimBobSquarePants wants to merge 3 commits intomainfrom
JimBobSquarePants wants to merge 3 commits intomainfrom
Conversation
antonfirsov
reviewed
Apr 10, 2026
Member
antonfirsov
left a comment
There was a problem hiding this comment.
I think this should get rid of the operation types, they only scatter the code, which doesn't help readability.
|
|
||
| for (int y = interest.Top; y < interest.Bottom; y++) | ||
| { | ||
| operation.Invoke(y, span); |
Member
There was a problem hiding this comment.
Is there any reason for Convolution2DRowOperation isolation? IMO removing it/moving it to a private method would simplify code.
| in operation); | ||
| for (int y = bounds.Top; y < bounds.Bottom; y++) | ||
| { | ||
| operation.Invoke(y); |
Member
There was a problem hiding this comment.
The operation type is clearly unneeded here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
See #3111 for relevant details.
Changes to how convolution and crop operations are parallelized. The main focus is on improving performance by removing unnecessary parallelization in memory-bandwidth-bound operations, which can actually degrade performance due to cache contention.
Additionally, it updates the gamma correction logic in the Bokeh blur processor for improved performance. Bokeh and Median blur have been left parallel as they contain significant per-task work.
Relevant reference images have also been updated to reflect minor changes in the output due to earlier clamping.