cannam@127: /* cannam@127: * Copyright (c) 2003, 2007-14 Matteo Frigo cannam@127: * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology cannam@127: * cannam@127: * This program is free software; you can redistribute it and/or modify cannam@127: * it under the terms of the GNU General Public License as published by cannam@127: * the Free Software Foundation; either version 2 of the License, or cannam@127: * (at your option) any later version. cannam@127: * cannam@127: * This program is distributed in the hope that it will be useful, cannam@127: * but WITHOUT ANY WARRANTY; without even the implied warranty of cannam@127: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the cannam@127: * GNU General Public License for more details. cannam@127: * cannam@127: * You should have received a copy of the GNU General Public License cannam@127: * along with this program; if not, write to the Free Software cannam@127: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA cannam@127: * cannam@127: */ cannam@127: cannam@127: #ifndef __THREADS_H__ cannam@127: #define __THREADS_H__ cannam@127: cannam@127: #include "ifftw.h" cannam@127: #include "ct.h" cannam@127: #include "hc2hc.h" cannam@127: cannam@127: typedef struct { cannam@127: int min, max, thr_num; cannam@127: void *data; cannam@127: } spawn_data; cannam@127: cannam@127: typedef void *(*spawn_function) (spawn_data *); cannam@127: cannam@127: void X(spawn_loop)(int loopmax, int nthreads, cannam@127: spawn_function proc, void *data); cannam@127: int X(ithreads_init)(void); cannam@127: void X(threads_cleanup)(void); cannam@127: cannam@127: /* configurations */ cannam@127: cannam@127: void X(dft_thr_vrank_geq1_register)(planner *p); cannam@127: void X(rdft_thr_vrank_geq1_register)(planner *p); cannam@127: void X(rdft2_thr_vrank_geq1_register)(planner *p); cannam@127: cannam@127: ct_solver *X(mksolver_ct_threads)(size_t size, INT r, int dec, cannam@127: ct_mkinferior mkcldw, cannam@127: ct_force_vrecursion force_vrecursionp); cannam@127: hc2hc_solver *X(mksolver_hc2hc_threads)(size_t size, INT r, hc2hc_mkinferior mkcldw); cannam@127: cannam@127: void X(threads_conf_standard)(planner *p); cannam@127: void X(threads_register_hooks)(void); cannam@127: void X(threads_unregister_hooks)(void); cannam@127: void X(threads_register_planner_hooks)(void); cannam@127: cannam@127: #endif /* __THREADS_H__ */