Halide
Halide::Internal::ThreadPool< T > Class Template Reference

#include <ThreadPool.h>

Public Member Functions

 ThreadPool (size_t desired_num_threads=num_processors_online())
 
 ~ThreadPool ()
 
template<typename Func , typename... Args>
std::future< T > async (Func func, Args... args)
 

Static Public Member Functions

static size_t num_processors_online ()
 

Detailed Description

template<typename T>
class Halide::Internal::ThreadPool< T >

Definition at line 40 of file ThreadPool.h.

Constructor & Destructor Documentation

◆ ThreadPool()

template<typename T >
Halide::Internal::ThreadPool< T >::ThreadPool ( size_t  desired_num_threads = num_processors_online())
inline

Definition at line 89 of file ThreadPool.h.

◆ ~ThreadPool()

template<typename T >
Halide::Internal::ThreadPool< T >::~ThreadPool ( )
inline

Definition at line 102 of file ThreadPool.h.

Member Function Documentation

◆ num_processors_online()

template<typename T >
static size_t Halide::Internal::ThreadPool< T >::num_processors_online ( )
inlinestatic

Definition at line 79 of file ThreadPool.h.

References atoi(), and getenv().

Referenced by Halide::SimdOpCheckTest::SimdOpCheckTest().

◆ async()

template<typename T >
template<typename Func , typename... Args>
std::future<T> Halide::Internal::ThreadPool< T >::async ( Func  func,
Args...  args 
)
inline

Definition at line 117 of file ThreadPool.h.

Referenced by Halide::SimdOpCheckTest::test_all().


The documentation for this class was generated from the following file: