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

vcvt_u32_f32 saturating behaviour #1230

Open
cwiede opened this issue Oct 31, 2024 · 1 comment
Open

vcvt_u32_f32 saturating behaviour #1230

cwiede opened this issue Oct 31, 2024 · 1 comment

Comments

@cwiede
Copy link

cwiede commented Oct 31, 2024

Hi, first of all thanks for this great project. It's working like a charm!

I use the library in this way for simulating arm intrinsics on Intel/SSE machines.

#define SIMDE_ENABLE_NATIVE_ALIASES 
#include "simde/arm/neon.h"

Almost everything works perfectly, there is just a minor issue with saturating semantics of vcvt_u32_f32 and similar functions. These are defined to use the round towards zero mode, and so they are expected to saturate (and indeed they do on the ARM HW).

It is unfortunately not true with simde:

vcvt_u32_f32([2.1474836e+09, 4.2949673e+09])

is expected to return

[2147483648 4294967295]

but it actually returns

[2147483648 0]

Similar things happen with other vcvt variants and also the vcvt_n variants.

@mr-c
Copy link
Collaborator

mr-c commented Dec 11, 2024

@cwiede You are very welcome. Can you send a pull request to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants