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

masked hmin and hmax should support infinities #68

Open
mattkretz opened this issue Mar 28, 2018 · 0 comments
Open

masked hmin and hmax should support infinities #68

mattkretz opened this issue Mar 28, 2018 · 0 comments
Labels
Parallelism 2 TS issues that may need to be handled in the TS

Comments

@mattkretz
Copy link
Owner

mattkretz commented Mar 28, 2018

The current specification works fine for finite values. But if a user expects hmin/hmax to give correct results when infinities may be in the input, then the current specification makes this impossible to implement efficiently.

Suggested fix:

template<class T, class V>
typename V::value_type hmin(const const_where_expression<M, V>& x);

Returns: If none_of(x.mask), the return value is numeric_limits<V::value_type>::max()infinity().

template<class T, class V>
typename V::value_type hmax(const const_where_expression<M, V>& x);

Returns: If none_of(x.mask), the return value is -numeric_limits<V::value_type>::lowest()infinity().

@mattkretz mattkretz added the Parallelism 2 TS issues that may need to be handled in the TS label Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Parallelism 2 TS issues that may need to be handled in the TS
Projects
None yet
Development

No branches or pull requests

1 participant