openMSX
Public Member Functions | Friends | List of all members
uint128 Class Reference

Unsigned 128-bit integer type. More...

#include <uint128.hh>

Public Member Functions

constexpr uint128 (uint64_t a)
 
constexpr bool operator! () const
 
constexpr uint128 operator~ () const
 
constexpr uint128 operator- () const
 
constexpr uint128operator++ ()
 
constexpr uint128operator-- ()
 
constexpr uint128 operator++ (int)
 
constexpr uint128 operator-- (int)
 
constexpr uint128operator+= (const uint128 &b)
 
constexpr uint128operator-= (const uint128 &b)
 
constexpr uint128operator>>= (unsigned n)
 
constexpr uint128operator<<= (unsigned n)
 
constexpr uint128operator|= (const uint128 &b)
 
constexpr uint128operator&= (const uint128 &b)
 
constexpr uint128operator^= (const uint128 &b)
 
constexpr uint128operator/= (const uint128 &b)
 
constexpr uint128operator%= (const uint128 &b)
 
constexpr uint128operator*= (const uint128 &b)
 

Friends

constexpr friend uint64_t low64 (const uint128 &a)
 
constexpr friend uint64_t high64 (const uint128 &a)
 

Detailed Description

Unsigned 128-bit integer type.

Very simple implementation, not optimized for speed.

Loosely based on the 128-bit utility classes written by Jan Ringos, http://Tringi.Mx-3.cz

Definition at line 23 of file uint128.hh.

Constructor & Destructor Documentation

◆ uint128()

constexpr uint128::uint128 ( uint64_t  a)
inlineconstexpr

Definition at line 26 of file uint128.hh.

Member Function Documentation

◆ operator!()

constexpr bool uint128::operator! ( ) const
inlineconstexpr

Definition at line 28 of file uint128.hh.

◆ operator%=()

constexpr uint128& uint128::operator%= ( const uint128 b)
inlineconstexpr

Definition at line 131 of file uint128.hh.

◆ operator&=()

constexpr uint128& uint128::operator&= ( const uint128 b)
inlineconstexpr

Definition at line 112 of file uint128.hh.

◆ operator*=()

constexpr uint128 & uint128::operator*= ( const uint128 b)
inlineconstexpr

Definition at line 256 of file uint128.hh.

References t.

◆ operator++() [1/2]

constexpr uint128& uint128::operator++ ( )
inlineconstexpr

Definition at line 44 of file uint128.hh.

◆ operator++() [2/2]

constexpr uint128 uint128::operator++ ( int  )
inlineconstexpr

Definition at line 56 of file uint128.hh.

◆ operator+=()

constexpr uint128& uint128::operator+= ( const uint128 b)
inlineconstexpr

Definition at line 69 of file uint128.hh.

◆ operator-()

constexpr uint128 uint128::operator- ( ) const
inlineconstexpr

Definition at line 37 of file uint128.hh.

◆ operator--() [1/2]

constexpr uint128& uint128::operator-- ( )
inlineconstexpr

Definition at line 50 of file uint128.hh.

◆ operator--() [2/2]

constexpr uint128 uint128::operator-- ( int  )
inlineconstexpr

Definition at line 62 of file uint128.hh.

◆ operator-=()

constexpr uint128& uint128::operator-= ( const uint128 b)
inlineconstexpr

Definition at line 76 of file uint128.hh.

◆ operator/=()

constexpr uint128& uint128::operator/= ( const uint128 b)
inlineconstexpr

Definition at line 125 of file uint128.hh.

◆ operator<<=()

constexpr uint128& uint128::operator<<= ( unsigned  n)
inlineconstexpr

Definition at line 93 of file uint128.hh.

◆ operator>>=()

constexpr uint128& uint128::operator>>= ( unsigned  n)
inlineconstexpr

Definition at line 81 of file uint128.hh.

◆ operator^=()

constexpr uint128& uint128::operator^= ( const uint128 b)
inlineconstexpr

Definition at line 118 of file uint128.hh.

◆ operator|=()

constexpr uint128& uint128::operator|= ( const uint128 b)
inlineconstexpr

Definition at line 106 of file uint128.hh.

◆ operator~()

constexpr uint128 uint128::operator~ ( ) const
inlineconstexpr

Definition at line 33 of file uint128.hh.

Friends And Related Function Documentation

◆ high64

constexpr friend uint64_t high64 ( const uint128 a)
friend

Definition at line 169 of file uint128.hh.

◆ low64

constexpr friend uint64_t low64 ( const uint128 a)
friend

Definition at line 164 of file uint128.hh.


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