vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
|
indexed_reductor is used for reductions and has no output. The actual reduction is handled by the functor: each thread has it's own copy of the functor, which does it's own part of the reduction, and 'offloads' it's result to some mutex-protected receptacle when it's destructed, see the 'reduce' functions in transform.h for a more detailed explanation and an example of such a functor. idexed_reductor processes discrete coordinates, whereas yield_reductor (the next class down) processes values. This variant works just like an indexed_aggregator, only that it produces no output - at least not for every coordinate fed to the functor, the functor itself does hold state (the reduction) and is also responsible for offloading per-thread results when the worker threads terminate. This class holds a copy of the functor, and each thread has an instance of this class, ensuring that each worker thread can reduce it's share of the work load independently. More...
#include <wielding.h>
Public Types | |
enum | { dim_in = functor_type::dim_in } |
typedef functor_type::in_type | in_type |
typedef functor_type::in_ele_type | in_ele_type |
typedef functor_type::in_v | in_v |
typedef functor_type::in_ele_v | in_ele_v |
typedef functor_type::in_type | crd_type |
Public Member Functions | |
indexed_reductor (const functor_type &_functor) | |
void | operator() (in_type crd, int axis, ic_type length) |
Public Attributes | |
functor_type | functor |
indexed_reductor is used for reductions and has no output. The actual reduction is handled by the functor: each thread has it's own copy of the functor, which does it's own part of the reduction, and 'offloads' it's result to some mutex-protected receptacle when it's destructed, see the 'reduce' functions in transform.h for a more detailed explanation and an example of such a functor. idexed_reductor processes discrete coordinates, whereas yield_reductor (the next class down) processes values. This variant works just like an indexed_aggregator, only that it produces no output - at least not for every coordinate fed to the functor, the functor itself does hold state (the reduction) and is also responsible for offloading per-thread results when the worker threads terminate. This class holds a copy of the functor, and each thread has an instance of this class, ensuring that each worker thread can reduce it's share of the work load independently.
Definition at line 375 of file wielding.h.
typedef functor_type::in_type wielding::indexed_reductor< vsz, ic_type, functor_type, typename >::crd_type |
Definition at line 390 of file wielding.h.
typedef functor_type::in_ele_type wielding::indexed_reductor< vsz, ic_type, functor_type, typename >::in_ele_type |
Definition at line 380 of file wielding.h.
typedef functor_type::in_ele_v wielding::indexed_reductor< vsz, ic_type, functor_type, typename >::in_ele_v |
Definition at line 382 of file wielding.h.
typedef functor_type::in_type wielding::indexed_reductor< vsz, ic_type, functor_type, typename >::in_type |
Definition at line 379 of file wielding.h.
typedef functor_type::in_v wielding::indexed_reductor< vsz, ic_type, functor_type, typename >::in_v |
Definition at line 381 of file wielding.h.
anonymous enum |
Enumerator | |
---|---|
dim_in |
Definition at line 384 of file wielding.h.
|
inline |
Definition at line 394 of file wielding.h.
|
inline |
Definition at line 398 of file wielding.h.
functor_type wielding::indexed_reductor< vsz, ic_type, functor_type, typename >::functor |
Definition at line 386 of file wielding.h.