1 #include "caffe2/utils/threadpool/pthreadpool.h" 2 #include "caffe2/utils/threadpool/pthreadpool_impl.h" 3 #include "caffe2/utils/threadpool/ThreadPool.h" 10 void pthreadpool_compute_1d(
struct pthreadpool* threadpool,
11 pthreadpool_function_1d_t
function,
14 threadpool->pool_->run(
15 [
function, argument](
int threadId,
size_t workId) {
16 function(argument, workId);
21 size_t pthreadpool_get_threads_count(
struct pthreadpool* threadpool) {
22 return threadpool->pool_->getNumThreads();