32 #ifndef VSMC_SMP_BACKEND_SEQ_HPP 33 #define VSMC_SMP_BACKEND_SEQ_HPP 49 template <typename T, typename Derived>
56 const size_type N = particle.
size();
57 this->eval_param(particle, param);
58 this->eval_pre(particle);
59 std::size_t accept = 0;
60 for (size_type i = 0; i != N; ++i)
62 this->eval_post(particle);
73 template <
typename T,
typename Derived>
80 const size_type N = particle.
size();
82 std::size_t accept = 0;
83 for (size_type i = 0; i != N; ++i)
96 template <
typename T,
typename Derived>
101 std::size_t iter, std::size_t dim,
Particle<T> &particle,
double *r)
104 const size_type N = particle.
size();
106 for (size_type i = 0; i != N; ++i) {
108 r + static_cast<std::size_t>(i) * dim);
119 #endif // VSMC_SMP_BACKEND_SEQ_HPP
Particle class representing the whole particle set.
std::size_t operator()(Particle< T > &particle, void *param)
Monitor evalution base dispatch class.
Monitor<T>::eval_type subtype.
#define VSMC_DEFINE_SMP_BACKEND_FORWARD(Name)
Sampler<T>::init_type subtype.
std::size_t operator()(std::size_t iter, Particle< T > &particle)
void eval_post(std::size_t iter, Particle< T > &particle)
void eval_pre(std::size_t iter, Particle< T > &particle)
Move base dispatch class.
size_type size() const
Number of particles.
std::size_t eval_sp(std::size_t iter, SingleParticle< T > sp)
#define VSMC_DEFINE_SMP_BACKEND_SPECIAL(SMP, Name)
A thin wrapper over a complete Particle.
void operator()(std::size_t iter, std::size_t dim, Particle< T > &particle, double *r)
Sampler<T>::move_type subtype.
Initialize base dispatch class.