3 #ifndef CAFFE2_UTILS_PTHREADPOOL_H_ 4 #define CAFFE2_UTILS_PTHREADPOOL_H_ 6 #include "ThreadPoolCommon.h" 11 typedef struct pthreadpool* pthreadpool_t;
13 typedef void (*pthreadpool_function_1d_t)(
void*, size_t);
14 typedef void (*pthreadpool_function_1d_tiled_t)(
void*, size_t, size_t);
15 typedef void (*pthreadpool_function_2d_t)(
void*, size_t, size_t);
16 typedef void (*pthreadpool_function_2d_tiled_t)(
void*, size_t, size_t, size_t, size_t);
17 typedef void (*pthreadpool_function_3d_tiled_t)(
25 typedef void (*pthreadpool_function_4d_tiled_t)(
50 pthreadpool_t pthreadpool_create(
size_t threads_count);
59 size_t pthreadpool_get_threads_count(pthreadpool_t threadpool);
77 void pthreadpool_compute_1d(
78 pthreadpool_t threadpool,
79 pthreadpool_function_1d_t
function,
83 void pthreadpool_compute_1d_tiled(
84 pthreadpool_t threadpool,
85 pthreadpool_function_1d_tiled_t
function,
90 void pthreadpool_compute_2d(
91 pthreadpool_t threadpool,
92 pthreadpool_function_2d_t
function,
97 void pthreadpool_compute_2d_tiled(
98 pthreadpool_t threadpool,
99 pthreadpool_function_2d_tiled_t
function,
106 void pthreadpool_compute_3d_tiled(
107 pthreadpool_t threadpool,
108 pthreadpool_function_3d_tiled_t
function,
117 void pthreadpool_compute_4d_tiled(
118 pthreadpool_t threadpool,
119 pthreadpool_function_4d_tiled_t
function,
138 void pthreadpool_destroy(pthreadpool_t threadpool);
144 #endif // CAFFE2_UTILS_PTHREADPOOL_H_