add test for accelerate framework
This commit is contained in:
36
modules/math/accelerate.cmake
Normal file
36
modules/math/accelerate.cmake
Normal file
@ -0,0 +1,36 @@
|
||||
#.rst:
|
||||
#
|
||||
# Find and link to ACCELERATE.
|
||||
#
|
||||
# Variables defined::
|
||||
#
|
||||
# ACCELERATE_FOUND - describe me, uncached
|
||||
# ACCELERATE_LIBRARIES - describe me, uncached
|
||||
# ACCELERATE_INCLUDE_DIR - describe me, uncached
|
||||
#
|
||||
# autocmake.cfg configuration::
|
||||
#
|
||||
# docopt: --accelerate Find and link to ACCELERATE [default: False].
|
||||
# define: '-DENABLE_ACCELERATE=%s' % arguments['--accelerate']
|
||||
# fetch: https://github.com/scisoft/autocmake/raw/master/modules/find/find_libraries.cmake
|
||||
# https://github.com/scisoft/autocmake/raw/master/modules/find/find_include_files.cmake
|
||||
|
||||
option(ENABLE_ACCELERATE "Find and link to ACCELERATE" OFF)
|
||||
|
||||
if(ENABLE_ACCELERATE)
|
||||
include(find_libraries)
|
||||
include(find_include_files)
|
||||
|
||||
set(ACCELERATE_FOUND FALSE)
|
||||
set(ACCELERATE_LIBRARIES "NOTFOUND")
|
||||
set(ACCELERATE_INCLUDE_DIR "NOTFOUND")
|
||||
|
||||
_find_library(Accelerate cblas_dgemm ACCELERATE_LIBRARIES)
|
||||
_find_include_dir(Accelerate.h /usr ACCELERATE_INCLUDE_DIR)
|
||||
|
||||
if(NOT "${ACCELERATE_LIBRARIES}" MATCHES "NOTFOUND")
|
||||
if(NOT "${ACCELERATE_INCLUDE_DIR}" MATCHES "NOTFOUND")
|
||||
set(ACCELERATE_FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
@ -25,13 +25,8 @@ if(ENABLE_CBLAS)
|
||||
set(CBLAS_LIBRARIES "NOTFOUND")
|
||||
set(CBLAS_INCLUDE_DIR "NOTFOUND")
|
||||
|
||||
if(APPLE)
|
||||
_find_library(Accelerate cblas_dgemm CBLAS_LIBRARIES)
|
||||
_find_include_dir(Accelerate.h /usr CBLAS_INCLUDE_DIR)
|
||||
else()
|
||||
_find_library(cblas cblas_dgemm CBLAS_LIBRARIES)
|
||||
_find_include_dir(cblas.h /usr CBLAS_INCLUDE_DIR)
|
||||
endif()
|
||||
_find_library(cblas cblas_dgemm CBLAS_LIBRARIES)
|
||||
_find_include_dir(cblas.h /usr CBLAS_INCLUDE_DIR)
|
||||
|
||||
if(NOT "${CBLAS_LIBRARIES}" MATCHES "NOTFOUND")
|
||||
if(NOT "${CBLAS_INCLUDE_DIR}" MATCHES "NOTFOUND")
|
||||
|
@ -25,13 +25,8 @@ if(ENABLE_LAPACKE)
|
||||
set(LAPACKE_LIBRARIES "NOTFOUND")
|
||||
set(LAPACKE_INCLUDE_DIR "NOTFOUND")
|
||||
|
||||
# if(APPLE)
|
||||
# _find_library(Accelerate cblas_dgemm LAPACKE_LIBRARIES)
|
||||
# _find_include_dir(Accelerate.h /usr LAPACKE_INCLUDE_DIR)
|
||||
# else()
|
||||
_find_library(lapacke LAPACKE_dgesv LAPACKE_LIBRARIES)
|
||||
_find_include_dir(lapacke.h /usr LAPACKE_INCLUDE_DIR)
|
||||
# endif()
|
||||
_find_library(lapacke LAPACKE_dgesv LAPACKE_LIBRARIES)
|
||||
_find_include_dir(lapacke.h /usr LAPACKE_INCLUDE_DIR)
|
||||
|
||||
if(NOT "${LAPACKE_LIBRARIES}" MATCHES "NOTFOUND")
|
||||
if(NOT "${LAPACKE_INCLUDE_DIR}" MATCHES "NOTFOUND")
|
||||
|
Reference in New Issue
Block a user