aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-02 13:05:58 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-02 13:05:58 +0100
commit54daeb811d83f5d4e29e208e7285c669d123f606 (patch)
treeaa582cc7c1d5a8ea3f72f2db40c18f4a5da6fbf2 /src/libserver
parent75d2e6e32450b355f32a06745abc2f9446febce7 (diff)
downloadrspamd-54daeb811d83f5d4e29e208e7285c669d123f606.tar.gz
rspamd-54daeb811d83f5d4e29e208e7285c669d123f606.zip
[Rework] Change and improve openblas detection and usage
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/cfg_utils.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 6b3f3e15b..0b87bc985 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -55,6 +55,8 @@
#endif
#include <math.h>
+#include "blas-config.h"
+
#define DEFAULT_SCORE 10.0
#define DEFAULT_RLIMIT_NOFILE 2048
@@ -2782,13 +2784,9 @@ rspamd_free_zstd_dictionary (struct zstd_dictionary *dict)
}
}
-#ifdef HAVE_CBLAS
-#ifdef HAVE_CBLAS_H
-#include "cblas.h"
-#else
+#ifdef HAVE_OPENBLAS_SET_NUM_THREADS
extern void openblas_set_num_threads(int num_threads);
#endif
-#endif
gboolean
rspamd_config_libs (struct rspamd_external_libs_ctx *ctx,
@@ -2892,7 +2890,7 @@ rspamd_config_libs (struct rspamd_external_libs_ctx *ctx,
ZSTD_freeCStream (ctx->out_zstream);
ctx->out_zstream = NULL;
}
-#ifdef HAVE_CBLAS
+#ifdef HAVE_OPENBLAS_SET_NUM_THREADS
openblas_set_num_threads (cfg->max_blas_threads);
#endif
}