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< CRecursiveMutex > | CRecursiveScopedLock
typedef TScopedLock< CMutex > | CScopedLock

## 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 47 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

typedef TScopedLock<CRecursiveMutex> CRecursiveScopedLock

Definition at line 81 of file parallelcxx11.hh.

## CScopedLock

typedef TScopedLock<CMutex> CScopedLock

Definition at line 80 of file parallelcxx11.hh.

## Function Documentation

## pfor()

template<typename Range, typename Func>

void pfor | ( | Range | range,
|  | const Func & | f )

Definition at line 159 of file parallelcxx11.hh.

References CMaxTasks::get_max_tasks(), and pfor_callback().

Referenced by FDeformer3D::operator()().

## pfor_callback()

template<typename Range, typename Func>

void pfor_callback | ( | Range & | range,
|  | Func | f )

Definition at line 146 of file parallelcxx11.hh.

Referenced by pfor().

## preduce()

template<typename Range, typename Value, typename Func, typename Reduce>

Value preduce | ( | Range | range,
|  | Value | identity,
|  | const Func & | f,
|  | Reduce | r )

Definition at line 224 of file parallelcxx11.hh.

References CMaxTasks::get_max_tasks(), ReduceValue< V >::get_reduced(), and preduce_callback().

## preduce_callback()

template<typename Range, typename Value, typename Func, typename Reduce>

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

Definition at line 207 of file parallelcxx11.hh.

References ReduceValue< V >::get_identity(), and ReduceValue< V >::reduce().

Referenced by preduce().