parallelcxx11.hh File Reference
#include <mia/core/defines.hh>
#include <thread>
#include <atomic>
#include <mutex>
#include <cassert>
#include <vector>
Include dependency graph for parallelcxx11.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  C1DParallelRange
 
class  CMaxTasks
 
class  ReduceValue< V >
 
class  TScopedLock< Mutex >
 

Macros

#define ATOMIC   std::atomic
 

Typedefs

typedef std::mutex CMutex
 
typedef std::recursive_mutex CRecursiveMutex
 
typedef TScopedLock< CRecursiveMutexCRecursiveScopedLock
 
typedef TScopedLock< CMutexCScopedLock
 

Functions

template<typename Range , typename Func >
void pfor (Range range, const Func &f)
 
template<typename Range , typename Func >
void pfor_callback (Range &range, Func f)
 
template<typename Range , typename Value , typename Func , typename Reduce >
Value preduce (Range range, Value identity, const Func &f, Reduce r)
 
template<typename Range , typename Value , typename Func , typename Reduce >
void preduce_callback (Range &range, ReduceValue< Value > &v, Func f, Reduce r)
 

Macro Definition Documentation

◆ ATOMIC

#define ATOMIC   std::atomic

Definition at line 46 of file parallelcxx11.hh.

Typedef Documentation

◆ CMutex

typedef std::mutex CMutex

Definition at line 34 of file parallelcxx11.hh.

◆ CRecursiveMutex

typedef std::recursive_mutex CRecursiveMutex

Definition at line 35 of file parallelcxx11.hh.

◆ CRecursiveScopedLock

Definition at line 76 of file parallelcxx11.hh.

◆ CScopedLock

Definition at line 75 of file parallelcxx11.hh.

Function Documentation

◆ pfor()

template<typename Range , typename Func >
void pfor ( Range  range,
const Func &  f 
)

Definition at line 145 of file parallelcxx11.hh.

References CMaxTasks::get_max_tasks().

Referenced by FDeformer3D::operator()().

◆ pfor_callback()

template<typename Range , typename Func >
void pfor_callback ( Range &  range,
Func  f 
)

Definition at line 133 of file parallelcxx11.hh.

◆ preduce()

template<typename Range , typename Value , typename Func , typename Reduce >
Value preduce ( Range  range,
Value  identity,
const Func &  f,
Reduce  r 
)

◆ preduce_callback()

template<typename Range , typename Value , typename Func , typename Reduce >
void preduce_callback ( Range &  range,
ReduceValue< Value > &  v,
Func  f,
Reduce  r 
)