TMB Documentation  v1.9.11
List of all members
parallel_accumulator< Type > Struct Template Reference

Helper to manage parallel accumulation. More...

#include <tmb_core.hpp>

Detailed Description

template<class Type>
struct parallel_accumulator< Type >

Helper to manage parallel accumulation.

Example:

// Initialize a variable for parallel summation:
// Only two valid methods:
res += ...;
res -= ...;
// Automatic cast to Type when exit from function
// (cast to Type is not allowed elsewhere):
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: GPL v2