Monero
src
common
powerof.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
stdint.h
>
4
5
namespace
tools
6
{
7
template
<u
int
64_t a, u
int
64_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
<u
int
64_t a>
18
struct
PowerOf
<
a
, 0>
19
{
20
enum
Data
:
uint64_t
21
{
22
// a^0 = 1
23
Value
= 1,
24
};
25
};
26
}
tools::PowerOf::Value
Definition:
powerof.h:13
GenericValue< UTF8<> >
tools::PowerOf::Data
Data
Definition:
powerof.h:10
tools
Various Tools.
Definition:
apply_permutation.h:39
uint64_t
unsigned __int64 uint64_t
Definition:
stdint.h:136
a
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition:
pointer.h:1124
stdint.h
tools::PowerOf
Definition:
powerof.h:8
b
cryptonote::block b
Definition:
block.cpp:40
Generated on Sun Oct 12 2025 12:00:00 for Monero by
1.8.14