Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
accumtraits4.hpp
Go to the documentation of this file.
1 #pragma once
2 
8 template <typename T>
9 struct AccumulationTraits;
10 
11 template <>
12 struct AccumulationTraits<char>
13 {
14  using type = int;
15  static constexpr type zero() { return 0; }
16 };
17 
18 template <>
19 struct AccumulationTraits<short>
20 {
21  using type = int;
22  static constexpr type zero() { return 0; }
23 };
24 
25 template <>
26 struct AccumulationTraits<int>
27 {
28  using type = long;
29  static constexpr type zero() { return 0; }
30 };
31 
32 template <>
33 struct AccumulationTraits<unsigned int>
34 {
35  using type = unsigned long;
36  static constexpr type zero() { return 0; }
37 };
38 
39 template <>
40 struct AccumulationTraits<float>
41 {
42  using type = double;
43  static constexpr type zero() { return 0; }
44 };
static constexpr type zero()
static constexpr type zero()
static constexpr type zero()
static constexpr type zero()
static constexpr type zero()