Gobelijn API documentation
- generated for commit a0cbea7
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Friends
Macros
Pages
accum8.hpp
Go to the documentation of this file.
1
#pragma once
2
8
#include "
accumtraits4.hpp
"
9
#include "
sumpolicy2.hpp
"
10
11
template
<
typename
T,
template
<
typename
,
typename
>
class
Policy =
SumPolicy
,
typename
Traits =
AccumulationTraits<T>
>
12
class
Accum
13
{
14
public
:
15
using
AccT
=
typename
Traits::type;
16
17
public
:
18
static
AccT
accum
(T
const
* beg, T
const
* end)
19
{
20
AccT
total = Traits::zero();
21
while
(beg != end) {
22
Policy<AccT, T>::accumulate(total, *beg);
23
++beg;
24
}
25
return
total;
26
}
27
};
Accum::accum
static AccT accum(T const *beg, T const *end)
Definition:
accum8.hpp:18
Accum::AccT
typename Traits::type AccT
Definition:
accum6.hpp:15
sumpolicy2.hpp
Accum
Definition:
accum5.hpp:11
accumtraits4.hpp
AccumulationTraits
Definition:
accumtraits2.hpp:9
SumPolicy
Definition:
sumpolicy1.hpp:8
main
cpp
template_traits
accum8.hpp
Generated on Fri Feb 1 2019 09:33:32 for Gobelijn API documentation by
1.8.6