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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dlib/simd/simd8f.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,13 @@ namespace dlib
inline operator simd8i::rawarray() const
{
simd8i::rawarray temp;
#if defined(DLIB_HAVE_NEON)
temp.low = simd4i(vcvtq_s32_f32(_low));
temp.high = simd4i(vcvtq_s32_f32(_high));
#else
Comment on lines +109 to +112
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.

temp.low = simd4i(_low);
temp.high = simd4i(_high);
#endif
return temp;
}

Expand Down
Loading