HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime::concurrency::ThreadPoolTempl< Environment > Class Template Reference

#include <EigenNonBlockingThreadPool.h>

+ Inheritance diagram for onnxruntime::concurrency::ThreadPoolTempl< Environment >:

Classes

struct  Tag
 

Public Types

typedef std::function< void()> Task
 
typedef RunQueue< Task, Tag, 1024 > Queue
 

Public Member Functions

void StartProfiling () override
 
std::string StopProfiling () override
 
 ThreadPoolTempl (const CHAR_TYPE *name, int num_threads, bool allow_spinning, Environment &env, const ThreadOptions &thread_options)
 
 ~ThreadPoolTempl () override
 
void Schedule (std::function< void()> fn) override
 
void StartParallelSectionInternal (PerThread &pt, ThreadPoolParallelSection &ps)
 
void StartParallelSection (ThreadPoolParallelSection &ps) override
 
void EndParallelSectionInternal (PerThread &pt, ThreadPoolParallelSection &ps)
 
void EndParallelSection (ThreadPoolParallelSection &ps) override
 
void InitializePreferredWorkers (InlinedVector< int > &preferred_workers)
 
void UpdatePreferredWorker (InlinedVector< int > &preferred_workers, unsigned par_idx)
 
void ScheduleOnPreferredWorkers (PerThread &pt, ThreadPoolParallelSection &ps, InlinedVector< int > &preferred_workers, unsigned par_idx_start, unsigned par_idx_end, std::function< void(unsigned)> worker_fn)
 
void RunInParallelInternal (PerThread &pt, ThreadPoolParallelSection &ps, unsigned new_dop, bool dispatch_async, std::function< void(unsigned)> worker_fn)
 
void RunInParallelSection (ThreadPoolParallelSection &ps, std::function< void(unsigned idx)> fn, unsigned n, std::ptrdiff_t block_size) override
 
void RunInParallel (std::function< void(unsigned idx)> fn, unsigned n, std::ptrdiff_t block_size) override
 
int NumThreads () const final
 
int CurrentThreadId () const final
 
void EnableSpinning ()
 
void DisableSpinning ()
 

Detailed Description

template<typename Environment>
class onnxruntime::concurrency::ThreadPoolTempl< Environment >

Definition at line 699 of file EigenNonBlockingThreadPool.h.

Member Typedef Documentation

template<typename Environment >
typedef RunQueue<Task, Tag, 1024> onnxruntime::concurrency::ThreadPoolTempl< Environment >::Queue

Definition at line 768 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
typedef std::function<void()> onnxruntime::concurrency::ThreadPoolTempl< Environment >::Task

Definition at line 767 of file EigenNonBlockingThreadPool.h.

Constructor & Destructor Documentation

template<typename Environment >
onnxruntime::concurrency::ThreadPoolTempl< Environment >::ThreadPoolTempl ( const CHAR_TYPE name,
int  num_threads,
bool  allow_spinning,
Environment env,
const ThreadOptions &  thread_options 
)
inline

Definition at line 770 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
onnxruntime::concurrency::ThreadPoolTempl< Environment >::~ThreadPoolTempl ( )
inlineoverride

Definition at line 810 of file EigenNonBlockingThreadPool.h.

Member Function Documentation

template<typename Environment >
int onnxruntime::concurrency::ThreadPoolTempl< Environment >::CurrentThreadId ( ) const
inlinefinal

Definition at line 1319 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::DisableSpinning ( )
inline

Definition at line 1331 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::EnableSpinning ( )
inline

Definition at line 1327 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::EndParallelSection ( ThreadPoolParallelSection ps)
inlineoverridevirtual
template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::EndParallelSectionInternal ( PerThread &  pt,
ThreadPoolParallelSection ps 
)
inline

Definition at line 872 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::InitializePreferredWorkers ( InlinedVector< int > &  preferred_workers)
inline

Definition at line 1056 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
int onnxruntime::concurrency::ThreadPoolTempl< Environment >::NumThreads ( ) const
inlinefinal

Definition at line 1315 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::RunInParallel ( std::function< void(unsigned idx)>  fn,
unsigned  n,
std::ptrdiff_t  block_size 
)
inlineoverridevirtual
template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::RunInParallelInternal ( PerThread &  pt,
ThreadPoolParallelSection ps,
unsigned  new_dop,
bool  dispatch_async,
std::function< void(unsigned)>  worker_fn 
)
inline

Definition at line 1155 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::RunInParallelSection ( ThreadPoolParallelSection ps,
std::function< void(unsigned idx)>  fn,
unsigned  n,
std::ptrdiff_t  block_size 
)
inlineoverridevirtual
template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::Schedule ( std::function< void()>  fn)
inlineoverride

Definition at line 819 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::ScheduleOnPreferredWorkers ( PerThread &  pt,
ThreadPoolParallelSection ps,
InlinedVector< int > &  preferred_workers,
unsigned  par_idx_start,
unsigned  par_idx_end,
std::function< void(unsigned)>  worker_fn 
)
inline

Definition at line 1085 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::StartParallelSection ( ThreadPoolParallelSection ps)
inlineoverridevirtual
template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::StartParallelSectionInternal ( PerThread &  pt,
ThreadPoolParallelSection ps 
)
inline

Definition at line 847 of file EigenNonBlockingThreadPool.h.

template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::StartProfiling ( )
inlineoverridevirtual
template<typename Environment >
std::string onnxruntime::concurrency::ThreadPoolTempl< Environment >::StopProfiling ( )
inlineoverridevirtual
template<typename Environment >
void onnxruntime::concurrency::ThreadPoolTempl< Environment >::UpdatePreferredWorker ( InlinedVector< int > &  preferred_workers,
unsigned  par_idx 
)
inline

Definition at line 1075 of file EigenNonBlockingThreadPool.h.


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