Changeset View
Changeset View
Standalone View
Standalone View
src/arith_uint256.h
Show First 20 Lines • Show All 252 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Returns the position of the highest bit set plus one, or zero if the | * Returns the position of the highest bit set plus one, or zero if the | ||||
* value is zero. | * value is zero. | ||||
*/ | */ | ||||
unsigned int bits() const; | unsigned int bits() const; | ||||
uint64_t GetLow64() const { | uint64_t GetLow64() const { | ||||
assert(WIDTH >= 2); | static_assert(WIDTH >= 2, "Assertion WIDTH >= 2 failed (WIDTH = BITS / " | ||||
"32). BITS is a template parameter."); | |||||
return pn[0] | (uint64_t)pn[1] << 32; | return pn[0] | (uint64_t)pn[1] << 32; | ||||
} | } | ||||
}; | }; | ||||
/** 256-bit unsigned big integer. */ | /** 256-bit unsigned big integer. */ | ||||
class arith_uint256 : public base_uint<256> { | class arith_uint256 : public base_uint<256> { | ||||
public: | public: | ||||
arith_uint256() {} | arith_uint256() {} | ||||
Show All 34 Lines |