3 #ifndef STAN_MATH_PRIM_ARR_FUNCTOR_MPI_DISTRIBUTED_APPLY_HPP 4 #define STAN_MATH_PRIM_ARR_FUNCTOR_MPI_DISTRIBUTED_APPLY_HPP 8 #include <boost/serialization/nvp.hpp> 9 #include <boost/serialization/serialization.hpp> 10 #include <boost/serialization/access.hpp> 11 #include <boost/serialization/base_object.hpp> 27 struct mpi_distributed_apply :
public mpi_command {
30 friend class boost::serialization::access;
31 template <
class Archive>
32 void serialize(Archive& ar,
const unsigned int version) {
33 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(mpi_command);
40 void run()
const { F::distributed_apply(); }
46 #define STAN_REGISTER_MPI_DISTRIBUTED_APPLY(APPLY_FUNCTOR) \ 47 STAN_REGISTER_MPI_COMMAND(stan::math::mpi_distributed_apply<APPLY_FUNCTOR>)