From 54daeb811d83f5d4e29e208e7285c669d123f606 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 2 Sep 2020 13:05:58 +0100 Subject: [Rework] Change and improve openblas detection and usage --- src/libutil/util.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/libutil') diff --git a/src/libutil/util.c b/src/libutil/util.c index 9e5147ab5..1aed0f8b4 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -64,6 +64,7 @@ #include "zlib.h" #include "contrib/uthash/utlist.h" +#include "blas-config.h" /* Check log messages intensity once per minute */ #define CHECK_TIME 60 @@ -1705,17 +1706,8 @@ void rspamd_gerror_free_maybe (gpointer p) -#ifdef HAVE_CBLAS -#ifdef HAVE_CBLAS_H -#include "cblas.h" -#else -#ifdef __APPLE__ -/* OSX is pure evil: number of threads must be set via env: VECLIB_MAXIMUM_THREADS */ -void openblas_set_num_threads(int num_threads) {} -#else +#ifdef HAVE_OPENBLAS_SET_NUM_THREADS extern void openblas_set_num_threads(int num_threads); -#endif -#endif /* * Openblas creates threads that are not supported by * jemalloc allocator (aside of being bloody stupid). So this hack -- cgit v1.2.3