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

_hlslpp_sel_ps NEON #18

Closed
davidebaltieri31 opened this issue May 17, 2019 · 2 comments
Closed

_hlslpp_sel_ps NEON #18

davidebaltieri31 opened this issue May 17, 2019 · 2 comments
Labels

Comments

@davidebaltieri31
Copy link

I think there is a mistake in the NEON definition of _hlslpp_sel_ps
The SSE definition is
#define _hlslpp_sel_ps(x, y, mask) _mm_blendv_ps((x), (y), (mask))
which is correct, whem mask is 1 y is selected otherwise x
in NEON
#define _hlslpp_sel_ps(x, y, mask) vbslq_f32((mask), (x), (y))
which should be
#define _hlslpp_sel_ps(x, y, mask) vbslq_f32((mask), (y), (x))
in vbslq_f32 when mask is one the second argument is selected otherwise the third

@redorav redorav added the bug label May 19, 2019
@redorav
Copy link
Owner

redorav commented May 19, 2019

I think you're right. Interestingly _hlslpp_blend_ps was alright, I negated the mask to account for it. What I've done now is reverse the operands and not negate the mask anymore for consistency. Thanks!

@redorav
Copy link
Owner

redorav commented May 19, 2019

Fixed via 85e8e0d

@redorav redorav closed this as completed May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants