浏览代码

Check that cblas_sgemv is available

spmv/dw_block_spmv requires it
Samuel Thibault 4 年之前
父节点
当前提交
14504550ba
共有 2 个文件被更改,包括 9 次插入0 次删除
  1. 7 0
      configure.ac
  2. 2 0
      examples/Makefile.am

+ 7 - 0
configure.ac

@@ -2777,6 +2777,13 @@ AM_CONDITIONAL(STARPU_HAVE_CBLAS_H, test x$have_cblas_h = xyes)
 if test x$have_cblas_h = xyes; then
     AC_DEFINE(STARPU_HAVE_CBLAS_H, [1], [The blas library has blas.h])
 fi
+if test x$blas_lib != xnone; then
+    SAVED_LIBS="$LIBS"
+    LIBS="$LIBS -lblas"
+    AC_CHECK_FUNCS([cblas_sgemv])
+    LIBS="$SAVED_LIBS"
+fi
+AM_CONDITIONAL(STARPU_HAVE_CBLAS_SGEMV, test $HAVE_CBLAS_SGEMV = 1)
 
 AM_CONDITIONAL(STARPU_ATLAS_BLAS_LIB, test x$blas_lib = xatlas)
 AM_CONDITIONAL(STARPU_GOTO_BLAS_LIB, test x$blas_lib = xgoto)

+ 2 - 0
examples/Makefile.am

@@ -358,9 +358,11 @@ STARPU_EXAMPLES +=				\
 endif
 
 if STARPU_HAVE_CBLAS_H
+if STARPU_HAVE_CBLAS_SGEMV
 STARPU_EXAMPLES +=				\
 	spmv/dw_block_spmv
 endif
+endif
 
 if !STARPU_SIMGRID
 if STARPU_HAVE_F77