Aesi Multiprecision
C++ class library of long integer arithmetic for GPU parallelization
|
Long precision signed integer with arithmetic operations. More...
Go to the source code of this file.
Typedefs | |
using | Aesi128 = Aesi< 128 > |
Number with precision 128-bit. | |
using | Aesi256 = Aesi< 256 > |
Number with precision 128-bit. | |
using | Aesi512 = Aesi< 512 > |
Number with precision 512-bit. | |
using | Aesi768 = Aesi< 768 > |
Number with precision 768-bit. | |
using | Aesi1024 = Aesi< 1024 > |
Number with precision 1024-bit. | |
using | Aesi1536 = Aesi< 1536 > |
Number with precision 1536-bit. | |
using | Aesi2048 = Aesi< 2048 > |
Number with precision 2048-bit. | |
using | Aesi3072 = Aesi< 3072 > |
Number with precision 3072-bit. | |
using | Aesi4096 = Aesi< 4096 > |
Number with precision 4096-bit. | |
using | Aesi6144 = Aesi< 6144 > |
Number with precision 6144-bit. | |
using | Aesi8192 = Aesi< 8192 > |
Number with precision 8192-bit. | |
Functions | |
template<std::size_t bitness = 512> | |
requires (bitness % blockBitLength==0) class Aesi final | |
template<std::size_t bitness, typename Integral > | |
requires (std::is_integral_v< Integral >) gpu const expr auto operator+(Integral number | |
Integral conversion addition operator. More... | |
template<std::size_t bitness, typename Integral > | |
requires (std::is_integral_v< Integral >) gpu const expr auto operator&(Integral number | |
Integral conversion bitwise AND operator. More... | |
Variables | |
const Aesi< bitness > &value | noexcept { return Aesi<bitness>(number) + value |
Long precision signed integer with arithmetic operations.
|
final |
Default constructor
Copy constructor
copy | Aesi& |
Integral constructor
value | Integral |
Pointer-based character constructor
ptr | Char* |
size | Size_t |
Accepts decimal strings (no prefix), binary (0b/0B), octal (0o/0O) and hexadecimal (0x/0X)
C-style string literal constructor
literal | Char[] |
String / String-view constructor
stringView | String |
Unsigned integer conversion
value | Aeu& |
Integral assignment operator
value | Integral |
Copy assignment operator
other | Aesi& |
Unary plus operator
Does basically nothing
Unary minus operator
Prefix increment operator
Postfix increment operator
Prefix decrement operator
Postfix decrement operator
Adition operator
addendum | Aesi& |
Addition assignment operator
addendum | Aesi& |
Subtraction operator
subtrahend | Aesi& |
Subtraction assignment operator
subtrahend | Aesi& |
Multiplication operator for built-in types
factor | Integral |
Multiplication operator
factor | Aesi& |
Multiplication assignment operator for built-in types
factor | Integral |
Multiplication assignment operator
factor | Aesi& |
Division operator for built-in integral types
divisor | Integral |
Division operator
divisor | Aesi |
Assignment division operator for built-in integral types
divisor | Integral |
Assignment division operator
divisor | Aesi |
Modulo operator for built-in types
modulo | Integral |
Modulo operator
modulo | Aesi& |
DETAILS
Modulo assignment operator for built-in types
modulo | Integral |
Modulo assignment operator
modulo | Aesi& |
DETAILS
Equality operator for built-in types
integral | Integral |
Equality operator
other | Aesi& |
Different precision equlity operator
other | Aesi& |
Comparison operator for built-in types
integral | Integral |
Different precision comparison operator
value | Aesi& |
Comparison operator
value | Aesi& |
Three-way comparison operator
other | Aesi |
Three-way comparison operator for numbers of different precision and built-in integral types
other | Unsigned |
Set bit in number by index starting from the right
index | Size_t |
bit | Boolean |
Get bit in number by index starting from the right
index | Size_t |
Set byte in number by index starting from the right
index | Size_t |
byte | Byte |
Get byte in number by index starting from the right
index | Size_t |
Set block in number by index starting from the right
index | Size_t |
block | Block |
Get block in number by index starting from the right
index | Size_t |
Get amount of non-empty bytes in number right to left
Get amount of non-empty bits in number right to left
Check whether number is odd
Check whether number is even
Check whether number is zero
Check whether number is positive
Check whether number is negative
Get number of non-empty blocks inside object starting from the right
Get number's precision
Get the number of blocks (length of array of uint32_t integers) inside object
Make swap between two objects
other | Aesi |
Invertes number's bitness
Turns negative to positive and otherwise. Leaves zero unchanges
Integral division
Returns values by references
Square root
Returns zero for negative
Fast exponentiation of 2
Cast for built-in integral types
Number's precision cast
Unsigned cast
Character buffer output operator
buffer | Char* |
bufferSize | Size_t |
showBase | Boolean |
hexUppercase | Boolean |
Places the maximum possible amount of number's characters in buffer. Base parameter should be 2, 8, 10, or 16
STD stream output operator
os | Ostream |
number | Aeu |
Writes number in stream. Accepts STD streams based on char or wchar_t. Supports stream manipulators:
Aesi | assigning |
Aesi | exchangeable |
requires | ( | std::is_integral_v< Integral > | ) | const |
Integral conversion addition operator.
Integral conversion bitwise OR operator.
Integral conversion bitwise XOR operator.
Integral conversion modulo operator.
Integral conversion division operator.
Integral conversion multiplication operator.
Integral conversion subtraction operator.
number | Integral |
value | Aesi |
number | Integral |
value | Aeu |