Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | Static Private Attributes | List of all members
BitsInt< I, BITS > Class Template Reference

#include <int_utils.h>

Public Types

typedefRepr
 

Static Public Member Functions

static void Swap (I &a, I &b)
 
static constexpr bool IsZero (I a)
 
static constexpr bool IsOne (I a)
 
static constexprMask (I val)
 
static constexprShift (I val, int bits)
 
static constexprUnsafeShift (I val, int bits)
 
template<int Offset, int Count>
static constexpr int MidBits (I val)
 
template<int Count>
static constexpr int TopBits (I val)
 
static constexprCondXorWith (I val, bool cond, I v)
 
template<I MOD>
static constexprCondXorWith (I val, bool cond)
 
static int Bits (I val, int max)
 

Static Public Attributes

static constexpr int SIZE = BITS
 

Static Private Attributes

static constexprMASK = Mask<BITS, I>()
 

Detailed Description

template<typename I, int BITS>
class BitsInt< I, BITS >

Definition at line 179 of file int_utils.h.

Member Typedef Documentation

◆ Repr

template<typename I , int BITS>
typedef I BitsInt< I, BITS >::Repr

Definition at line 188 of file int_utils.h.

Member Function Documentation

◆ Bits()

template<typename I , int BITS>
static int BitsInt< I, BITS >::Bits ( I val,
int max )
inlinestatic

Definition at line 225 of file int_utils.h.

Here is the call graph for this function:

◆ CondXorWith() [1/2]

template<typename I , int BITS>
template<I MOD>
static constexpr I BitsInt< I, BITS >::CondXorWith ( I val,
bool cond )
inlinestaticconstexpr

Definition at line 221 of file int_utils.h.

Here is the call graph for this function:

◆ CondXorWith() [2/2]

template<typename I , int BITS>
static constexpr I BitsInt< I, BITS >::CondXorWith ( I val,
bool cond,
I v )
inlinestaticconstexpr

Definition at line 216 of file int_utils.h.

◆ IsOne()

template<typename I , int BITS>
static constexpr bool BitsInt< I, BITS >::IsOne ( I a)
inlinestaticconstexpr

Definition at line 197 of file int_utils.h.

Here is the call graph for this function:

◆ IsZero()

template<typename I , int BITS>
static constexpr bool BitsInt< I, BITS >::IsZero ( I a)
inlinestaticconstexpr

Definition at line 196 of file int_utils.h.

Here is the call graph for this function:

◆ Mask()

template<typename I , int BITS>
static constexpr I BitsInt< I, BITS >::Mask ( I val)
inlinestaticconstexpr

Definition at line 198 of file int_utils.h.

◆ MidBits()

template<typename I , int BITS>
template<int Offset, int Count>
static constexpr int BitsInt< I, BITS >::MidBits ( I val)
inlinestaticconstexpr

Definition at line 203 of file int_utils.h.

Here is the call graph for this function:

◆ Shift()

template<typename I , int BITS>
static constexpr I BitsInt< I, BITS >::Shift ( I val,
int bits )
inlinestaticconstexpr

Definition at line 199 of file int_utils.h.

◆ Swap()

template<typename I , int BITS>
static void BitsInt< I, BITS >::Swap ( I & a,
I & b )
inlinestatic

Definition at line 192 of file int_utils.h.

Here is the call graph for this function:

◆ TopBits()

template<typename I , int BITS>
template<int Count>
static constexpr int BitsInt< I, BITS >::TopBits ( I val)
inlinestaticconstexpr

Definition at line 210 of file int_utils.h.

◆ UnsafeShift()

template<typename I , int BITS>
static constexpr I BitsInt< I, BITS >::UnsafeShift ( I val,
int bits )
inlinestaticconstexpr

Definition at line 200 of file int_utils.h.

Member Data Documentation

◆ MASK

template<typename I , int BITS>
constexpr I BitsInt< I, BITS >::MASK = Mask<BITS, I>()
staticconstexprprivate

Definition at line 184 of file int_utils.h.

◆ SIZE

template<typename I , int BITS>
constexpr int BitsInt< I, BITS >::SIZE = BITS
staticconstexpr

Definition at line 190 of file int_utils.h.


The documentation for this class was generated from the following file: