Skip to content

Commit

Permalink
fix #4136
Browse files Browse the repository at this point in the history
  • Loading branch information
vigsterkr committed Jan 30, 2018
1 parent 3eda6e4 commit cf7f89c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 7 additions & 1 deletion cmake/ShogunFindLAPACK.cmake
Expand Up @@ -22,6 +22,12 @@ IF (LAPACK_FOUND)
MESSAGE(STATUS "Enabling Accelerate.framework as LAPACK backend for Eigen.")
SET(EIGEN_USE_LAPACKE_STRICT 1)
LIST(APPEND LAPACK_LIBRARIES ${LAPACKE_LIBRARY})
find_library(VECLIB vecLib)
if (VECLIB)
LIST(APPEND LAPACK_LIBRARIES ${VECLIB})
else()
MESSAGE(FATAL_ERROR "Accelerate.framework without vecLib.framework!")
endif()
endif()
endif()
ELSEIF("${LAPACK_LIBRARIES}" MATCHES ".*/.*mkl_.*")
Expand Down Expand Up @@ -92,7 +98,7 @@ IF (LAPACK_FOUND)
ENDIF()

IF(FOUND_CBLAS_DGEMV AND NOT HAVE_ATLAS)
#check is detected BLAS/LAPACK is OpenBLAS by looking for an OpenBLAS specific function
#check is detected BLAS/LAPACK is OpenBLAS by looking for an OpenBLAS specific function
check_library_exists("${LAPACK_LIBRARIES}" openblas_set_num_threads "" OpenBLAS_FOUND)
IF(OpenBLAS_FOUND)
#check if cblas.h exists
Expand Down
8 changes: 1 addition & 7 deletions src/shogun/mathematics/lapack.h
@@ -1,7 +1,7 @@
/*
* This software is distributed under BSD 3-clause license (see LICENSE file).
*
* Authors: Sergey Lisitsyn, Viktor Gal, Soeren Sonnenburg, Soumyajit De,
* Authors: Sergey Lisitsyn, Viktor Gal, Soeren Sonnenburg, Soumyajit De,
* Evan Shelhamer, Björn Esser
*/

Expand All @@ -19,13 +19,7 @@ extern "C" {
#include <mkl_cblas.h>
#include <mkl_lapack.h>
#elif defined(HAVE_MVEC)
//FIXME: Accelerate framework's vForce.h forward declares
// std::complex<> classes that causes major errors
// in c++11 mode and Eigen3
// this define basically disables the include of vForce.h
#ifdef HAVE_CXX11
#define __VFORCE_H 1
#endif
#if !(defined(EIGEN_USE_LAPACKE) || defined(EIGEN_USE_LAPACKE_STRICT))
#include <Accelerate/Accelerate.h>
#else
Expand Down

0 comments on commit cf7f89c

Please sign in to comment.