diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-07-26 18:39:53 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-07-26 18:39:53 +0200 |
commit | 29f5b628317bcf83ddc5bfeaec92108b6bb1e89d (patch) | |
tree | 60b476d9a073045e3bc1cf5729b47174d04f7701 /init.c | |
parent | e6180b82d89d69846cfdd7881dd067ff38ea6a79 (diff) |
Switch to external threadpool library.
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -31,6 +31,8 @@ #include <clBLAS.h> #endif +#include <threadpool.h> + #include "basis.h" #include "common.h" #include "cpu.h" @@ -38,7 +40,6 @@ #include "nlsolve.h" #include "td_constraints.h" #include "teukolsky_data.h" -#include "threadpool.h" #define NB_EQUATIONS 3 @@ -46,7 +47,7 @@ typedef struct TDPriv { unsigned int basis_order[NB_EQUATIONS][2]; BasisSetContext *basis[NB_EQUATIONS][2]; - ThreadPoolContext *tp; + TPContext *tp; TDLogger logger; double *coeffs; @@ -152,7 +153,7 @@ static int teukolsky_init_check_options(TDContext *td) td->nb_threads = 1; } - ret = tdi_threadpool_init(&s->tp, td->nb_threads); + ret = tp_init(&s->tp, td->nb_threads); if (ret < 0) return ret; @@ -487,7 +488,7 @@ void td_context_free(TDContext **ptd) s = td->priv; - tdi_threadpool_free(&s->tp); + tp_free(&s->tp); #if HAVE_OPENCL if (s->ocl_queue) |