Monero
Loading...
Searching...
No Matches
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
}
b
cryptonote::block b
Definition
block.cpp:40
tools
Various Tools.
Definition
apply_permutation.h:40
a
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition
pointer.h:1124
stdint.h
uint64_t
unsigned __int64 uint64_t
Definition
stdint.h:136
tools::PowerOf< a, 0 >::Data
Data
Definition
powerof.h:21
tools::PowerOf< a, 0 >::Value
@ Value
Definition
powerof.h:23
tools::PowerOf
Definition
powerof.h:9
tools::PowerOf::Data
Data
Definition
powerof.h:11
tools::PowerOf::Value
@ Value
Definition
powerof.h:13
Generated on
for Monero by
1.16.1