core: fix float16_t optimization condition

- resolves issue on Windows ARM64
This commit is contained in:
Alexander Alekhin 2024-02-21 08:11:32 +00:00
parent 12aa0fe898
commit 02504e2bdb

View File

@ -844,7 +844,7 @@ protected:
float16_t() : w(0) {}
explicit float16_t(float x)
{
#if CV_FP16
#if CV_FP16 && CV_AVX2
__m128 v = _mm_load_ss(&x);
w = (ushort)_mm_cvtsi128_si32(_mm_cvtps_ph(v, 0));
#else
@ -875,7 +875,7 @@ protected:
operator float() const
{
#if CV_FP16
#if CV_FP16 && CV_AVX2
float f;
_mm_store_ss(&f, _mm_cvtph_ps(_mm_cvtsi32_si128(w)));
return f;