Macros | Functions
ie_parallel.hpp File Reference

Contains declarations and definitions for sequential and multi-threading implementations. Multi-threading support is implemented in two variants: using the Threading Building Blocks library and OpenMP* product. To build a particular implementation, use the corresponding identifier: IE_THREAD_TBB, IE_THREAD_OMP or IE_THREAD_SEQ. More...

#include <cstddef>
#include "tbb/task_scheduler_observer.h"
#include "tbb/parallel_for.h"
#include "tbb/task_arena.h"
#include "tbb/parallel_reduce.h"
#include "tbb/blocked_range.h"
#include "tbb/blocked_range2d.h"
#include "tbb/blocked_range3d.h"

Go to the source code of this file.

Macros

#define  IE_THREAD_TBB   0
 
#define  IE_THREAD_OMP   1
 
#define  IE_THREAD_SEQ   2
 
#define  TBB_PREVIEW_LOCAL_OBSERVER   1
 

Functions

int  parallel_get_max_threads ()
 
int  parallel_get_num_threads ()
 
int  parallel_get_thread_num ()
 
void  parallel_set_num_threads (int n)
 
int  parallel_get_env_threads ()
 
template<typename F >
void  InferenceEngine::parallel_nt (int nthr, const F &func)
 
template<typename F >
void  InferenceEngine::parallel_nt_static (int nthr, const F &func)
 
template<typename T0 , typename R , typename F >
InferenceEngine::parallel_sum (const T0 &D0, const R &input, const F &func)
 
template<typename T0 , typename T1 , typename R , typename F >
InferenceEngine::parallel_sum2d (const T0 &D0, const T1 &D1, const R &input, const F &func)
 
template<typename T0 , typename T1 , typename T2 , typename R , typename F >
InferenceEngine::parallel_sum3d (const T0 &D0, const T1 &D1, const T2 &D2, const R &input, const F &func)
 
template<typename T >
InferenceEngine::parallel_it_init (T start)
 
template<typename T , typename Q , typename R , typename... Args>
InferenceEngine::parallel_it_init (T start, Q &x, const R &X, Args &&... tuple)
 
bool  InferenceEngine::parallel_it_step ()
 
template<typename Q , typename R , typename... Args>
bool  InferenceEngine::parallel_it_step (Q &x, const R &X, Args &&... tuple)
 
template<typename T , typename Q >
void  InferenceEngine::splitter (const T &n, const Q &team, const Q &tid, T &n_start, T &n_end)
 
template<typename T0 , typename F >
void  InferenceEngine::for_1d (const int &ithr, const int &nthr, const T0 &D0, const F &func)
 
template<typename T0 , typename F >
void  InferenceEngine::parallel_for (const T0 &D0, const F &func)
 
template<typename T0 , typename T1 , typename F >
void  InferenceEngine::for_2d (const int &ithr, const int &nthr, const T0 &D0, const T1 &D1, const F &func)
 
template<typename T0 , typename T1 , typename F >
void  InferenceEngine::parallel_for2d (const T0 &D0, const T1 &D1, const F &func)
 
template<typename T0 , typename T1 , typename T2 , typename F >
void  InferenceEngine::for_3d (const int &ithr, const int &nthr, const T0 &D0, const T1 &D1, const T2 &D2, const F &func)
 
template<typename T0 , typename T1 , typename T2 , typename F >
void  InferenceEngine::parallel_for3d (const T0 &D0, const T1 &D1, const T2 &D2, const F &func)
 
template<typename T0 , typename T1 , typename T2 , typename T3 , typename F >
void  InferenceEngine::for_4d (const int &ithr, const int &nthr, const T0 &D0, const T1 &D1, const T2 &D2, const T3 &D3, const F &func)
 
template<typename T0 , typename T1 , typename T2 , typename T3 , typename F >
void  InferenceEngine::parallel_for4d (const T0 &D0, const T1 &D1, const T2 &D2, const T3 &D3, const F &func)
 
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename F >
void  InferenceEngine::for_5d (const int &ithr, const int &nthr, const T0 &D0, const T1 &D1, const T2 &D2, const T3 &D3, const T4 &D4, const F &func)
 
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename F >
void  InferenceEngine::parallel_for5d (const T0 &D0, const T1 &D1, const T2 &D2, const T3 &D3, const T4 &D4, const F &func)
 
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename F >
void  InferenceEngine::for_6d (const int &ithr, const int &nthr, const T0 &D0, const T1 &D1, const T2 &D2, const T3 &D3, const T4 &D4, const T5 &D5, F func)
 
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename F >
void  InferenceEngine::parallel_for6d (const T0 &D0, const T1 &D1, const T2 &D2, const T3 &D3, const T4 &D4, const T5 &D5, F func)
 

Detailed Description

Contains declarations and definitions for sequential and multi-threading implementations. Multi-threading support is implemented in two variants: using the Threading Building Blocks library and OpenMP* product. To build a particular implementation, use the corresponding identifier: IE_THREAD_TBB, IE_THREAD_OMP or IE_THREAD_SEQ.