diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-02 13:46:16 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-02 13:46:16 +0100 |
commit | 8f2ad1d853940a3d601f20d4aaa66bc9e9cb1103 (patch) | |
tree | a1272a2f91d2b4a6a0a42188069fc4e8b548b9f2 /src/libutil/util.c | |
parent | a742fed63c2568df41d718c71944460ffd8ebbda (diff) | |
download | rspamd-8f2ad1d853940a3d601f20d4aaa66bc9e9cb1103.tar.gz rspamd-8f2ad1d853940a3d601f20d4aaa66bc9e9cb1103.zip |
[Feature] Support BLIS blas library
Diffstat (limited to 'src/libutil/util.c')
-rw-r--r-- | src/libutil/util.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c index 1aed0f8b4..795382622 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -1704,19 +1704,24 @@ void rspamd_gerror_free_maybe (gpointer p) } } - - -#ifdef HAVE_OPENBLAS_SET_NUM_THREADS -extern void openblas_set_num_threads(int num_threads); /* * Openblas creates threads that are not supported by * jemalloc allocator (aside of being bloody stupid). So this hack * is intended to set number of threads to one by default. * FIXME: is it legit to do so in ctor? */ -RSPAMD_CONSTRUCTOR (openblas_stupidity_fix_ctor) +#ifdef HAVE_OPENBLAS_SET_NUM_THREADS +extern void openblas_set_num_threads(int num_threads); +RSPAMD_CONSTRUCTOR (openblas_thread_fix_ctor) +{ + bli_thread_set_num_threads (1; +} +#endif +#ifdef HAVE_BLI_THREAD_SET_NUM_THREADS +extern void bli_thread_set_num_threads(int num_threads); +RSPAMD_CONSTRUCTOR (blis_thread_fix_ctor) { - openblas_set_num_threads (1); + bli_thread_set_num_threads (1; } #endif |