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

Fix conversion from simd8f to simd8i for MSVC ARM on Windows #3039

Closed
wants to merge 1 commit into from

Conversation

ebroglio
Copy link
Contributor

This is needed because the conversion between float32x4_t to int32x4_t needs to be done explicit.

Comment on lines +109 to +112
#if defined(DLIB_HAVE_NEON)
temp.low = simd4i(vcvtq_s32_f32(_low));
temp.high = simd4i(vcvtq_s32_f32(_high));
#else
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens exactly? It seems like this shouldn't be needed, since simd4f (which is what _low and _high are) has this already: inline operator int32x4_t() const { return vcvtq_s32_f32(x); }. And then simd4i has has this constructor as well inline simd4i(const int32x4_t& val):x(val) {}. So this change shouldn't be needed. But I guess visual studio is throwing some error? What's the error exactly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are completely right. For whatever reason the operator inline operator int32x4_t() was missing on my side. Actually it compiled just fine, only it resulted in a crash at runtime in fhog.h. I will close this pull request.

@ebroglio
Copy link
Contributor Author

Closed because it is a problem on my machine.

@ebroglio ebroglio closed this Dec 28, 2024
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

Successfully merging this pull request may close these issues.

2 participants