Skip to content

Added PositiveInfOrHighestValue and NegativeInfOrLowestValue#2446

Merged
copybara-service[bot] merged 2 commits intogoogle:masterfrom
johnplatts:hwy_reduce_enh_011725
Jan 22, 2025
Merged

Added PositiveInfOrHighestValue and NegativeInfOrLowestValue#2446
copybara-service[bot] merged 2 commits intogoogle:masterfrom
johnplatts:hwy_reduce_enh_011725

Conversation

@johnplatts
Copy link
Copy Markdown
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
Copy Markdown
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 :)

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