Merge pull request #27897 from asmorkalov:as/alernative_win_arm_neon_check

Enabled fp16 conversions, but disabled NEON FP16 arithmetics on Windows for ARM for now #27897

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Alexander Smorkalov 2025-10-13 19:40:11 +03:00 committed by GitHub
parent af49e0cc59
commit 0a25225b76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,8 @@
#include <stdio.h> #include <stdio.h>
#if (defined __GNUC__ && (defined __arm__ || defined __aarch64__)) || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC)) #if (defined __GNUC__ && (defined __arm__ || defined __aarch64__))/* || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC)) */
// Windows + ARM64 case disabled: https://github.com/opencv/opencv/issues/25052
#include "arm_neon.h" #include "arm_neon.h"
int test() int test()
{ {

View File

@ -1,6 +1,7 @@
#include <stdio.h> #include <stdio.h>
#if (defined __GNUC__ && (defined __arm__ || defined __aarch64__)) || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC)) #if (defined __GNUC__ && (defined __arm__ || defined __aarch64__)) /* || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC)) */
// Windows + ARM64 case disabled: https://github.com/opencv/opencv/issues/25052
#include "arm_neon.h" #include "arm_neon.h"
float16x8_t vld1q_as_f16(const float* src) float16x8_t vld1q_as_f16(const float* src)
@ -36,7 +37,7 @@ void test()
vprintreg("s1*s2[0]+s1*s2[1] + ... + s1*s2[7]", d); vprintreg("s1*s2[0]+s1*s2[1] + ... + s1*s2[7]", d);
} }
#else #else
#error "FP16 is not supported" #error "NEON FP16 is not supported"
#endif #endif
int main() int main()