-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Shared code for array min/max functions #19098
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
Conversation
c7ec2e4 to
3e3213f
Compare
TurboGit
left a comment
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.
Minor style comment, apart from that it is good to go to me. TIA.
TurboGit
left a comment
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.
Thanks! I'll handle the const.
|
Thanks! I was away of the computer most of today, saw the last couple of messages only now. |
|
No problem, the changes were trivial and you've done already all the hard work. |
|
With this PR merged, the compilation of This is not detected by CI, but it breaks the nightly builds: To reproduce you need to compile with |
|
Will look into it ASAP |
|
ok, this can be fixed by adding in I will provide a PR, ok? |
Suggested by @TurboGit here: #19026 (comment)
There are many places where the min/max of a 3 or 4-element float or double array is calculated. The aim was to provide a shared implementation. Later, it turned out we already have some:
openmp_maths.halready hasand
There is also
dt_vector_channel_maxincommon/math.hfrom @ralfbrown edbaa84. As I understand it, that's vectorised code, it looks very surprising to me (counter-intuitive, with the extra allocations and extra work), but perf tuning is magic. :-)We have a few places that may not be aligned, there are some that use 4 components, and there are a few in double precision.