Stan Math Library
4.9.0
Automatic Differentiation
|
|
inlineprivate |
Performs a cached scatter of a 2D array (nested std::vector).
On the first call the data on the root is scattered to all workers and is stored in the cache locally. Each worker only receives its respective chunk and marks the cache as valid such that any subsequent calls will immediately return the cached chunk. Thus, after calling this function it is guaranteed that on all workers a call to T_cache::data() will return the same chunk within each process of the cluster.
T_cache | static data storage type for the 2D array |
data | 2D array to be scattered from the root and a dummy argument on workers |
Definition at line 423 of file mpi_parallel_call.hpp.