Reference documentation for deal.II version 9.0.0
Classes | Functions
parallel::internal Namespace Reference

Classes

struct  Body
 
struct  EnableOpenMPSimdFor
 
struct  ParallelForWrapper
 
struct  ReductionOnSubranges
 

Functions

template<typename F >
Body< F > make_body (const F &f)
 
template<typename RangeType , typename Function >
void apply_to_subranges (const tbb::blocked_range< RangeType > &range, const Function &f)
 

Detailed Description

A class that wraps a TBB affinity partitioner in a thread-safe way. In Vector, we use a shared pointer to share an affinity partitioner between different vectors of the same size for improving data (and NUMA) locality. However, when an outer task does multiple vector operations, the shared pointer could lead to race conditions. This class only allows one instance to get a partitioner. The other objects cannot use that object and need to create their own copy.

Function Documentation

◆ make_body()

template<typename F >
Body<F> parallel::internal::make_body ( const F &  f)

Take a function object and create a Body object from it. We do this in this helper function since alternatively we would have to specify the actual data type of F – which for function objects is often extraordinarily complicated.

Definition at line 150 of file parallel.h.

◆ apply_to_subranges()

template<typename RangeType , typename Function >
void parallel::internal::apply_to_subranges ( const tbb::blocked_range< RangeType > &  range,
const Function f 
)

Take a range argument and call the given function with its begin and end.

Definition at line 336 of file parallel.h.