From: mikael Date: Tue, 21 Sep 2021 17:46:33 +0000 (+0200) Subject: Detect FP16 on FreeBSD aarch64 X-Git-Tag: accepted/tizen/unified/20230127.161057~1^2~6^2~334^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7b4b750d8930b5bb6696cea6d609dc70a0597db;p=platform%2Fupstream%2Fopencv.git Detect FP16 on FreeBSD aarch64 --- diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index d8b8f67..df9e8a0 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -533,7 +533,7 @@ struct HWFeatures } #endif // CV_CPUID_X86 - #if defined __ANDROID__ || defined __linux__ + #if defined __ANDROID__ || defined __linux__ || defined __FreeBSD__ #ifdef __aarch64__ have[CV_CPU_NEON] = true; have[CV_CPU_FP16] = true; @@ -559,7 +559,7 @@ struct HWFeatures CV_LOG_INFO(NULL, "- FP16 instructions is NOT enabled via build flags"); #endif #endif - #elif defined __arm__ + #elif defined __arm__ && !defined __FreeBSD__ int cpufile = open("/proc/self/auxv", O_RDONLY); if (cpufile >= 0)