Bitcoin Core  22.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 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 160 of file int_utils.h.

Member Typedef Documentation

◆ Repr

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

Definition at line 169 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 205 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 201 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 196 of file int_utils.h.

◆ IsZero()

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

Definition at line 177 of file int_utils.h.

◆ Mask()

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

Definition at line 178 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 183 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 179 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 173 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 190 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 180 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 165 of file int_utils.h.

◆ SIZE

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

Definition at line 171 of file int_utils.h.


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