-
-
Notifications
You must be signed in to change notification settings - Fork 855
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
Clean up and optimize byte<->float and Rgba32 <-> Vector4 conversion #742
Merged
Merged
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
260a8f8
BulkConvertByteToNormalizedFloat
antonfirsov af7d96d
SIMD byte -> float conversion: BulkConvertByteToNormalizedFloatFast
antonfirsov 281c527
move tests
antonfirsov 3e5325e
uniformize conversion code
antonfirsov df87a68
BulkConvertNormalizedFloatToByteClampOverflows
antonfirsov b8b411b
disappointing benchmark results
antonfirsov a471420
todo notes
antonfirsov 708c3d2
Merge remote-tracking branch 'origin/master' into af/simd-conversion
antonfirsov 0f4f822
cleanup
antonfirsov 0e06eb6
benchmark conversion steps separately
antonfirsov 0f538ff
fixed benchmarks and optimized implementation
antonfirsov 664d838
fix accuracy issues
antonfirsov 10afe65
cleanup benchmarks
antonfirsov 17f6dcc
Bulk conversion of arbitrary-sized Span-s of scalars
antonfirsov 34ab918
fix benchmarks
antonfirsov 2fcda3c
simplify Rgba32.PixelOperations, include benchmark results
antonfirsov cb8b48d
cleanup code and comments
antonfirsov 82faeec
Merge remote-tracking branch 'origin/master' into af/simd-conversion
antonfirsov d1d52a7
FallbackIntrinsics128 + ImageMaths.Modulo* implementations
antonfirsov bf7c933
minimize ceremonial overhead
antonfirsov 520c6fc
fix comment
antonfirsov 5c687fa
address review findings + some more cleanup
antonfirsov 54ccf05
drop slow Clamp() implementation
antonfirsov 90c7153
remove useless reassignment in PixelOperations{TPixel}
antonfirsov 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
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.
You might wanna benchmark this. The
IComparableExtensions
version should be a good bit faster.I do, however want to ditch the extension method for more clear
MathUtils.Clamp***
methods.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.
Good point, will do compare!
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.
Do we need the duplication?
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.
The one in
ComparableExtensions
is faster, I'm removing this!