Debian Codegraph @

src/common/powerof.h

raw symbols SCIP
1 #pragma once
2
3 #include <stdint.h>
4
5 namespace tools
6 {
7 template<uint64_t a, uint64_t b>
8 struct PowerOf
9 {
10 enum Data : uint64_t
11 {
12 // a^b = a * a^(b-1)
13 Value = a * PowerOf<a, b - 1>::Value,
14 };
15 };
16
17 template<uint64_t a>
18 struct PowerOf<a, 0>
19 {
20 enum Data : uint64_t
21 {
22 // a^0 = 1
23 Value = 1,
24 };
25 };
26 }