-
-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Avx2 optimizations on Porter-Duff operations. #2359
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
517ec80
Port most of the function components.
JimBobSquarePants 6a4dcd7
Merge branch 'main' into js/avx2-porter-duff
JimBobSquarePants 746b34d
Finish porting function components
JimBobSquarePants 4c546d7
Update the PorterDuffFunctions.Generated.tt to include the Vector256<…
JimBobSquarePants ef34960
Fix code generation
JimBobSquarePants 9f8bcc4
Respond to feedback
JimBobSquarePants 5fedca8
Respond to feedback
JimBobSquarePants 907400f
Use Permute
JimBobSquarePants 9a552f1
Revert "Use Permute"
JimBobSquarePants bde9324
Use Permute
JimBobSquarePants 41cfa9b
Port DefaultPixelBlenders
JimBobSquarePants b4ff1e4
Fix issues
JimBobSquarePants c58be60
Add additional PD tests
JimBobSquarePants dff381f
Fix amount span assignment
JimBobSquarePants 6cb6bd4
Better clamp, fix offset (again)
JimBobSquarePants c06da8c
Add NormalSrcOver benchmark
JimBobSquarePants b05b25b
Use RemoteExecutor for composition tests
JimBobSquarePants 916084c
Fix field assignment in benchmark
JimBobSquarePants 8ffec30
Make Scalar default
JimBobSquarePants a666372
Use FMA where possible.
JimBobSquarePants afdc53c
Tanners Top Tips!!
JimBobSquarePants 7309b6e
Merge branch 'main' into js/avx2-porter-duff
JimBobSquarePants 78eb2f1
Use WithW
JimBobSquarePants ac0d27d
Provide Sse fallback for WithW
JimBobSquarePants 9752566
Merge branch 'main' into js/avx2-porter-duff
JimBobSquarePants File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
8,112 changes: 7,676 additions & 436 deletions
8,112
src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Particularly since this is inlined, I wouldn't expect you to need
in
here (or on the other examples above).It shouldn't actually make a difference since the JIT should inline things and elide the "address taken", but it's typically easier on the JIT if you don't mark them unnecessarily for "enregisterable" types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, without the
in
JIT could/would lose track of the fact memory load operands could be contained when inlining these small helpers, at least in netcoreapp3.1. Don't know if or when that was fixed, but I'd double check before removing them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at the JIT but am seeing a 2% slowdown when running my benchmark when I remove them. Could be error but I'll leave them for now.