find_package(vecLib REQUIRED)
include_directories(SYSTEM ${vecLib_INCLUDE_DIR})
list(APPEND Caffe_LINKER_LIBS ${vecLib_LINKER_LIBS})
+
+ if(VECLIB_FOUND)
+ if(NOT vecLib_INCLUDE_DIR MATCHES "^/System/Library/Frameworks/vecLib.framework.*")
+ add_definitions(-DUSE_ACCELERATE)
+ endif()
+ endif()
endif()
# ---[ Python
#else // If use MKL, simply include the MKL header
+#ifdef USE_ACCELERATE
+#include <Accelerate/Accelerate.h>
+#else
extern "C" {
#include <cblas.h>
}
+#endif // USE_ACCELERATE
+
#include <math.h>
// Functions that caffe uses but are not present if MKL is not linked.