From 29f5b628317bcf83ddc5bfeaec92108b6bb1e89d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 26 Jul 2020 18:39:53 +0200 Subject: Switch to external threadpool library. --- init.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'init.c') diff --git a/init.c b/init.c index e39d1b1..f4d130f 100644 --- a/init.c +++ b/init.c @@ -31,6 +31,8 @@ #include #endif +#include + #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) -- cgit v1.2.3