|
gpu constexpr | Aeu () noexcept=default |
| Default constructor.
|
|
gpu constexpr | ~Aeu () noexcept=default |
| Destructor.
|
|
gpu constexpr | Aeu (const Aeu ©) noexcept=default |
| Copy constructor.
|
|
gpu constexpr Aeu & | operator= (const Aeu &other)=default |
| Copy assignment operator.
|
|
template<typename Integral >
requires (std::is_unsigned_v<Integral>) |
gpu constexpr | Aeu (Integral value) noexcept |
| Integral constructor.
|
|
template<typename Char >
requires (std::is_same_v<Char, char> || std::is_same_v<Char, wchar_t>) |
gpu constexpr | Aeu (const Char *data, std::size_t size) noexcept |
| Pointer-based character constructor.
|
|
template<typename Char , std::size_t arrayLength>
requires (arrayLength > 1 && (std::is_same_v<Char, char> || std::is_same_v<Char, wchar_t>)) |
gpu constexpr | Aeu (const Char(&literal)[arrayLength]) noexcept |
| C-style string literal constructor.
|
|
template<typename String , typename Char = typename String::value_type>
requires (std::is_same_v<std::basic_string<Char>, std::decay_t<String>> || std::is_same_v<std::basic_string_view<Char>, std::decay_t<String>>) |
gpu constexpr | Aeu (String &&stringView) noexcept |
| String or string-view based constructor.
|
|
template<typename String , typename Char = typename String::value_type>
requires (std::is_same_v<std::basic_string<Char>, std::decay_t<String>> || std::is_same_v<std::basic_string_view<Char>, std::decay_t<String>>) |
gpu constexpr | Aeu (const String &stringView) noexcept |
|
gpu constexpr auto | operator+ () const noexcept -> Aeu |
| Unary plus operator.
|
|
gpu constexpr auto | operator- () const noexcept -> Aeu |
| Unary minus operator.
|
|
gpu constexpr auto | operator++ () noexcept -> Aeu & |
| Prefix increment.
|
|
gpu constexpr auto | operator++ (int) &noexcept -> Aeu |
| Postfix increment.
|
|
gpu constexpr auto | operator-- () noexcept -> Aeu & |
| Prefix decrement.
|
|
gpu constexpr auto | operator-- (int) &noexcept -> Aeu |
| Postfix decrement.
|
|
gpu constexpr auto | operator~ () const noexcept -> Aeu |
| Bitwise complement operator.
|
|
template<typename Unsigned >
requires (std::is_unsigned_v<Unsigned> && sizeof(Unsigned) < 8) |
gpu constexpr auto | compareTo (Unsigned other) const noexcept -> Comparison |
| Internal comparison operator for built-in integral types uint8_t, uint16_t, uint32_t.
|
|
gpu constexpr auto | compareTo (uint64_t other) const noexcept -> Comparison |
| Internal comparison operator for type uint64_t.
|
|
template<std::size_t otherBitness = bitness> |
gpu constexpr auto | compareTo (const Aeu< otherBitness > &other) const noexcept -> Comparison |
| Internal comparison operator.
|
|
gpu constexpr auto | operator<=> (const Aeu &other) const noexcept -> std::strong_ordering |
| Three-way comparison operator.
|
|
template<typename Unsigned > |
gpu constexpr auto | operator<=> (const Unsigned &other) const noexcept -> std::strong_ordering |
| Three-way comparison operator for numbers of different precision and built-in integral types.
|
|
gpu constexpr auto | setBit (std::size_t index, bool bit) noexcept -> void |
| Set a bit in number by index starting from the right.
|
|
gpu constexpr auto | getBit (std::size_t index) const noexcept -> bool |
| Get bit in number by index staring from the right.
|
|
gpu constexpr auto | setByte (std::size_t index, byte byte) noexcept -> void |
| Set byte in number by index starting from the right.
|
|
gpu constexpr auto | getByte (std::size_t index) const noexcept -> byte |
| Get byte in number by index starting from the right.
|
|
gpu constexpr auto | setBlock (std::size_t index, block block) noexcept -> void |
| Set block in number by index starting from the right.
|
|
gpu constexpr auto | getBlock (std::size_t index) const noexcept -> block |
| Get block in number by index starting from the right.
|
|
gpu constexpr auto | byteCount () const noexcept -> std::size_t |
| Get amount of non-empty bytes in number right to left.
|
|
gpu constexpr auto | bitCount () const noexcept -> std::size_t |
| Get amount of non-empty bits in number right to left.
|
|
gpu constexpr auto | isOdd () const noexcept -> bool |
| Check whether number is odd.
|
|
gpu constexpr auto | isEven () const noexcept -> bool |
| Check whether number is even.
|
|
gpu constexpr auto | isZero () const noexcept -> bool |
| Check whether number is zero.
|
|
gpu constexpr auto | filledBlocksNumber () const noexcept -> std::size_t |
| Get number of non-empty blocks inside object starting from the right.
|
|
gpu constexpr auto | swap (Aeu &other) noexcept -> void |
| Make swap between two objects.
|
|
gpu constexpr auto | squareRoot () const noexcept -> Aeu |
| Get square root.
|
|
template<byte base, typename Char >
requires (std::is_same_v<Char, char> || std::is_same_v<Char, wchar_t> && (base == 2 || base == 8 || base == 10 || base == 16)) |
gpu constexpr auto | getString (Char *const buffer, std::size_t bufferSize, bool showBase=false, bool hexUppercase=false) const noexcept -> std::size_t |
| Character buffer output operator.
|
|
template<typename Char >
requires (std::is_same_v<Char, char> || std::is_same_v<Char, wchar_t>) |
constexpr auto | readBinary (std::basic_istream< Char > &is, bool bigEndian=true) -> void |
| STD stream binary reading operator.
|
|
template<typename Char >
requires (std::is_same_v<Char, char> || std::is_same_v<Char, wchar_t>) |
constexpr auto | writeBinary (std::basic_ostream< Char > &os, bool bigEndian=true) const noexcept -> void |
| STD stream binary writing operator.
|
|
template<typename Integral >
requires (std::is_integral_v<Integral>) |
gpu constexpr auto | integralCast () const noexcept -> Integral |
| Integral type cast operator for built-in types.
|
|
template<std::size_t newBitness>
requires (newBitness != bitness) |
gpu constexpr auto | precisionCast () const noexcept -> Aeu< newBitness > |
| Precision cast operator.
|
|
|
static gpu constexpr auto | getBitness () noexcept -> std::size_t |
| Get number's precision.
|
|
static gpu constexpr auto | totalBlocksNumber () noexcept -> std::size_t |
| Get the number of blocks (length of array of uint32_t integers) inside object.
|
|
static gpu constexpr auto | divide (const Aeu &number, const Aeu &divisor, Aeu "ient, Aeu &remainder) noexcept -> void |
| Integer division. Returns results by reference.
|
|
static gpu constexpr auto | divide (const Aeu &number, const Aeu &divisor) noexcept -> pair< Aeu, Aeu > |
| Integer division. Returns results by value.
|
|
static gpu constexpr auto | gcd (const Aeu &first, const Aeu &second, Aeu &bezoutX, Aeu &bezoutY) noexcept -> Aeu |
| Extended Euclidean algorithm for greatest common divisor.
|
|
static gpu constexpr auto | gcd (const Aeu &first, const Aeu &second) noexcept -> Aeu |
| Greatest common divisor.
|
|
static gpu constexpr auto | lcm (const Aeu &first, const Aeu &second) noexcept -> Aeu |
| Least common multiplier.
|
|
template<std::size_t powerBitness = bitness> |
static gpu constexpr auto | powm (const Aeu &base, const Aeu< powerBitness > &power, const Aeu &modulo) noexcept -> Aeu |
| Exponentiation by modulo.
|
|
static gpu constexpr auto | powm (const Aeu &base, const Aeu &power, const Aeu &mod) noexcept -> Aeu |
|
static gpu constexpr auto | power2 (std::size_t power) noexcept -> Aeu |
| Fast exponentiation for powers of 2.
|
|
|
template<typename Unsigned >
requires (std::is_unsigned_v<Unsigned>) |
gpu constexpr friend auto | operator+ (const Aeu &addition, Unsigned addendum) noexcept -> Aeu |
| Addition operator for built-in integral types.
|
|
gpu constexpr friend auto | operator+ (const Aeu &addition, const Aeu &addendum) noexcept -> Aeu |
| Addition operator.
|
|
template<typename Unsigned >
requires (std::is_unsigned_v<Unsigned>) |
gpu constexpr friend auto | operator+= (Aeu &addition, Unsigned addendum) noexcept -> Aeu & |
| Assignment addition operator for built-in integral types.
|
|
gpu constexpr friend auto | operator+= (Aeu &addition, const Aeu &addendum) noexcept -> Aeu & |
| Assignment addition operator.
|
|
gpu constexpr friend auto | operator- (const Aeu &subtraction, const Aeu &subtrahend) noexcept -> Aeu |
| Subtraction operator.
|
|
gpu constexpr friend auto | operator-= (Aeu &subtraction, const Aeu &subtrahend) noexcept -> Aeu & |
| Assignment subtraction operator.
|
|
template<typename Unsigned >
requires (std::is_unsigned_v<Unsigned>) |
gpu constexpr friend auto | operator* (Aeu &multiplication, Unsigned factor) noexcept -> Aeu |
| Multiplication operator for built-in integral types.
|
|
gpu constexpr friend auto | operator* (const Aeu &multiplication, const Aeu &factor) noexcept -> Aeu |
| Multiplication operator.
|
|
template<typename Unsigned >
requires (std::is_unsigned_v<Unsigned>) |
gpu constexpr friend auto | operator*= (Aeu &multiplication, Unsigned factor) noexcept -> Aeu & |
| Assignment multiplication operator for built-in integral types.
|
|
gpu constexpr friend auto | operator*= (Aeu &multiplication, const Aeu &factor) noexcept -> Aeu & |
| Assignment multiplication operator.
|
|
gpu constexpr friend auto | operator/ (const Aeu &division, const Aeu &divisor) noexcept -> Aeu |
| Division operator.
|
|
gpu constexpr friend auto | operator/= (Aeu &division, const Aeu &divisor) noexcept -> Aeu & |
| Assignment division operator.
|
|
gpu constexpr friend auto | operator% (const Aeu &modulation, const Aeu &modulo) noexcept -> Aeu |
| Modulo operator.
|
|
gpu constexpr friend auto | operator%= (Aeu &modulation, const Aeu &modulo) noexcept -> Aeu & |
| Assignment modulo operator.
|
|
gpu constexpr friend auto | operator^ (const Aeu &left, const Aeu &right) noexcept -> Aeu |
| Bitwise XOR operator.
|
|
gpu constexpr friend auto | operator^= (Aeu &left, const Aeu &right) noexcept -> Aeu & |
| Assignment bitwise XOR operator.
|
|
gpu constexpr friend auto | operator& (const Aeu &left, const Aeu &right) noexcept -> Aeu |
| Bitwise AND operator.
|
|
gpu constexpr friend auto | operator&= (Aeu &left, const Aeu &right) noexcept -> Aeu & |
| Assignment bitwise AND operator.
|
|
gpu constexpr friend auto | operator| (const Aeu &left, const Aeu &right) noexcept -> Aeu |
| Bitwise OR operator.
|
|
gpu constexpr friend auto | operator|= (Aeu &left, const Aeu &right) noexcept -> Aeu & |
| Assignment bitwise OR operator.
|
|
template<typename Unsigned >
requires (std::is_integral_v<Unsigned> && std::is_unsigned_v<Unsigned>) |
gpu constexpr friend auto | operator<< (const Aeu &value, Unsigned bitShift) noexcept -> Aeu |
| Left shift operator.
|
|
template<typename Unsigned >
requires (std::is_integral_v<Unsigned> && std::is_unsigned_v<Unsigned>) |
gpu constexpr friend auto | operator<<= (Aeu &value, Unsigned bitShift) noexcept -> Aeu & |
| Left shift assignment operator.
|
|
template<typename Unsigned >
requires (std::is_integral_v<Unsigned> && std::is_unsigned_v<Unsigned>) |
gpu constexpr friend auto | operator>> (const Aeu &value, Unsigned bitShift) noexcept -> Aeu |
| Right shift operator.
|
|
template<typename Unsigned >
requires (std::is_integral_v<Unsigned> && std::is_unsigned_v<Unsigned>) |
gpu constexpr friend auto | operator>>= (Aeu &value, Unsigned bitShift) noexcept -> Aeu & |
| Right shift assignment operator.
|
|
template<typename Unsigned >
requires (std::is_unsigned_v<Unsigned> && sizeof(Unsigned) < 8) |
gpu constexpr friend auto | operator== (const Aeu &our, Unsigned other) noexcept -> bool |
| Equality check operator for built-in types uint8_t, uint16_t, uint32_t.
|
|
gpu constexpr friend auto | operator== (const Aeu &our, uint64_t other) noexcept -> bool |
|
gpu constexpr friend auto | operator== (const Aeu &our, const Aeu &other) noexcept -> bool=default |
| Equality check operator for numbers of the same precision.
|
|
template<std::size_t otherBitness>
requires (otherBitness != bitness) |
gpu constexpr friend auto | operator== (const Aeu &our, const Aeu< otherBitness > &other) noexcept -> bool |
| Templated Equality check operator for numbers of different precision.
|
|
template<typename Char >
requires (std::is_same_v<Char, char> || std::is_same_v<Char, wchar_t>) |
constexpr auto | operator<< (std::basic_ostream< Char > &os, const Aeu &number) -> std::basic_ostream< Char > & |
| STD stream output operator.
|
|
template<std::size_t bitness = 512>
requires (bitness % blockBitLength == 0)
class Aeu< bitness >
Long precision unsigned integer.
May be used to represent only positive integers. Number precision is set in template parameter bitness.