Helper to manage parallel accumulation.
More...
#include <tmb_core.hpp>
template<class Type>
struct parallel_accumulator< Type >
Helper to manage parallel accumulation.
- A parallel accumulator only has two valid operators: increment (+=) and decrement (-=). Other usage would break the assumptions underlying the parallel accumulator.
- In particular, direct assignment is forbidden. The parallel accumulator is automatically zero initialized.
Example:
res += ...;
res -= ...;
return res;
- Note
- It is only recommended to apply the parallel accumulator for models that are known to work in serial (debugging becomes substantially more difficult with parallel accumulation turned on).
- Examples:
- linreg_parallel.cpp, and transform_parallel.cpp.
Definition at line 957 of file tmb_core.hpp.
The documentation for this struct was generated from the following file:
License: