Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
accum5.hpp
Go to the documentation of this file.
1 #pragma once
2 
8 #include "accumtraits4.hpp"
9 
10 template <typename T, typename AT = AccumulationTraits<T>>
11 class Accum
12 {
13 public:
14  static typename AT::type accum(T const* beg, T const* end)
15  {
16  typename AT::type total = AT::zero();
17  while (beg != end) {
18  total += *beg;
19  ++beg;
20  }
21  return total;
22  }
23 };
static AT::type accum(T const *beg, T const *end)
Definition: accum5.hpp:14
Definition: accum5.hpp:11