diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt index 71407459c..7e7a47199 100644 --- a/modules/dnn/CMakeLists.txt +++ b/modules/dnn/CMakeLists.txt @@ -36,35 +36,12 @@ include(cmake/OpenCVFindLibProtobuf.cmake) ocv_source_group("Src\\protobuf" FILES ${PROTOBUF_SRCS} ${PROTOBUF_HDRS}) ocv_module_include_directories(include ${PROTOBUF_INCLUDE_DIR}) -# ---------------------------------------------------------------------------- -# Try to find BLAS libraries -# ---------------------------------------------------------------------------- -OCV_OPTION(${the_module}_WITH_BLAS "Use external BLAS library to speedup processing" OFF) -include(cmake/OpenCVFindCBLAS.cmake) - ocv_glob_module_sources(${PROTOBUF_SRCS} ${PROTOBUF_HDRS} ${CBLAS_H_PROXY_PATH}) ocv_create_module(${PROTOBUF_LIBRARIES}) ocv_add_samples() ocv_add_accuracy_tests() ocv_add_perf_tests() -# ---------------------------------------------------------------------------- -# Link BLAS -# ---------------------------------------------------------------------------- -if(${the_module}_WITH_BLAS AND HAVE_BLAS) - add_definitions(-DHAVE_CBLAS=1) - ocv_module_include_directories(${${the_module}_BLAS_INCLUDE_DIR}) - ocv_add_dependencies(${the_module} ${${the_module}_BLAS_LIBRARIES}) - target_link_libraries(${the_module} ${${the_module}_BLAS_LIBRARIES}) - - if(${the_module}_BLAS_BINARIES) - ocv_install_target(${the_module} EXPORT ${the_module}_BLAS_BINARIES - RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs) - endif() -else() - add_definitions(-DHAVE_CBLAS=0) -endif() - # ---------------------------------------------------------------------------- # Download pre-trained models for complex testing on GoogLeNet and AlexNet # ---------------------------------------------------------------------------- diff --git a/modules/dnn/cmake/FindAtlas.cmake b/modules/dnn/cmake/FindAtlas.cmake deleted file mode 100644 index 9781e9b12..000000000 --- a/modules/dnn/cmake/FindAtlas.cmake +++ /dev/null @@ -1,97 +0,0 @@ -#COPYRIGHT -# -#All contributions by the University of California: -#Copyright (c) 2014, 2015, The Regents of the University of California (Regents) -#All rights reserved. -# -#All other contributions: -#Copyright (c) 2014, 2015, the respective contributors -#All rights reserved. -# -#Caffe uses a shared copyright model: each contributor holds copyright over -#their contributions to Caffe. The project versioning records all such -#contribution and copyright details. If a contributor wants to further mark -#their specific copyright on a particular contribution, they should indicate -#their copyright solely in the commit message of the change when it is -#committed. -# -#LICENSE -# -#Redistribution and use in source and binary forms, with or without -#modification, are permitted provided that the following conditions are met: -# -#1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -#2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -#ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -#WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -#ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -#(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -#ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -#SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -#CONTRIBUTION AGREEMENT -# -#By contributing to the BVLC/caffe repository through pull-request, comment, -#or otherwise, the contributor releases their content to the -#license and copyright terms herein. - - -# Find the Atlas (and Lapack) libraries -# -# The following variables are optionally searched for defaults -# Atlas_ROOT_DIR: Base directory where all Atlas components are found -# -# The following are set after configuration is done: -# Atlas_FOUND -# Atlas_INCLUDE_DIRS -# Atlas_LIBRARIES -# Atlas_LIBRARYRARY_DIRS - -set(Atlas_INCLUDE_SEARCH_PATHS - /usr/include/atlas - /usr/include/atlas-base - $ENV{Atlas_ROOT_DIR} - $ENV{Atlas_ROOT_DIR}/include -) - -set(Atlas_LIB_SEARCH_PATHS - /usr/lib/atlas - /usr/lib/atlas-base - $ENV{Atlas_ROOT_DIR} - $ENV{Atlas_ROOT_DIR}/lib -) - -find_path(Atlas_CBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Atlas_INCLUDE_SEARCH_PATHS}) -find_path(Atlas_CLAPACK_INCLUDE_DIR NAMES clapack.h PATHS ${Atlas_INCLUDE_SEARCH_PATHS}) - -find_library(Atlas_CBLAS_LIBRARY NAMES ptcblas_r ptcblas cblas_r cblas PATHS ${Atlas_LIB_SEARCH_PATHS}) -find_library(Atlas_BLAS_LIBRARY NAMES atlas_r atlas PATHS ${Atlas_LIB_SEARCH_PATHS}) -find_library(Atlas_LAPACK_LIBRARY NAMES alapack_r alapack lapack_atlas PATHS ${Atlas_LIB_SEARCH_PATHS}) - -set(LOOKED_FOR - Atlas_CBLAS_INCLUDE_DIR - Atlas_CLAPACK_INCLUDE_DIR - - Atlas_CBLAS_LIBRARY - Atlas_BLAS_LIBRARY - Atlas_LAPACK_LIBRARY -) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Atlas DEFAULT_MSG ${LOOKED_FOR}) - -if(ATLAS_FOUND) - set(Atlas_INCLUDE_DIR ${Atlas_CBLAS_INCLUDE_DIR} ${Atlas_CLAPACK_INCLUDE_DIR}) - set(Atlas_LIBRARIES ${Atlas_LAPACK_LIBRARY} ${Atlas_CBLAS_LIBRARY} ${Atlas_BLAS_LIBRARY}) - mark_as_advanced(${LOOKED_FOR}) - - message(STATUS "Found Atlas (include: ${Atlas_CBLAS_INCLUDE_DIR}, library: ${Atlas_BLAS_LIBRARY})") -endif(ATLAS_FOUND) \ No newline at end of file diff --git a/modules/dnn/cmake/FindOpenBLAS.cmake b/modules/dnn/cmake/FindOpenBLAS.cmake deleted file mode 100644 index 60594dee4..000000000 --- a/modules/dnn/cmake/FindOpenBLAS.cmake +++ /dev/null @@ -1,106 +0,0 @@ -#COPYRIGHT -# -#All contributions by the University of California: -#Copyright (c) 2014, 2015, The Regents of the University of California (Regents) -#All rights reserved. -# -#All other contributions: -#Copyright (c) 2014, 2015, the respective contributors -#All rights reserved. -# -#Caffe uses a shared copyright model: each contributor holds copyright over -#their contributions to Caffe. The project versioning records all such -#contribution and copyright details. If a contributor wants to further mark -#their specific copyright on a particular contribution, they should indicate -#their copyright solely in the commit message of the change when it is -#committed. -# -#LICENSE -# -#Redistribution and use in source and binary forms, with or without -#modification, are permitted provided that the following conditions are met: -# -#1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -#2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -#ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -#WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -#ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -#(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -#ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -#SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -#CONTRIBUTION AGREEMENT -# -#By contributing to the BVLC/caffe repository through pull-request, comment, -#or otherwise, the contributor releases their content to the -#license and copyright terms herein. - -SET(Open_BLAS_INCLUDE_SEARCH_PATHS - /usr/include - /usr/include/openblas - /usr/include/openblas-base - /usr/local/include - /usr/local/include/openblas - /usr/local/include/openblas-base - /opt/OpenBLAS/include - $ENV{OpenBLAS_HOME} - $ENV{OpenBLAS_HOME}/include -) - -SET(Open_BLAS_LIB_SEARCH_PATHS - /lib/ - /lib/openblas-base - /lib64/ - /usr/lib - /usr/lib/openblas-base - /usr/lib64 - /usr/local/lib - /usr/local/lib64 - /opt/OpenBLAS/lib - $ENV{OpenBLAS}cd - $ENV{OpenBLAS}/lib - $ENV{OpenBLAS_HOME} - $ENV{OpenBLAS_HOME}/lib - ) - -FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS}) -FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS}) - -SET(OpenBLAS_FOUND ON) - -# Check include files -IF(NOT OpenBLAS_INCLUDE_DIR) - SET(OpenBLAS_FOUND OFF) - MESSAGE(STATUS "Could not find OpenBLAS include. Turning OpenBLAS_FOUND off") -ENDIF() - -# Check libraries -IF(NOT OpenBLAS_LIB) - SET(OpenBLAS_FOUND OFF) - MESSAGE(STATUS "Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off") -ENDIF() - -IF (OpenBLAS_FOUND) - IF (NOT OpenBLAS_FIND_QUIETLY) - MESSAGE(STATUS "Found OpenBLAS libraries: ${OpenBLAS_LIB}") - MESSAGE(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}") - ENDIF (NOT OpenBLAS_FIND_QUIETLY) -ELSE (OpenBLAS_FOUND) - IF (OpenBLAS_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find OpenBLAS") - ENDIF (OpenBLAS_FIND_REQUIRED) -ENDIF (OpenBLAS_FOUND) - -MARK_AS_ADVANCED( - OpenBLAS_INCLUDE_DIR - OpenBLAS_LIB - OpenBLAS -) \ No newline at end of file diff --git a/modules/dnn/cmake/OpenCVFindCBLAS.cmake b/modules/dnn/cmake/OpenCVFindCBLAS.cmake deleted file mode 100644 index 2c4179b44..000000000 --- a/modules/dnn/cmake/OpenCVFindCBLAS.cmake +++ /dev/null @@ -1,60 +0,0 @@ -macro(_find_file_in_dirs VAR NAME DIRS) - find_path(${VAR} ${NAME} ${DIRS} NO_DEFAULT_PATH) - set(${VAR} ${${VAR}}/${NAME}) - unset(${VAR} CACHE) -endmacro() - -if(${the_module}_WITH_BLAS) - set(_bp ${the_module}_BLAS) #prefix for blas variables - set(BLAS_CBLAS_H "cblas.h") - set(HAVE_BLAS "") - - if(NOT HAVE_BLAS) #check custom BLAS from user input - if(${_bp}_INCLUDE_DIR AND ${_bp}_LIBRARIES AND ${_bp}_CBLAS_H) - set(HAVE_BLAS "Custom") - endif() - endif() - if(NOT HAVE_BLAS) - include(cmake/OpenCVFindMKL.cmake) - if(HAVE_MKL) - set(BLAS_INCLUDE_DIR ${MKL_INCLUDE_DIRS}) - set(BLAS_LIBRARIES ${MKL_LIBRARIES} ) - set(BLAS_CBLAS_H "mkl_cblas.h" ) - set(HAVE_BLAS "MKL") - endif() - endif() - if(NOT HAVE_BLAS) - include(cmake/FindOpenBLAS.cmake) - if(OpenBLAS_FOUND) - set(BLAS_INCLUDE_DIR ${OpenBLAS_INCLUDE_DIR} ) - set(BLAS_LIBRARIES ${OpenBLAS_LIB} ) - set(HAVE_BLAS "OpenBLAS") - endif() - endif() - if(NOT HAVE_BLAS AND UNIX) - include(cmake/FindAtlas.cmake) - if(ATLAS_FOUND) - set(BLAS_INCLUDE_DIR ${Atlas_INCLUDE_DIR}) - set(BLAS_LIBRARIES ${Atlas_LIBRARIES} ) - set(HAVE_BLAS "Atlas") - endif() - endif() - - if(NOT HAVE_BLAS OR NOT (HAVE_BLAS STREQUAL "Custom")) - set(${_bp}_INCLUDE_DIR ${BLAS_INCLUDE_DIR} CACHE PATH "Path to BLAS include dir" FORCE) - set(${_bp}_CBLAS_H ${BLAS_CBLAS_H} CACHE STRING "Alternative name of cblas.h" FORCE) - set(${_bp}_LIBRARIES ${BLAS_LIBRARIES} CACHE FILEPATH "Path to BLAS libraries that will be linked with ${the_module} module" FORCE) - set(${_bp}_BINARIES ${BLAS_BINARIES} CACHE FILEPATH "Path to BLAS binaries (.so, .dll) that will be installed with ${the_module} module" FORCE) - endif() - - if(HAVE_BLAS) #adding proxy cblas.h header - _find_file_in_dirs(CBLAS_H_PATH ${${_bp}_CBLAS_H} ${${_bp}_INCLUDE_DIR}) - if(NOT CBLAS_H_PATH) - message(WARNING "CBLAS header '${${_bp}_CBLAS_H}' not found into '${${_bp}_INCLUDE_DIR}'") - endif() - - set(CBLAS_H_PROXY_PATH ${CMAKE_CURRENT_BINARY_DIR}/opencv_cblas.hpp) - set(_include_str "\#include \"${CBLAS_H_PATH}\"") - file(WRITE ${CBLAS_H_PROXY_PATH} ${_include_str}) - endif() -endif() \ No newline at end of file diff --git a/modules/dnn/cmake/OpenCVFindMKL.cmake b/modules/dnn/cmake/OpenCVFindMKL.cmake deleted file mode 100644 index f43ce9c28..000000000 --- a/modules/dnn/cmake/OpenCVFindMKL.cmake +++ /dev/null @@ -1,136 +0,0 @@ -# -# The script to detect Intel(R) Math Kernel Library (MKL) -# installation/package -# -# Parameters: -# MKL_WITH_TBB -# -# On return this will define: -# -# HAVE_MKL - True if Intel IPP found -# MKL_ROOT_DIR - root of IPP installation -# MKL_INCLUDE_DIRS - IPP include folder -# MKL_LIBRARIES - IPP libraries that are used by OpenCV -# - -macro (mkl_find_lib VAR NAME DIRS) - find_path(${VAR} ${NAME} ${DIRS} NO_DEFAULT_PATH) - set(${VAR} ${${VAR}}/${NAME}) - unset(${VAR} CACHE) -endmacro() - -macro(mkl_fail) - set(HAVE_MKL OFF CACHE BOOL "True if MKL found") - set(MKL_ROOT_DIR ${MKL_ROOT_DIR} CACHE PATH "Path to MKL directory") - unset(MKL_INCLUDE_DIRS CACHE) - unset(MKL_LIBRARIES CACHE) - return() -endmacro() - -macro(get_mkl_version VERSION_FILE) - # read MKL version info from file - file(STRINGS ${VERSION_FILE} STR1 REGEX "__INTEL_MKL__") - file(STRINGS ${VERSION_FILE} STR2 REGEX "__INTEL_MKL_MINOR__") - file(STRINGS ${VERSION_FILE} STR3 REGEX "__INTEL_MKL_UPDATE__") - #file(STRINGS ${VERSION_FILE} STR4 REGEX "INTEL_MKL_VERSION") - - # extract info and assign to variables - string(REGEX MATCHALL "[0-9]+" MKL_VERSION_MAJOR ${STR1}) - string(REGEX MATCHALL "[0-9]+" MKL_VERSION_MINOR ${STR2}) - string(REGEX MATCHALL "[0-9]+" MKL_VERSION_UPDATE ${STR3}) - set(MKL_VERSION_STR "${MKL_VERSION_MAJOR}.${MKL_VERSION_MINOR}.${MKL_VERSION_UPDATE}" CACHE STRING "MKL version" FORCE) -endmacro() - - -if(NOT DEFINED MKL_USE_MULTITHREAD) - OCV_OPTION(MKL_WITH_TBB "Use MKL with TBB multithreading" OFF)#ON IF WITH_TBB) - OCV_OPTION(MKL_WITH_OPENMP "Use MKL with OpenMP multithreading" OFF)#ON IF WITH_OPENMP) -endif() - -#check current MKL_ROOT_DIR -if(NOT MKL_ROOT_DIR OR NOT EXISTS ${MKL_ROOT_DIR}/include/mkl.h) - set(mkl_root_paths ${MKL_ROOT_DIR}) - if(DEFINED $ENV{MKLROOT}) - list(APPEND mkl_root_paths $ENV{MKLROOT}) - endif() - if(WIN32) - set(ProgramFilesx86 "ProgramFiles(x86)") - list(APPEND mkl_root_paths $ENV{${ProgramFilesx86}}/IntelSWTools/compilers_and_libraries/windows/mkl) - endif() - if(UNIX) - list(APPEND mkl_root_paths "/opt/intel/mkl") - endif() - - find_path(MKL_ROOT_DIR include/mkl.h PATHS ${mkl_root_paths}) -endif() - -if(NOT MKL_ROOT_DIR) - mkl_fail() -endif() - -set(MKL_INCLUDE_DIRS ${MKL_ROOT_DIR}/include) -get_mkl_version(${MKL_INCLUDE_DIRS}/mkl_version.h) - -#determine arch -if(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8) - set(MKL_X64 1) - set(MKL_ARCH "intel64") - - include(CheckTypeSize) - CHECK_TYPE_SIZE(int _sizeof_int) - if (_sizeof_int EQUAL 4) - set(MKL_LP64 "lp64") - else() - set(MKL_LP64 "ilp64") - endif() -else() - set(MKL_ARCH "ia32") -endif() - -if(${MKL_VERSION_STR} VERSION_GREATER "11.3.0" OR ${MKL_VERSION_STR} VERSION_EQUAL "11.3.0") - set(mkl_lib_find_paths - ${MKL_ROOT_DIR}/lib - ${MKL_ROOT_DIR}/lib/${MKL_ARCH} ${MKL_ROOT_DIR}/../tbb/lib/${MKL_ARCH}) - - set(mkl_lib_list - mkl_core - mkl_intel_${MKL_LP64}) - - if(MKL_WITH_TBB) - list(APPEND mkl_lib_list mkl_tbb_thread tbb) - elseif(MKL_WITH_OPENMP) - if(MSVC) - list(APPEND mkl_lib_list mkl_intel_thread libiomp5md) - else() - list(APPEND mkl_lib_list libmkl_gnu_thread) - endif() - else() - list(APPEND mkl_lib_list mkl_sequential) - endif() -else() - message(STATUS "MKL version ${MKL_VERSION_STR} is not supported") - mkl_fail() -endif() - - -set(MKL_LIBRARIES "") -foreach(lib ${mkl_lib_list}) - find_library(${lib} ${lib} ${mkl_lib_find_paths}) - mark_as_advanced(${lib}) - if(NOT ${lib}) - mkl_fail() - endif() - list(APPEND MKL_LIBRARIES ${${lib}}) -endforeach() - -message(STATUS "Found MKL ${MKL_VERSION_STR} at: ${MKL_ROOT_DIR}") -set(HAVE_MKL ON CACHE BOOL "True if MKL found") -set(MKL_ROOT_DIR ${MKL_ROOT_DIR} CACHE PATH "Path to MKL directory") -set(MKL_INCLUDE_DIRS ${MKL_INCLUDE_DIRS} CACHE PATH "Path to MKL include directory") -if(NOT UNIX) - set(MKL_LIBRARIES ${MKL_LIBRARIES} CACHE FILEPATH "MKL libarries") -else() - #it's ugly but helps to avoid cyclic lib problem - set(MKL_LIBRARIES ${MKL_LIBRARIES} ${MKL_LIBRARIES} ${MKL_LIBRARIES} "-lpthread" "-lm" "-ldl") - set(MKL_LIBRARIES ${MKL_LIBRARIES} CACHE STRING "MKL libarries") -endif() \ No newline at end of file diff --git a/modules/dnn/src/layers/op_blas.cpp b/modules/dnn/src/layers/op_blas.cpp index 375d36563..5f7f44663 100644 --- a/modules/dnn/src/layers/op_blas.cpp +++ b/modules/dnn/src/layers/op_blas.cpp @@ -1,7 +1,7 @@ #include "op_blas.hpp" -#if HAVE_CBLAS -#include "opencv_cblas.hpp" +#ifdef HAVE_LAPACK +#include "opencv_lapack.h" #endif #include @@ -99,15 +99,7 @@ public: void gemmCPU(const Mat &A, const Mat &B, double alpha, Mat &C, double beta, int flags /*= 0*/) { - if( C.type() == CV_32F && flags == 0 ) - { - GEMMInvoker invoker(&A, &B, alpha, &C, beta); - double granularity = 10000000./((double)A.rows*A.cols); - parallel_for_(Range(0, B.cols), invoker, granularity); - } - else - { - #if HAVE_CBLAS + #ifdef HAVE_LAPACK bool transA = static_cast(flags & GEMM_1_T); bool transB = static_cast(flags & GEMM_2_T); bool transC = static_cast(flags & GEMM_3_T); @@ -145,9 +137,15 @@ void gemmCPU(const Mat &A, const Mat &B, double alpha, Mat &C, double beta, int CV_Error(Error::BadDepth, "Only floating point types are supported"); } #else - cv::gemm(A, B, alpha, C, beta, C, flags); - #endif + if( C.type() == CV_32F && flags == 0 ) + { + GEMMInvoker invoker(&A, &B, alpha, &C, beta); + double granularity = 10000000./((double)A.rows*A.cols); + parallel_for_(Range(0, B.cols), invoker, granularity); } + else + cv::gemm(A, B, alpha, C, beta, C, flags); + #endif } int getBlasThreads() diff --git a/modules/dnn/src/layers/shift_layer.cpp b/modules/dnn/src/layers/shift_layer.cpp index 451b91900..98bfdfc73 100644 --- a/modules/dnn/src/layers/shift_layer.cpp +++ b/modules/dnn/src/layers/shift_layer.cpp @@ -133,7 +133,7 @@ ShiftLayer::ShiftLayer(LayerParams ¶ms) : Layer(params) { CV_Assert(blobs.size() == 1); - #if HAVE_CBLAS + #ifdef HAVE_LAPACK { if (getBlasThreads() != cv::getThreadNum()) {