HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_TaskArena Class Reference

#include <UT_TaskArena.h>

Public Member Functions

 UT_TaskArena (int max_concurrency=automatic, unsigned reserved_for_masters=1)
 
 ~UT_TaskArena ()
 
template<typename F >
void execute (F &functor)
 
template<typename F >
void execute (const F &functor)
 

Static Public Member Functions

template<typename M , typename F >
static void lockedExecute (M &mutex, F &functor)
 
template<typename M , typename F >
static void lockedExecute (M &mutex, const F &functor)
 

Static Public Attributes

static const int automatic = -1
 
static SYS_AtomicInt32 theArenaCount
 

Detailed Description

Simple wrapper for running code within a tbb::task_arena. For most usages, you want to do this if you're going to spawn tasks with a lock held.

Definition at line 25 of file UT_TaskArena.h.

Constructor & Destructor Documentation

UT_TaskArena::UT_TaskArena ( int  max_concurrency = automatic,
unsigned  reserved_for_masters = 1 
)
UT_TaskArena::~UT_TaskArena ( )

Member Function Documentation

template<typename F >
void UT_TaskArena::execute ( F &  functor)
inline

Definition at line 35 of file UT_TaskArena.h.

template<typename F >
void UT_TaskArena::execute ( const F &  functor)
inline

Definition at line 41 of file UT_TaskArena.h.

template<typename M , typename F >
static void UT_TaskArena::lockedExecute ( M &  mutex,
F &  functor 
)
inlinestatic

Definition at line 48 of file UT_TaskArena.h.

template<typename M , typename F >
static void UT_TaskArena::lockedExecute ( M &  mutex,
const F &  functor 
)
inlinestatic

Definition at line 57 of file UT_TaskArena.h.

Member Data Documentation

const int UT_TaskArena::automatic = -1
static

Definition at line 28 of file UT_TaskArena.h.

SYS_AtomicInt32 UT_TaskArena::theArenaCount
static

Definition at line 65 of file UT_TaskArena.h.


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