。加速策略概述:算法本身优化裁剪,opencl加速,fastcv(高通手机),neon(arm),dsp指令,open omp,硬件加速单元
。open omp打开编译器openmp支持,增加代码即可;
#pragma omp parallel for
xx codexxx
find_package(OpenMP)
if (OPENMP_FOUND)
MESSAGE("OPENMP FOUND")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
elseif ()
MESSAGE("CAN NOT FOUND OPENMP")
endif()