3#ifndef STAN_MATH_PRIM_FUNCTOR_MAP_RECT_MPI_HPP 
    4#define STAN_MATH_PRIM_FUNCTOR_MAP_RECT_MPI_HPP 
   18template <
int call_id, 
typename F, 
typename T_shared_param,
 
   20inline Eigen::Matrix<return_type_t<T_shared_param, T_job_param>, Eigen::Dynamic,
 
   23             const std::vector<Eigen::Matrix<T_job_param, Eigen::Dynamic, 1>>&
 
   25             const std::vector<std::vector<double>>& x_r,
 
   26             const std::vector<std::vector<int>>& x_i,
 
   27             std::ostream* msgs = 
nullptr) {
 
   37        shared_params, job_params, x_r, x_i);
 
   41    return map_rect_concurrent<call_id, F>(shared_params, job_params, x_r, x_i,
 
   49#define STAN_REGISTER_MPI_MAP_RECT(CALLID, FUNCTOR, SHARED, JOB)               \ 
   52  namespace internal {                                                         \ 
   53  typedef FUNCTOR mpi_mr_##CALLID##_##SHARED##_##JOB##_;                       \ 
   54  typedef map_rect_reduce<mpi_mr_##CALLID##_##SHARED##_##JOB##_, SHARED, JOB>  \ 
   55      mpi_mr_##CALLID##_##SHARED##_##JOB##_red_;                               \ 
   56  typedef map_rect_combine<mpi_mr_##CALLID##_##SHARED##_##JOB##_,              \ 
   57                           Eigen::Matrix<SHARED, Eigen::Dynamic, 1>, JOB>      \ 
   58      mpi_mr_##CALLID##_##SHARED##_##JOB##_comb_;                              \ 
   59  typedef mpi_parallel_call<CALLID, mpi_mr_##CALLID##_##SHARED##_##JOB##_red_, \ 
   60                            mpi_mr_##CALLID##_##SHARED##_##JOB##_comb_>        \ 
   61      mpi_mr_##CALLID##_##SHARED##_##JOB##_pcall_;                             \ 
   65  STAN_REGISTER_MPI_DISTRIBUTED_APPLY(                                         \ 
   66      stan::math::internal::mpi_mr_##CALLID##_##SHARED##_##JOB##_pcall_) 
   68#define STAN_REGISTER_MPI_MAP_RECT_ALL(CALLID, FUNCTOR) \ 
   69  STAN_REGISTER_MPI_MAP_RECT(CALLID, FUNCTOR, double, double) 
   72#undef STAN_REGISTER_MAP_RECT 
   73#define STAN_REGISTER_MAP_RECT(CALLID, FUNCTOR) \ 
   74  STAN_REGISTER_MPI_MAP_RECT_ALL(CALLID, FUNCTOR) 
Exception thrown whenever the MPI resource is busy.
 
result_t reduce_combine()
Once all data is distributed and cached the reduce_combine evaluates all assigned function evaluation...
 
The MPI parallel call class manages the distributed evaluation of a collection of tasks following the...
 
Eigen::Matrix< return_type_t< T_shared_param, T_job_param >, Eigen::Dynamic, 1 > map_rect_mpi(const T_shared_param &shared_params, const std::vector< Eigen::Matrix< T_job_param, Eigen::Dynamic, 1 > > &job_params, const std::vector< std::vector< double > > &x_r, const std::vector< std::vector< int > > &x_i, std::ostream *msgs=nullptr)
 
static constexpr double e()
Return the base of the natural logarithm.
 
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...