|
BioDynaMo
v1.05.125-2619fe54
|
#include <reduction_op.h>
Public Member Functions | |
| ReductionOp () | |
| ~ReductionOp () override | |
| void | SetUp () override |
| void | Initialize (Functor< void, Agent *, T * > *agent_functor, Functor< T, const SharedData< T > & > *reduce_functor) |
| void | operator() (Agent *agent) override |
| const std::vector< T > & | GetResults () const |
| void | TearDown () override |
Public Member Functions inherited from bdm::AgentOperationImpl | |
| void | operator() () override |
| bool | IsStandalone () override |
| Returns whether or not this operations is a stand-alone operation. More... | |
Public Member Functions inherited from bdm::OperationImpl | |
| virtual | ~OperationImpl ()=default |
| virtual OperationImpl * | Clone ()=0 |
| bool | IsGpuOperation () const |
| Returns whether or not this operation is supposed to run on a GPU. More... | |
Private Member Functions | |
| BDM_OP_HEADER (ReductionOp) | |
Private Attributes | |
| std::vector< T > | results_ |
| SharedData< T > | tl_results_ |
| Functor< void, Agent *, T * > * | agent_functor_ = nullptr |
| Functor< T, const SharedData< T > & > * | reduce_functor_ = nullptr |
Additional Inherited Members | |
Public Attributes inherited from bdm::OperationImpl | |
| OpComputeTarget | target_ = kCpu |
| The target that this operation implementation is supposed to run on. More... | |
A template struct for any type of operation implementation that wishes to implement a reduction operation (e.g. counting, averaging, finding minimum and maximum values, etc.)
Definition at line 34 of file reduction_op.h.
|
inline |
Definition at line 38 of file reduction_op.h.
|
inlineoverride |
Definition at line 42 of file reduction_op.h.
|
private |
|
inline |
Definition at line 65 of file reduction_op.h.
|
inline |
Definition at line 53 of file reduction_op.h.
|
inlineoverridevirtual |
Implements bdm::OperationImpl.
Definition at line 60 of file reduction_op.h.
|
inlineoverridevirtual |
This function is run before the operator() call. It is useful to perform tasks such as data transfer from CPU -> GPU in GPU operations
Reimplemented from bdm::OperationImpl.
Definition at line 47 of file reduction_op.h.
|
inlineoverridevirtual |
This function is run after the operator() call. It is useful to perform tasks such as data transfer from GPU -> CPU in GPU operations
Reimplemented from bdm::OperationImpl.
Definition at line 69 of file reduction_op.h.
|
private |
Definition at line 80 of file reduction_op.h.
|
private |
Definition at line 83 of file reduction_op.h.
|
private |
Definition at line 75 of file reduction_op.h.
|
private |
Definition at line 77 of file reduction_op.h.
1.8.17