barretenberg
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
numeric::uint256_t Class Reference

Public Member Functions

constexpr uint256_t (const uint64_t a=0) noexcept
 
constexpr uint256_t (const uint64_t a, const uint64_t b, const uint64_t c, const uint64_t d) noexcept
 
constexpr uint256_t (const uint256_t &other) noexcept
 
constexpr uint256_t (uint256_t &&other) noexcept=default
 
constexpr uint256_t (std::string input) noexcept
 
constexpr operator uint128_t ()
 
constexpr uint256_toperator= (const uint256_t &other) noexcept=default
 
constexpr uint256_toperator= (uint256_t &&other) noexcept=default
 
constexpr operator bool () const
 
template<std::integral T>
constexpr operator T () const
 
constexpr bool get_bit (uint64_t bit_index) const
 
constexpr uint64_t get_msb () const
 
constexpr uint256_t slice (uint64_t start, uint64_t end) const
 
constexpr uint256_t pow (const uint256_t &exponent) const
 
constexpr uint256_t operator+ (const uint256_t &other) const
 
constexpr uint256_t operator- (const uint256_t &other) const
 
constexpr uint256_t operator- () const
 
constexpr uint256_t operator* (const uint256_t &other) const
 
constexpr uint256_t operator/ (const uint256_t &other) const
 
constexpr uint256_t operator% (const uint256_t &other) const
 
constexpr uint256_t operator>> (const uint256_t &other) const
 
constexpr uint256_t operator<< (const uint256_t &other) const
 
constexpr uint256_t operator& (const uint256_t &other) const
 
constexpr uint256_t operator^ (const uint256_t &other) const
 
constexpr uint256_t operator| (const uint256_t &other) const
 
constexpr uint256_t operator~ () const
 
constexpr bool operator== (const uint256_t &other) const
 
constexpr bool operator!= (const uint256_t &other) const
 
constexpr bool operator! () const
 
constexpr bool operator> (const uint256_t &other) const
 
constexpr bool operator< (const uint256_t &other) const
 
constexpr bool operator>= (const uint256_t &other) const
 
constexpr bool operator<= (const uint256_t &other) const
 
constexpr uint256_toperator+= (const uint256_t &other)
 
constexpr uint256_toperator-= (const uint256_t &other)
 
constexpr uint256_toperator*= (const uint256_t &other)
 
constexpr uint256_toperator/= (const uint256_t &other)
 
constexpr uint256_toperator%= (const uint256_t &other)
 
constexpr uint256_toperator++ ()
 
constexpr uint256_toperator-- ()
 
constexpr uint256_toperator&= (const uint256_t &other)
 
constexpr uint256_toperator^= (const uint256_t &other)
 
constexpr uint256_toperator|= (const uint256_t &other)
 
constexpr uint256_toperator>>= (const uint256_t &other)
 
constexpr uint256_toperator<<= (const uint256_t &other)
 
constexpr std::pair< uint256_t, uint256_tmul_extended (const uint256_t &other) const
 
constexpr std::pair< uint256_t, uint256_tdivmod (const uint256_t &b) const
 

Static Public Member Functions

static constexpr uint256_t from_uint128 (const uint128_t a) noexcept
 
static constexpr size_t length ()
 

Public Attributes

uint64_t data [4]
 

Member Function Documentation

◆ slice()

constexpr uint256_t numeric::uint256_t::slice ( uint64_t  start,
uint64_t  end 
) const
constexpr

Viewing this uint256_t as a bit string, and counting bits from 0, slices a substring.

Returns
the uint256_t equal to the substring of bits from (and including) the start-th bit, to (but excluding) the end-th bit of this.

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