Stan Math Library
4.9.0
Automatic Differentiation
|
|
inlineprivate |
Performs a cached broadcast of a 1D array (std::vector).
On the first call the data on the root is broadcasted to all workers and is stored in the cache locally. This marks the cache as valid and any subsequent calls will immediately return the cached results. Thus, after calling this function it is guaranteed that on all workers a call to T_cache::data() will return the same vector within each process of the cluster.
T_cache | static data storage type for the 1D array |
data | vector to be broadcasted from the root and a dummy argument on workers |
Definition at line 483 of file mpi_parallel_call.hpp.