OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::execution::Traits< ExecutionTBB > Struct Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Execution/ExecutionTBB.hpp>

Inheritance diagram for Slic3r::execution::Traits< ExecutionTBB >:
Collaboration diagram for Slic3r::execution::Traits< ExecutionTBB >:

Public Types

using SpinningMutex = tbb::spin_mutex
using BlockingMutex = std::mutex

Static Public Member Functions

template<class It, class Fn>
static void for_each (const ExecutionTBB &, It from, It to, Fn &&fn, size_t granularity)
template<class I, class MergeFn, class T, class AccessFn>
static T reduce (const ExecutionTBB &, I from, I to, const T &init, MergeFn &&mergefn, AccessFn &&access, size_t granularity=1)
static size_t max_concurrency (const ExecutionTBB &)

Static Private Member Functions

template<class Fn, class It>
static IteratorOnly< It, void > loop_ (const tbb::blocked_range< It > &range, Fn &&fn)
template<class Fn, class I>
static IntegerOnly< I, void > loop_ (const tbb::blocked_range< I > &range, Fn &&fn)

Detailed Description

Member Typedef Documentation

◆ BlockingMutex

using Slic3r::execution::Traits< ExecutionTBB >::BlockingMutex = std::mutex

◆ SpinningMutex

using Slic3r::execution::Traits< ExecutionTBB >::SpinningMutex = tbb::spin_mutex

Member Function Documentation

◆ for_each()

template<class It, class Fn>
void Slic3r::execution::Traits< ExecutionTBB >::for_each ( const ExecutionTBB & ,
It from,
It to,
Fn && fn,
size_t granularity )
inlinestatic
46 {
48 [&fn](const auto &range) {
50 });
51 }
Definition Execution.hpp:27
static IteratorOnly< It, void > loop_(const tbb::blocked_range< It > &range, Fn &&fn)
Definition ExecutionTBB.hpp:28

References loop_(), and Slic3r::range().

Here is the call graph for this function:

◆ loop_() [1/2]

template<class Fn, class I>
IntegerOnly< I, void > Slic3r::execution::Traits< ExecutionTBB >::loop_ ( const tbb::blocked_range< I > & range,
Fn && fn )
inlinestaticprivate
35 {
36 for (I i = range.begin(); i < range.end(); ++i) fn(i);
37 }

References Slic3r::I, and Slic3r::range().

Here is the call graph for this function:

◆ loop_() [2/2]

template<class Fn, class It>
IteratorOnly< It, void > Slic3r::execution::Traits< ExecutionTBB >::loop_ ( const tbb::blocked_range< It > & range,
Fn && fn )
inlinestaticprivate
29 {
30 for (auto &el : range) fn(el);
31 }

References Slic3r::range().

Referenced by for_each(), and reduce().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ max_concurrency()

size_t Slic3r::execution::Traits< ExecutionTBB >::max_concurrency ( const ExecutionTBB & )
inlinestatic
74 {
76 }

◆ reduce()

template<class I, class MergeFn, class T, class AccessFn>
T Slic3r::execution::Traits< ExecutionTBB >::reduce ( const ExecutionTBB & ,
I from,
I to,
const T & init,
MergeFn && mergefn,
AccessFn && access,
size_t granularity = 1 )
inlinestatic
62 {
65 [&](const auto &range, T subinit) {
66 T acc = subinit;
67 loop_(range, [&](auto &i) { acc = mergefn(acc, access(i)); });
68 return acc;
69 },
71 }

References Slic3r::I, loop_(), and Slic3r::range().

Here is the call graph for this function:

The documentation for this struct was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Execution/ExecutionTBB.hpp