Skip to content
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

Added PositiveInfOrHighestValue and NegativeInfOrLowestValue #2446

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

johnplatts
Copy link
Contributor

Added hwy::PositiveInfOrHighestValue<T>(), which returns positive infinity if T is a floating point type or hwy::HighestValue<T>() if T is an integer type.

Also added hwy::NegativeInfOrLowestValue<T>() which returns negative infinity if T is a floating point type or hwy::HighestValue<T>() if T is an integer type.

Also updated EMU128 ReduceMin/ReduceMax to use hwy::PositiveInfOrHighestValue<T>() and hwy::NegativeInfOrLowestValue<T>().

jan-wassenberg
jan-wassenberg previously approved these changes Jan 21, 2025
Copy link
Member

@jan-wassenberg jan-wassenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement, thanks :)

@copybara-service copybara-service bot merged commit b5dd1c4 into google:master Jan 22, 2025
38 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants