13 namespace accumulators {
19 : m_cnt(new
std::ptrdiff_t(1))
25 : m_cnt(new
std::ptrdiff_t(1))
39 : m_cnt(new
std::ptrdiff_t(1))
53 return m_ptr->
count();
57 #define ALPS_ACCUMULATOR_MEAN_IMPL(r, data, T) \ 58 template<> T virtual_result_wrapper<virtual_accumulator_wrapper>::mean_impl(T) const { \ 59 return m_ptr->mean<T>(); \ 62 #undef ALPS_ACCUMULATOR_MEAN_IMPL 65 #define ALPS_ACCUMULATOR_ERROR_IMPL(r, data, T) \ 66 template<> T virtual_result_wrapper<virtual_accumulator_wrapper>::error_impl(T) const { \ 67 return m_ptr->error<T>(); \ 70 #undef ALPS_ACCUMULATOR_ERROR_IMPL 89 : m_cnt(new
std::ptrdiff_t(1))
95 : m_cnt(new
std::ptrdiff_t(1))
109 : m_cnt(new
std::ptrdiff_t(1))
122 #define ALPS_ACCUMULATOR_OPERATOR_CALL(r, data, T) \ 123 virtual_accumulator_wrapper & virtual_accumulator_wrapper::operator()(T const & value) { \ 128 #undef ALPS_ACCUMULATOR_OPERATOR_CALL 132 m_ptr->
merge(*(rhs.m_ptr));
136 (*m_ptr) = *(rhs->m_ptr);
142 return m_ptr->
count();
146 #define ALPS_ACCUMULATOR_MEAN_IMPL(r, data, T) \ 147 T virtual_accumulator_wrapper::mean_impl(T) const { \ 148 return m_ptr->mean<T>(); \ 151 #undef ALPS_ACCUMULATOR_MEAN_IMPL 154 #define ALPS_ACCUMULATOR_ERROR_IMPL(r, data, T) \ 155 T virtual_accumulator_wrapper::error_impl(T) const { \ 156 return m_ptr->error<T>(); \ 159 #undef ALPS_ACCUMULATOR_ERROR_IMPL 178 return std::shared_ptr<virtual_result_wrapper<virtual_accumulator_wrapper> >(
191 m_ptr->collective_merge(comm, root);
194 m_ptr->collective_merge(comm, root);
200 #define ALPS_ACCUMULATOR_ADD_ACCUMULATOR(r, type, T) \ 201 accumulator_set & operator<<(accumulator_set & set, const MeanAccumulator< T > & arg) { \ 202 set.insert(arg.name(), std::shared_ptr<accumulators::wrapped::virtual_accumulator_wrapper>( \ 203 new accumulators::wrapped::virtual_accumulator_wrapper(new accumulators::accumulator_wrapper( \ 204 accumulators::impl::Accumulator< \ 205 T , accumulators::mean_tag, accumulators::impl::Accumulator< \ 206 T , accumulators::count_tag, accumulators::impl::AccumulatorBase< T > \ 213 accumulator_set & operator<<(accumulator_set & set, const NoBinningAccumulator< T > & arg) { \ 214 set.insert(arg.name(), std::shared_ptr<accumulators::wrapped::virtual_accumulator_wrapper>( \ 215 new accumulators::wrapped::virtual_accumulator_wrapper(new accumulators::accumulator_wrapper( \ 216 accumulators::impl::Accumulator< \ 217 T , accumulators::error_tag, accumulators::impl::Accumulator< \ 218 T , accumulators::mean_tag, accumulators::impl::Accumulator< \ 219 T , accumulators::count_tag, accumulators::impl::AccumulatorBase< T > \ 227 accumulator_set & operator<<(accumulator_set & set, const LogBinningAccumulator< T > & arg) { \ 228 set.insert(arg.name(), std::shared_ptr<accumulators::wrapped::virtual_accumulator_wrapper>( \ 229 new accumulators::wrapped::virtual_accumulator_wrapper(new accumulators::accumulator_wrapper( \ 230 accumulators::impl::Accumulator< \ 231 T , accumulators::binning_analysis_tag, accumulators::impl::Accumulator< \ 232 T , accumulators::error_tag, accumulators::impl::Accumulator< \ 233 T , accumulators::mean_tag, accumulators::impl::Accumulator< \ 234 T , accumulators::count_tag, accumulators::impl::AccumulatorBase< T > \ 243 accumulator_set & operator<<(accumulator_set & set, const FullBinningAccumulator< T > & arg) { \ 244 set.insert(arg.name(), std::shared_ptr<accumulators::wrapped::virtual_accumulator_wrapper>( \ 245 new accumulators::wrapped::virtual_accumulator_wrapper(new accumulators::accumulator_wrapper( \ 246 accumulators::impl::Accumulator< \ 247 T , accumulators::max_num_binning_tag, accumulators::impl::Accumulator< \ 248 T , accumulators::binning_analysis_tag, accumulators::impl::Accumulator< \ 249 T , accumulators::error_tag, accumulators::impl::Accumulator< \ 250 T , accumulators::mean_tag, accumulators::impl::Accumulator< \ 251 T , accumulators::count_tag, accumulators::impl::AccumulatorBase< T > \ 262 #undef ALPS_ACCUMULATOR_ADD_ACCUMULATOR #define ALPS_ACCUMULATOR_ERROR_IMPL(r, data, T)
void save(hdf5::archive &ar) const
virtual_accumulator_wrapper & operator=(std::shared_ptr< virtual_accumulator_wrapper > const &rhs)
void load(hdf5::archive &ar)
void print(std::ostream &os) const
void merge(const virtual_accumulator_wrapper &rhs)
Merge another accumulator into this one.
void print(std::ostream &os) const
virtual_accumulator_wrapper()
std::shared_ptr< virtual_result_wrapper< virtual_accumulator_wrapper > > result() const
Encapsulation of an MPI communicator and some communicator-related operations.
void save(hdf5::archive &ar) const
#define ALPS_ACCUMULATOR_OPERATOR_CALL(r, data, T)
boost::uint64_t count() const
#define ALPS_ACCUMULATOR_ADD_ACCUMULATOR(r, type, T)
#define ALPS_ACCUMULATOR_MEAN_IMPL(r, data, T)
void load(hdf5::archive &ar)
boost::uint64_t count() const
void load(hdf5::archive &ar)
virtual ~virtual_result_wrapper()
void merge(const accumulator_wrapper &rhs_acc)
Merge another accumulator into this one.
void print(std::ostream &os, bool terse=false) const
void save(hdf5::archive &ar) const
std::shared_ptr< result_wrapper > result() const
virtual ~virtual_accumulator_wrapper()
boost::uint64_t count() const
#define ALPS_ACCUMULATOR_VALUE_TYPES_SEQ
boost::uint64_t count() const
void save(hdf5::archive &ar) const
void load(hdf5::archive &ar)
void print(std::ostream &os, bool terse=false) const