mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 09:25:45 +08:00
core: fix float16_t optimization condition
- resolves issue on Windows ARM64
This commit is contained in:
parent
12aa0fe898
commit
02504e2bdb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user