@ -5,6 +5,10 @@
# A V X / A V X 2 / A V X _ 5 1 2 F
# A V X / A V X 2 / A V X _ 5 1 2 F
# F M A 3
# F M A 3
# p p c 6 4 l e a r c h :
# VSX ( always available on Power8 )
# VSX3 ( always available on Power9 )
# C P U _ { o p t } _ S U P P O R T E D = O N / O F F - c o m p i l e r support ( possibly with additional flag )
# C P U _ { o p t } _ S U P P O R T E D = O N / O F F - c o m p i l e r support ( possibly with additional flag )
# C P U _ { o p t } _ I M P L I E S = < l i s t >
# C P U _ { o p t } _ I M P L I E S = < l i s t >
# C P U _ { o p t } _ F O R C E = < l i s t > - s u b s e t o f " i m p l i e s " l i s t
# C P U _ { o p t } _ F O R C E = < l i s t > - s u b s e t o f " i m p l i e s " l i s t
@ -29,7 +33,7 @@
set ( CPU_ALL_OPTIMIZATIONS "SSE;SSE2;SSE3;SSSE3;SSE4_1;SSE4_2;POPCNT;AVX;FP16;AVX2;FMA3;AVX_512F;AVX512_SKX" )
set ( CPU_ALL_OPTIMIZATIONS "SSE;SSE2;SSE3;SSSE3;SSE4_1;SSE4_2;POPCNT;AVX;FP16;AVX2;FMA3;AVX_512F;AVX512_SKX" )
list ( APPEND CPU_ALL_OPTIMIZATIONS NEON VFPV3 FP16 )
list ( APPEND CPU_ALL_OPTIMIZATIONS NEON VFPV3 FP16 )
list ( APPEND CPU_ALL_OPTIMIZATIONS VSX )
list ( APPEND CPU_ALL_OPTIMIZATIONS VSX VSX3 )
list ( REMOVE_DUPLICATES CPU_ALL_OPTIMIZATIONS )
list ( REMOVE_DUPLICATES CPU_ALL_OPTIMIZATIONS )
ocv_update ( CPU_VFPV3_FEATURE_ALIAS "" )
ocv_update ( CPU_VFPV3_FEATURE_ALIAS "" )
@ -81,7 +85,7 @@ ocv_optimization_process_obsolete_option(ENABLE_FMA3 FMA3 ON)
ocv_optimization_process_obsolete_option ( ENABLE_VFPV3 VFPV3 OFF )
ocv_optimization_process_obsolete_option ( ENABLE_VFPV3 VFPV3 OFF )
ocv_optimization_process_obsolete_option ( ENABLE_NEON NEON OFF )
ocv_optimization_process_obsolete_option ( ENABLE_NEON NEON OFF )
ocv_optimization_process_obsolete_option ( ENABLE_VSX VSX OFF )
ocv_optimization_process_obsolete_option ( ENABLE_VSX VSX ON )
macro ( ocv_is_optimization_in_list resultvar check_opt )
macro ( ocv_is_optimization_in_list resultvar check_opt )
set ( __checked "" )
set ( __checked "" )
@ -289,14 +293,24 @@ elseif(ARM OR AARCH64)
set ( CPU_BASELINE "NEON;FP16" CACHE STRING "${HELP_CPU_BASELINE}" )
set ( CPU_BASELINE "NEON;FP16" CACHE STRING "${HELP_CPU_BASELINE}" )
endif ( )
endif ( )
elseif ( PPC64LE )
elseif ( PPC64LE )
ocv_update ( CPU_KNOWN_OPTIMIZATIONS "VSX" )
ocv_update ( CPU_KNOWN_OPTIMIZATIONS "VSX;VSX3 " )
ocv_update ( CPU_VSX_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_vsx.cpp" )
ocv_update ( CPU_VSX_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_vsx.cpp" )
ocv_update ( CPU_VSX3_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_vsx3.cpp" )
if ( NOT OPENCV_CPU_OPT_IMPLIES_IGNORE )
ocv_update ( CPU_VSX3_IMPLIES "VSX" )
endif ( )
if ( CV_CLANG AND ( NOT ${ CMAKE_CXX_COMPILER } MATCHES "xlc" ) )
if ( CV_CLANG AND ( NOT ${ CMAKE_CXX_COMPILER } MATCHES "xlc" ) )
ocv_update ( CPU_VSX_FLAGS_ON "-mvsx -maltivec" )
ocv_update ( CPU_VSX_FLAGS_ON "-mvsx -maltivec" )
ocv_update ( CPU_VSX3_FLAGS_ON "-mpower9-vector" )
else ( )
else ( )
ocv_update ( CPU_VSX_FLAGS_ON "-mcpu=power8" )
ocv_update ( CPU_VSX_FLAGS_ON "-mcpu=power8" )
ocv_update ( CPU_VSX3_FLAGS_ON "-mcpu=power9 -mtune=power9" )
endif ( )
endif ( )
set ( CPU_DISPATCH "VSX3" CACHE STRING "${HELP_CPU_DISPATCH}" )
set ( CPU_BASELINE "VSX" CACHE STRING "${HELP_CPU_BASELINE}" )
endif ( )
endif ( )
# H e l p e r v a l u e s f o r c m a k e - g u i
# H e l p e r v a l u e s f o r c m a k e - g u i