1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

check FP16 build condition correctly

* use __GNUC_MINOR__ in correct place to check the version of GCC
  * check processor support of FP16 at run time
  * check compiler support of FP16 and pass correct compiler option
  * rely on ENABLE_AVX on gcc since AVX is generated when mf16c is passed
  * guard correctly using ifdef in case of various configuration
  * use v_float16x4 correctly by including the right header file
This commit is contained in:
Tomoaki Teshima
2016-09-21 15:42:54 +09:00
committed by Tomoaki Teshima
parent d5c202e46b
commit c7cb116dc0
4 changed files with 68 additions and 46 deletions
+1 -1
View File
@@ -310,7 +310,7 @@ enum CpuFeatures {
typedef union Cv16suf
{
short i;
#if ( defined (__arm__) || defined (__aarch64__) ) && !defined (__CUDACC__) && ( defined (__GNUC__) && ( ( ( 4 <= __GNUC__ ) && ( 7 <= __GNUC__ ) ) || ( 5 <= __GNUC__ ) ) )
#if ( defined (__arm__) || defined (__aarch64__) ) && !defined (__CUDACC__) && ( defined (__GNUC__) && ( ( ( 4 <= __GNUC__ ) && ( 7 <= __GNUC_MINOR__ ) ) || ( 5 <= __GNUC__ ) ) )
__fp16 h;
#endif
struct _fp16Format