You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks a lot for your work on std-simd, it's looking very well so far!
I was attempting my first code at using your library. I have previously used Vc, as well as other vectorization libraries. I bumped into the following use-case: I would like to calculate the index of the lowest element in a vector, out of some active elements in a mask. Looking at the following document:
I found that there is hmin, which can accept a const_where_expression, which sort-of does what I want but not quite, since this returns the value of the lowest element, not the index. In order to further fetch the index, I figured one can create yet another mask comparing with the obtained value, and then find the index of that. Ie. see the following pseudo-code:
As a user, having member functions simd::min_element & simd::max_element instead of hmin and hmax would reduce my cognitive burden. They would give a nod to the std algorithms that return by iterator rather than value.
Hi there,
Thanks a lot for your work on
std-simd
, it's looking very well so far!I was attempting my first code at using your library. I have previously used Vc, as well as other vectorization libraries. I bumped into the following use-case: I would like to calculate the index of the lowest element in a vector, out of some active elements in a mask. Looking at the following document:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/n4808.pdf
I found that there is
hmin
, which can accept aconst_where_expression
, which sort-of does what I want but not quite, since this returns the value of the lowest element, not the index. In order to further fetch the index, I figured one can create yet another mask comparing with the obtained value, and then find the index of that. Ie. see the following pseudo-code:Testcase
With this, I have two questions:
hmin
anywhere in the library. Perhaps I am looking at an outdated documentation?std-simd
?The text was updated successfully, but these errors were encountered: