|
template<typename IntegerA , typename IntegerB > |
ChunkedRange< std::common_type_t< IntegerA, IntegerB > > | dispenso::makeChunkedRange (IntegerA start, IntegerB end, ParForChunking chunking=ParForChunking::kStatic) |
|
template<typename IntegerA , typename IntegerB , typename IntegerC > |
ChunkedRange< std::common_type_t< IntegerA, IntegerB > > | dispenso::makeChunkedRange (IntegerA start, IntegerB end, IntegerC chunkSize) |
|
template<typename TaskSetT , typename IntegerT , typename F , typename StateContainer , typename StateGen > |
void | dispenso::parallel_for (TaskSetT &taskSet, StateContainer &states, const StateGen &defaultState, const ChunkedRange< IntegerT > &range, F &&f, ParForOptions options={}) |
|
template<typename TaskSetT , typename IntegerT , typename F > |
void | dispenso::parallel_for (TaskSetT &taskSet, const ChunkedRange< IntegerT > &range, F &&f, ParForOptions options={}) |
|
template<typename IntegerT , typename F > |
void | dispenso::parallel_for (const ChunkedRange< IntegerT > &range, F &&f, ParForOptions options={}) |
|
template<typename F , typename IntegerT , typename StateContainer , typename StateGen > |
void | dispenso::parallel_for (StateContainer &states, const StateGen &defaultState, const ChunkedRange< IntegerT > &range, F &&f, ParForOptions options={}) |
|
template<typename TaskSetT , typename IntegerA , typename IntegerB , typename F , std::enable_if_t< std::is_integral< IntegerA >::value, bool > = true, std::enable_if_t< std::is_integral< IntegerB >::value, bool > = true, std::enable_if_t< detail::CanInvoke< F(IntegerA)>::value, bool > = true> |
void | dispenso::parallel_for (TaskSetT &taskSet, IntegerA start, IntegerB end, F &&f, ParForOptions options={}) |
|
template<typename IntegerA , typename IntegerB , typename F , std::enable_if_t< std::is_integral< IntegerA >::value, bool > = true, std::enable_if_t< std::is_integral< IntegerB >::value, bool > = true> |
void | dispenso::parallel_for (IntegerA start, IntegerB end, F &&f, ParForOptions options={}) |
|
template<typename TaskSetT , typename IntegerA , typename IntegerB , typename F , typename StateContainer , typename StateGen , std::enable_if_t< std::is_integral< IntegerA >::value, bool > = true, std::enable_if_t< std::is_integral< IntegerB >::value, bool > = true, std::enable_if_t< detail::CanInvoke< F(typename StateContainer::reference, IntegerA)>::value, bool > = true> |
void | dispenso::parallel_for (TaskSetT &taskSet, StateContainer &states, const StateGen &defaultState, IntegerA start, IntegerB end, F &&f, ParForOptions options={}) |
|
template<typename IntegerA , typename IntegerB , typename F , typename StateContainer , typename StateGen , std::enable_if_t< std::is_integral< IntegerA >::value, bool > = true, std::enable_if_t< std::is_integral< IntegerB >::value, bool > = true> |
void | dispenso::parallel_for (StateContainer &states, const StateGen &defaultState, IntegerA start, IntegerB end, F &&f, ParForOptions options={}) |
|
Functions for performing parallel for loops.
Definition in file parallel_for.h.
template<typename IntegerA , typename IntegerB , typename F , typename StateContainer , typename StateGen , std::enable_if_t< std::is_integral< IntegerA >::value, bool > = true, std::enable_if_t< std::is_integral< IntegerB >::value, bool > = true>
void dispenso::parallel_for |
( |
StateContainer & | states, |
|
|
const StateGen & | defaultState, |
|
|
IntegerA | start, |
|
|
IntegerB | end, |
|
|
F && | f, |
|
|
ParForOptions | options = {} ) |
Execute loop over the range in parallel on the global thread pool and block until loop completion.
- Parameters
-
states | A container of State (actual type of State TBD by user). The container will be resized to hold a State object per executing thread. Container must provide emplace_back() and must be forward-iterable. Examples include std::vector, std::deque, and std::list. These are the states passed into f , and states must remain a valid object until work is completed. |
defaultState | A functor with signature State(). It will be called to initialize the objects for states . |
start | The start of the loop extents. |
end | The end of the loop extents. |
f | The functor to execute in parallel. Must have a signature like void(State &s, size_t index) or void(State &s, size_t begin, size_t end) . |
options | See ParForOptions for details. options.wait will always be reset to true. |
Definition at line 757 of file parallel_for.h.
template<typename TaskSetT , typename IntegerA , typename IntegerB , typename F , std::enable_if_t< std::is_integral< IntegerA >::value, bool > = true, std::enable_if_t< std::is_integral< IntegerB >::value, bool > = true, std::enable_if_t< detail::CanInvoke< F(IntegerA)>::value, bool > = true>
void dispenso::parallel_for |
( |
TaskSetT & | taskSet, |
|
|
IntegerA | start, |
|
|
IntegerB | end, |
|
|
F && | f, |
|
|
ParForOptions | options = {} ) |
Execute loop over the range in parallel.
- Parameters
-
taskSet | The task set to schedule the loop on. |
start | The start of the loop extents. |
end | The end of the loop extents. |
f | The functor to execute in parallel. Must have a signature like void(size_t index) or void(size_t begin, size_t end) . |
options | See ParForOptions for details. |
Definition at line 593 of file parallel_for.h.
template<typename TaskSetT , typename IntegerA , typename IntegerB , typename F , typename StateContainer , typename StateGen , std::enable_if_t< std::is_integral< IntegerA >::value, bool > = true, std::enable_if_t< std::is_integral< IntegerB >::value, bool > = true, std::enable_if_t< detail::CanInvoke< F(typename StateContainer::reference, IntegerA)>::value, bool > = true>
void dispenso::parallel_for |
( |
TaskSetT & | taskSet, |
|
|
StateContainer & | states, |
|
|
const StateGen & | defaultState, |
|
|
IntegerA | start, |
|
|
IntegerB | end, |
|
|
F && | f, |
|
|
ParForOptions | options = {} ) |
Execute loop over the range in parallel.
- Parameters
-
taskSet | The task set to schedule the loop on. |
states | A container of State (actual type of State TBD by user). The container will be resized to hold a State object per executing thread. Container must provide emplace_back() and must be forward-iterable. Examples include std::vector, std::deque, and std::list. These are the states passed into f , and states must remain a valid object until work is completed. |
defaultState | A functor with signature State(). It will be called to initialize the objects for states . |
start | The start of the loop extents. |
end | The end of the loop extents. |
f | The functor to execute in parallel. Must have a signature like void(State &s, size_t index) or void(State &s, size_t begin, size_t end) . |
options | See ParForOptions for details. |
Definition at line 683 of file parallel_for.h.