BioDynaMo
v1.05.120-25dc9790
|
Go to the documentation of this file.
15 #ifndef CORE_OPERATION_REDUCTION_OP_H_
16 #define CORE_OPERATION_REDUCTION_OP_H_
90 for (
auto& el : tl_results) {
100 #endif // CORE_OPERATION_REDUCTION_OP_H_
BDM_OP_HEADER(ReductionOp)
static ThreadInfo * GetInstance()
T operator()(const SharedData< T > &tl_results) override
std::vector< T > results_
The SharedData class avoids false sharing between threads.
void operator()(Agent *agent) override
void Initialize(Functor< void, Agent *, T * > *agent_functor, Functor< T, const SharedData< T > & > *reduce_functor)
Functor< void, Agent *, T * > * agent_functor_
Contains code required by all agents.
Functor< T, const SharedData< T > & > * reduce_functor_
Interface for implementing an operation.
int GetMyThreadId() const
const std::vector< T > & GetResults() const
SharedData< T > tl_results_