Bitcoin Core 28.99.0
P2P Digital Currency
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

typedef I Repr
 

Static Public Member Functions

static void Swap (I &a, I &b)
 
static constexpr bool IsZero (I a)
 
static constexpr bool IsOne (I a)
 
static constexpr I Mask (I val)
 
static constexpr I Shift (I val, int bits)
 
static constexpr I UnsafeShift (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 constexpr I CondXorWith (I val, bool cond, I v)
 
template<I MOD>
static constexpr I CondXorWith (I val, bool cond)
 
static int Bits (I val, int max)
 

Static Public Attributes

static constexpr int SIZE = BITS
 

Static Private Attributes

static constexpr I MASK = 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 ( val,
int  max 
)
inlinestatic

Definition at line 225 of file int_utils.h.

◆ CondXorWith() [1/2]

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

Definition at line 221 of file int_utils.h.

◆ CondXorWith() [2/2]

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

Definition at line 216 of file int_utils.h.

◆ IsOne()

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

Definition at line 197 of file int_utils.h.

◆ IsZero()

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

Definition at line 196 of file int_utils.h.

◆ Mask()

template<typename I , int BITS>
static constexpr I BitsInt< I, BITS >::Mask ( 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 ( val)
inlinestaticconstexpr

Definition at line 203 of file int_utils.h.

◆ Shift()

template<typename I , int BITS>
static constexpr I BitsInt< I, BITS >::Shift ( 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.

◆ TopBits()

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

Definition at line 210 of file int_utils.h.

◆ UnsafeShift()

template<typename I , int BITS>
static constexpr I BitsInt< I, BITS >::UnsafeShift ( 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: