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_f32_s32 is not correct in visual studio #1124

Open
xxxxxxLD opened this issue Jan 19, 2024 · 2 comments
Open

vcvt_f32_s32 is not correct in visual studio #1124

xxxxxxLD opened this issue Jan 19, 2024 · 2 comments

Comments

@xxxxxxLD
Copy link

xxxxxxLD commented Jan 19, 2024

I run and debug neon intrinsic by using simde in Visual Studio. When using simde_vcvt_f32_s32 to convert a slice of int number ,and it seems like the result not correct, the vector are all 12851, but the result of vcvt_f32_s32 is -nan(ind), 12851.0, 12851.0, ... Why the first of results is -nan(ind). By the way the specific intrinsic is vcvt_f32_s32(vmovl_s16(vget_low_s16(v_in))). Only the result of this intrinsic is not correct, vcvt_f32_s32(vmovl_s16(vget_high_s16(v_in))) is true.

@mr-c
Copy link
Collaborator

mr-c commented Jan 29, 2024

Hello @xxxxxxLD and thank you for sharing your issue

For which architecture are you compiling for?
Which version of MS Visual Studio are you running?
What compiler options are you using?

simde_vcvt_f32_s32(simde_int32x2_t a) {

I'm also surprised to see the result you are reporting.

@xxxxxxLD
Copy link
Author

I

Hello @xxxxxxLD and thank you for sharing your issue

For which architecture are you compiling for? Which version of MS Visual Studio are you running? What compiler options are you using?

simde_vcvt_f32_s32(simde_int32x2_t a) {

I'm also surprised to see the result you are reporting.

I'm just compile it in Visual Studio 2019, and see the result by debuging the code step by step.Only the first result of vcvt_f32_s32(vmovl_s16(vget_low_s16(v_in))) is not correct.And the vcvt_f32_s32 is explained by HEDLEY_STATIC_CAST(T,expr) (static_cast(expr)) in LINE 854 of hedley.h.

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