diff --git a/.github/workflows/amalgamate.yml b/.github/workflows/amalgamate.yml index 221c878c..8fcfd239 100644 --- a/.github/workflows/amalgamate.yml +++ b/.github/workflows/amalgamate.yml @@ -66,7 +66,7 @@ jobs: return 2; } - if (saturating_add(a, b) != (std::numeric_limits::max)()) + if (saturating_add(a, b) != (std::numeric_limits::max)()) { return 3; } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13a58ba7..deede299 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -997,7 +997,7 @@ jobs: #include int main() { using namespace boost::int128; - uint128_t d{456}; + uint128 d{456}; std::cout << "Value: " << d << "\n"; return 0; } @@ -1075,7 +1075,7 @@ jobs: #include int main() { using namespace boost::int128; - uint128_t d{42}; + uint128 d{42}; std::cout << "Value: " << d << "\n"; return 0; } @@ -1145,7 +1145,7 @@ jobs: #include int main() { using namespace boost::int128; - uint128_t d{123}; + uint128 d{123}; std::cout << "Value: " << d << "\n"; return 0; } diff --git a/README.md b/README.md index 4a2936f1..230aaeff 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,8 @@ Int128 provides 2 types: namespace boost { namespace int128 { -struct uint128_t; -struct int128_t; +struct uint128; +struct int128; } //namespace int128 } //namespace boost diff --git a/doc/modules/ROOT/data/benchmarks-linux-arm32/i128.json b/doc/modules/ROOT/data/benchmarks-linux-arm32/i128.json index 1c7c19a9..7aef0e9c 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-arm32/i128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-arm32/i128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "int128_t", + "type": "int128", "sign": "i128", "os": "linux", "arch": "ARM32", @@ -8,136 +8,136 @@ "cxxstd": 202002, "elements": 2000000, "repetitions": 5, - "baseline": "boost::mp::int128_t", - "implementations": ["int128_t", "boost::mp::int128_t"], + "baseline": "boost::mp::int128", + "implementations": ["int128", "boost::mp::int128"], "results": [ - {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 134350}, - {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 138077}, - {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 222230}, - {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 217297}, - {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 216908}, - {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 216912}, - {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1149622}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 278729}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 285825}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 299308}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 280007}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 253360}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 277894}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1677063}, - {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 86697}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 923569}, - {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 83835}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1144519}, - {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 128954}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2168225}, - {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 2572613}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2921784}, - {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 2466122}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2693782}, - {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 9025625}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 15392895}, - {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 11982284}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 13221533}, - {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 160078}, - {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 161518}, - {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 205651}, - {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 204640}, - {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 204467}, - {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 206841}, - {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1143762}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 132801}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 141461}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 209310}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 211931}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 212082}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 212542}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1120664}, - {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 85241}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 853523}, - {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 84261}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 786805}, - {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 128173}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1455716}, - {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 1233721}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2497533}, - {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1250773}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1980038}, - {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 132251}, - {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 135318}, - {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 161514}, - {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 158944}, - {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 158727}, - {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 161057}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 908257}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 97395}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 98065}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 173039}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 178417}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 179433}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 176556}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 903588}, - {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 85174}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1367981}, - {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 83658}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1265644}, - {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 128209}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1673418}, - {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 5017049}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 8160044}, - {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 5084379}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 7667723}, - {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 132223}, - {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 137506}, - {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 161094}, - {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 158872}, - {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 158867}, - {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 161458}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 910483}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 96907}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 97982}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 120163}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 122889}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 123602}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 121651}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 683654}, - {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 85173}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1315375}, - {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 84214}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1219488}, - {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 128434}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1673819}, - {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 5004822}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 8132982}, - {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 5026178}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 7704325}, - {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 166397}, - {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 169127}, - {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 215562}, - {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 216792}, - {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 216358}, - {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 214771}, - {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1199464}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 154986}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 157386}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 206950}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 210651}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 209776}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 209331}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1149576}, - {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 90313}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1105341}, - {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 83826}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1065408}, - {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 128179}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1710617}, - {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 3477343}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 5506901}, - {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 3495645}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 5094644}, - {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 123323}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 1295215}, - {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 337779}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 428232} + {"group": "two_word", "operation": "eq", "implementation": "int128", "microseconds": 134350}, + {"group": "two_word", "operation": "ne", "implementation": "int128", "microseconds": 138077}, + {"group": "two_word", "operation": "lt", "implementation": "int128", "microseconds": 222230}, + {"group": "two_word", "operation": "le", "implementation": "int128", "microseconds": 217297}, + {"group": "two_word", "operation": "gt", "implementation": "int128", "microseconds": 216908}, + {"group": "two_word", "operation": "ge", "implementation": "int128", "microseconds": 216912}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 1149622}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 278729}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 285825}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 299308}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 280007}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 253360}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 277894}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1677063}, + {"group": "two_word", "operation": "add", "implementation": "int128", "microseconds": 86697}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 923569}, + {"group": "two_word", "operation": "sub", "implementation": "int128", "microseconds": 83835}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1144519}, + {"group": "two_word", "operation": "mul", "implementation": "int128", "microseconds": 128954}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 2168225}, + {"group": "two_word", "operation": "div", "implementation": "int128", "microseconds": 2572613}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 2921784}, + {"group": "two_word", "operation": "mod", "implementation": "int128", "microseconds": 2466122}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 2693782}, + {"group": "two_word", "operation": "div64", "implementation": "int128", "microseconds": 9025625}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128", "microseconds": 15392895}, + {"group": "two_word", "operation": "div32", "implementation": "int128", "microseconds": 11982284}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128", "microseconds": 13221533}, + {"group": "one_word", "operation": "eq", "implementation": "int128", "microseconds": 160078}, + {"group": "one_word", "operation": "ne", "implementation": "int128", "microseconds": 161518}, + {"group": "one_word", "operation": "lt", "implementation": "int128", "microseconds": 205651}, + {"group": "one_word", "operation": "le", "implementation": "int128", "microseconds": 204640}, + {"group": "one_word", "operation": "gt", "implementation": "int128", "microseconds": 204467}, + {"group": "one_word", "operation": "ge", "implementation": "int128", "microseconds": 206841}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 1143762}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 132801}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 141461}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 209310}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 211931}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 212082}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 212542}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1120664}, + {"group": "one_word", "operation": "add", "implementation": "int128", "microseconds": 85241}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 853523}, + {"group": "one_word", "operation": "sub", "implementation": "int128", "microseconds": 84261}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 786805}, + {"group": "one_word", "operation": "mul", "implementation": "int128", "microseconds": 128173}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1455716}, + {"group": "one_word", "operation": "div", "implementation": "int128", "microseconds": 1233721}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 2497533}, + {"group": "one_word", "operation": "mod", "implementation": "int128", "microseconds": 1250773}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 1980038}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128", "microseconds": 132251}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128", "microseconds": 135318}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128", "microseconds": 161514}, + {"group": "two_one_word", "operation": "le", "implementation": "int128", "microseconds": 158944}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128", "microseconds": 158727}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128", "microseconds": 161057}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 908257}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 97395}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 98065}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 173039}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 178417}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 179433}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 176556}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 903588}, + {"group": "two_one_word", "operation": "add", "implementation": "int128", "microseconds": 85174}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1367981}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128", "microseconds": 83658}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1265644}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128", "microseconds": 128209}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1673418}, + {"group": "two_one_word", "operation": "div", "implementation": "int128", "microseconds": 5017049}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 8160044}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128", "microseconds": 5084379}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 7667723}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128", "microseconds": 132223}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128", "microseconds": 137506}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128", "microseconds": 161094}, + {"group": "one_two_word", "operation": "le", "implementation": "int128", "microseconds": 158872}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128", "microseconds": 158867}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128", "microseconds": 161458}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 910483}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 96907}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 97982}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 120163}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 122889}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 123602}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 121651}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 683654}, + {"group": "one_two_word", "operation": "add", "implementation": "int128", "microseconds": 85173}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1315375}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128", "microseconds": 84214}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1219488}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128", "microseconds": 128434}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1673819}, + {"group": "one_two_word", "operation": "div", "implementation": "int128", "microseconds": 5004822}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 8132982}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128", "microseconds": 5026178}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 7704325}, + {"group": "random_width", "operation": "eq", "implementation": "int128", "microseconds": 166397}, + {"group": "random_width", "operation": "ne", "implementation": "int128", "microseconds": 169127}, + {"group": "random_width", "operation": "lt", "implementation": "int128", "microseconds": 215562}, + {"group": "random_width", "operation": "le", "implementation": "int128", "microseconds": 216792}, + {"group": "random_width", "operation": "gt", "implementation": "int128", "microseconds": 216358}, + {"group": "random_width", "operation": "ge", "implementation": "int128", "microseconds": 214771}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128", "microseconds": 1199464}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 154986}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 157386}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 206950}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 210651}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 209776}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 209331}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1149576}, + {"group": "random_width", "operation": "add", "implementation": "int128", "microseconds": 90313}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1105341}, + {"group": "random_width", "operation": "sub", "implementation": "int128", "microseconds": 83826}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1065408}, + {"group": "random_width", "operation": "mul", "implementation": "int128", "microseconds": 128179}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1710617}, + {"group": "random_width", "operation": "div", "implementation": "int128", "microseconds": 3477343}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 5506901}, + {"group": "random_width", "operation": "mod", "implementation": "int128", "microseconds": 3495645}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 5094644}, + {"group": "random_width", "operation": "shl", "implementation": "int128", "microseconds": 123323}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128", "microseconds": 1295215}, + {"group": "random_width", "operation": "shr", "implementation": "int128", "microseconds": 337779}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128", "microseconds": 428232} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-arm32/u128.json b/doc/modules/ROOT/data/benchmarks-linux-arm32/u128.json index 3e32f774..0f34035c 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-arm32/u128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-arm32/u128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "uint128_t", + "type": "uint128", "sign": "u128", "os": "linux", "arch": "ARM32", @@ -8,142 +8,142 @@ "cxxstd": 202002, "elements": 2000000, "repetitions": 5, - "baseline": "boost::mp::uint128_t", - "implementations": ["uint128_t", "boost::mp::uint128_t"], + "baseline": "boost::mp::uint128", + "implementations": ["uint128", "boost::mp::uint128"], "results": [ - {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 134379}, - {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 141343}, - {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 133014}, - {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 132984}, - {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 183283}, - {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 129518}, - {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 858327}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 135825}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 135131}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 270504}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 169292}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 197207}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 232584}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1142287}, - {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 85389}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 766402}, - {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 83905}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 960055}, - {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 128535}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1912473}, - {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 2116587}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 3581345}, - {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 2605169}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 3202358}, - {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 9235748}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 17825351}, - {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 12149180}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 13809296}, - {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 158519}, - {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 168311}, - {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 223533}, - {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 257842}, - {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 256611}, - {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 223227}, - {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1288596}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 111101}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 118299}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 170152}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 168970}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 171541}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 171499}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 912095}, - {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 85300}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 675836}, - {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 83679}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1053537}, - {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 128326}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1363954}, - {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1231058}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2779046}, - {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1322017}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2210105}, - {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 130547}, - {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 141121}, - {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 127599}, - {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 127631}, - {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 148344}, - {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 123623}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 799324}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 73393}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 74891}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 84092}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 91127}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 130979}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 101400}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 556348}, - {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 85277}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1162360}, - {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 83656}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1335382}, - {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 128223}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1567199}, - {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 5004368}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 9435352}, - {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 5128364}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 8666811}, - {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 130553}, - {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 141128}, - {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 127560}, - {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 127680}, - {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 148152}, - {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 123703}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 799311}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 72683}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 74765}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 79298}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 82812}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 82274}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 79529}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 471895}, - {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 85306}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1117033}, - {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 84183}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1261257}, - {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 128219}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1581059}, - {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 5015024}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 9441546}, - {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 5080978}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 8694361}, - {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 189726}, - {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 199325}, - {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 173706}, - {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 179331}, - {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 223638}, - {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 181896}, - {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1148095}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 99631}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 103730}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 133612}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 133587}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 135249}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 132038}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 738322}, - {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 85164}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 970287}, - {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 83783}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1257721}, - {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 128178}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1306808}, - {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 3858870}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 6092878}, - {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 4059654}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 5190052}, - {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 152838}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 1267952}, - {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 223346}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 342923}, - {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 56537}, - {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 1914860}, - {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 56461}, - {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 980008}, - {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 56443}, - {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 979710} + {"group": "two_word", "operation": "eq", "implementation": "uint128", "microseconds": 134379}, + {"group": "two_word", "operation": "ne", "implementation": "uint128", "microseconds": 141343}, + {"group": "two_word", "operation": "lt", "implementation": "uint128", "microseconds": 133014}, + {"group": "two_word", "operation": "le", "implementation": "uint128", "microseconds": 132984}, + {"group": "two_word", "operation": "gt", "implementation": "uint128", "microseconds": 183283}, + {"group": "two_word", "operation": "ge", "implementation": "uint128", "microseconds": 129518}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 858327}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 135825}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 135131}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 270504}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 169292}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 197207}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 232584}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1142287}, + {"group": "two_word", "operation": "add", "implementation": "uint128", "microseconds": 85389}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 766402}, + {"group": "two_word", "operation": "sub", "implementation": "uint128", "microseconds": 83905}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 960055}, + {"group": "two_word", "operation": "mul", "implementation": "uint128", "microseconds": 128535}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1912473}, + {"group": "two_word", "operation": "div", "implementation": "uint128", "microseconds": 2116587}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 3581345}, + {"group": "two_word", "operation": "mod", "implementation": "uint128", "microseconds": 2605169}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 3202358}, + {"group": "two_word", "operation": "div64", "implementation": "uint128", "microseconds": 9235748}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128", "microseconds": 17825351}, + {"group": "two_word", "operation": "div32", "implementation": "uint128", "microseconds": 12149180}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128", "microseconds": 13809296}, + {"group": "one_word", "operation": "eq", "implementation": "uint128", "microseconds": 158519}, + {"group": "one_word", "operation": "ne", "implementation": "uint128", "microseconds": 168311}, + {"group": "one_word", "operation": "lt", "implementation": "uint128", "microseconds": 223533}, + {"group": "one_word", "operation": "le", "implementation": "uint128", "microseconds": 257842}, + {"group": "one_word", "operation": "gt", "implementation": "uint128", "microseconds": 256611}, + {"group": "one_word", "operation": "ge", "implementation": "uint128", "microseconds": 223227}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 1288596}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 111101}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 118299}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 170152}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 168970}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 171541}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 171499}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 912095}, + {"group": "one_word", "operation": "add", "implementation": "uint128", "microseconds": 85300}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 675836}, + {"group": "one_word", "operation": "sub", "implementation": "uint128", "microseconds": 83679}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1053537}, + {"group": "one_word", "operation": "mul", "implementation": "uint128", "microseconds": 128326}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1363954}, + {"group": "one_word", "operation": "div", "implementation": "uint128", "microseconds": 1231058}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 2779046}, + {"group": "one_word", "operation": "mod", "implementation": "uint128", "microseconds": 1322017}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 2210105}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128", "microseconds": 130547}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128", "microseconds": 141121}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128", "microseconds": 127599}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128", "microseconds": 127631}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128", "microseconds": 148344}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128", "microseconds": 123623}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 799324}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 73393}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 74891}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 84092}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 91127}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 130979}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 101400}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 556348}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128", "microseconds": 85277}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1162360}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128", "microseconds": 83656}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1335382}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128", "microseconds": 128223}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1567199}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128", "microseconds": 5004368}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 9435352}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128", "microseconds": 5128364}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 8666811}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128", "microseconds": 130553}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128", "microseconds": 141128}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128", "microseconds": 127560}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128", "microseconds": 127680}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128", "microseconds": 148152}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128", "microseconds": 123703}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 799311}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 72683}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 74765}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 79298}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 82812}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 82274}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 79529}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 471895}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128", "microseconds": 85306}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1117033}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128", "microseconds": 84183}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1261257}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128", "microseconds": 128219}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1581059}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128", "microseconds": 5015024}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 9441546}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128", "microseconds": 5080978}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 8694361}, + {"group": "random_width", "operation": "eq", "implementation": "uint128", "microseconds": 189726}, + {"group": "random_width", "operation": "ne", "implementation": "uint128", "microseconds": 199325}, + {"group": "random_width", "operation": "lt", "implementation": "uint128", "microseconds": 173706}, + {"group": "random_width", "operation": "le", "implementation": "uint128", "microseconds": 179331}, + {"group": "random_width", "operation": "gt", "implementation": "uint128", "microseconds": 223638}, + {"group": "random_width", "operation": "ge", "implementation": "uint128", "microseconds": 181896}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128", "microseconds": 1148095}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 99631}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 103730}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 133612}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 133587}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 135249}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 132038}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 738322}, + {"group": "random_width", "operation": "add", "implementation": "uint128", "microseconds": 85164}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 970287}, + {"group": "random_width", "operation": "sub", "implementation": "uint128", "microseconds": 83783}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1257721}, + {"group": "random_width", "operation": "mul", "implementation": "uint128", "microseconds": 128178}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1306808}, + {"group": "random_width", "operation": "div", "implementation": "uint128", "microseconds": 3858870}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 6092878}, + {"group": "random_width", "operation": "mod", "implementation": "uint128", "microseconds": 4059654}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 5190052}, + {"group": "random_width", "operation": "shl", "implementation": "uint128", "microseconds": 152838}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128", "microseconds": 1267952}, + {"group": "random_width", "operation": "shr", "implementation": "uint128", "microseconds": 223346}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128", "microseconds": 342923}, + {"group": "random_width", "operation": "and", "implementation": "uint128", "microseconds": 56537}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128", "microseconds": 1914860}, + {"group": "random_width", "operation": "or", "implementation": "uint128", "microseconds": 56461}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128", "microseconds": 980008}, + {"group": "random_width", "operation": "xor", "implementation": "uint128", "microseconds": 56443}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128", "microseconds": 979710} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-arm64/i128.json b/doc/modules/ROOT/data/benchmarks-linux-arm64/i128.json index a3d0638f..4df57f56 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-arm64/i128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-arm64/i128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "int128_t", + "type": "int128", "sign": "i128", "os": "linux", "arch": "ARM64", @@ -9,7 +9,7 @@ "elements": 20000000, "repetitions": 5, "baseline": "__int128", - "implementations": ["__int128", "int128_t", "boost::mp::int128_t", "absl::int128"], + "implementations": ["__int128", "int128", "boost::mp::int128", "absl::int128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "__int128", "microseconds": 92810}, {"group": "two_word", "operation": "ne", "implementation": "__int128", "microseconds": 92239}, @@ -18,20 +18,20 @@ {"group": "two_word", "operation": "gt", "implementation": "__int128", "microseconds": 244637}, {"group": "two_word", "operation": "ge", "implementation": "__int128", "microseconds": 244070}, {"group": "two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 1159153}, - {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 93959}, - {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 93658}, - {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 94106}, - {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 91792}, - {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 93133}, - {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 90845}, - {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 557613}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 327932}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 317258}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 292964}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 283789}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 290141}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 293354}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1805584}, + {"group": "two_word", "operation": "eq", "implementation": "int128", "microseconds": 93959}, + {"group": "two_word", "operation": "ne", "implementation": "int128", "microseconds": 93658}, + {"group": "two_word", "operation": "lt", "implementation": "int128", "microseconds": 94106}, + {"group": "two_word", "operation": "le", "implementation": "int128", "microseconds": 91792}, + {"group": "two_word", "operation": "gt", "implementation": "int128", "microseconds": 93133}, + {"group": "two_word", "operation": "ge", "implementation": "int128", "microseconds": 90845}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 557613}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 327932}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 317258}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 292964}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 283789}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 290141}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 293354}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1805584}, {"group": "two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 90714}, {"group": "two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 95936}, {"group": "two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 240911}, @@ -40,32 +40,32 @@ {"group": "two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 239174}, {"group": "two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 1155865}, {"group": "two_word", "operation": "add", "implementation": "__int128", "microseconds": 88108}, - {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 89265}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 175781}, + {"group": "two_word", "operation": "add", "implementation": "int128", "microseconds": 89265}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 175781}, {"group": "two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 85922}, {"group": "two_word", "operation": "sub", "implementation": "__int128", "microseconds": 88357}, - {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 86946}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 322766}, + {"group": "two_word", "operation": "sub", "implementation": "int128", "microseconds": 86946}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 322766}, {"group": "two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 84589}, {"group": "two_word", "operation": "mul", "implementation": "__int128", "microseconds": 83740}, - {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 86761}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 194017}, + {"group": "two_word", "operation": "mul", "implementation": "int128", "microseconds": 86761}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 194017}, {"group": "two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 87777}, {"group": "two_word", "operation": "div", "implementation": "__int128", "microseconds": 550352}, - {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 592011}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 642713}, + {"group": "two_word", "operation": "div", "implementation": "int128", "microseconds": 592011}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 642713}, {"group": "two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 560147}, {"group": "two_word", "operation": "mod", "implementation": "__int128", "microseconds": 559528}, - {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 598346}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 672336}, + {"group": "two_word", "operation": "mod", "implementation": "int128", "microseconds": 598346}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 672336}, {"group": "two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 552913}, {"group": "two_word", "operation": "div64", "implementation": "__int128", "microseconds": 1264553}, - {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 1531117}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 1532307}, + {"group": "two_word", "operation": "div64", "implementation": "int128", "microseconds": 1531117}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128", "microseconds": 1532307}, {"group": "two_word", "operation": "div64", "implementation": "absl::int128", "microseconds": 1262547}, {"group": "two_word", "operation": "div32", "implementation": "__int128", "microseconds": 1331800}, - {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 1176858}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 1326673}, + {"group": "two_word", "operation": "div32", "implementation": "int128", "microseconds": 1176858}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128", "microseconds": 1326673}, {"group": "two_word", "operation": "div32", "implementation": "absl::int128", "microseconds": 1331749}, {"group": "one_word", "operation": "eq", "implementation": "__int128", "microseconds": 94381}, {"group": "one_word", "operation": "ne", "implementation": "__int128", "microseconds": 99818}, @@ -74,20 +74,20 @@ {"group": "one_word", "operation": "gt", "implementation": "__int128", "microseconds": 267378}, {"group": "one_word", "operation": "ge", "implementation": "__int128", "microseconds": 265864}, {"group": "one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 1270872}, - {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 93362}, - {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 93447}, - {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 92168}, - {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 93627}, - {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 102926}, - {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 97595}, - {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 573270}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 328261}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 334685}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 294791}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 293743}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 306734}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 292688}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1851027}, + {"group": "one_word", "operation": "eq", "implementation": "int128", "microseconds": 93362}, + {"group": "one_word", "operation": "ne", "implementation": "int128", "microseconds": 93447}, + {"group": "one_word", "operation": "lt", "implementation": "int128", "microseconds": 92168}, + {"group": "one_word", "operation": "le", "implementation": "int128", "microseconds": 93627}, + {"group": "one_word", "operation": "gt", "implementation": "int128", "microseconds": 102926}, + {"group": "one_word", "operation": "ge", "implementation": "int128", "microseconds": 97595}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 573270}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 328261}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 334685}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 294791}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 293743}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 306734}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 292688}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1851027}, {"group": "one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 99726}, {"group": "one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 96601}, {"group": "one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 308026}, @@ -96,24 +96,24 @@ {"group": "one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 265397}, {"group": "one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 1304508}, {"group": "one_word", "operation": "add", "implementation": "__int128", "microseconds": 85737}, - {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 85352}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 378084}, + {"group": "one_word", "operation": "add", "implementation": "int128", "microseconds": 85352}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 378084}, {"group": "one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 88824}, {"group": "one_word", "operation": "sub", "implementation": "__int128", "microseconds": 87850}, - {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 85238}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 442516}, + {"group": "one_word", "operation": "sub", "implementation": "int128", "microseconds": 85238}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 442516}, {"group": "one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 91059}, {"group": "one_word", "operation": "mul", "implementation": "__int128", "microseconds": 85492}, - {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 86360}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 194243}, + {"group": "one_word", "operation": "mul", "implementation": "int128", "microseconds": 86360}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 194243}, {"group": "one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 87837}, {"group": "one_word", "operation": "div", "implementation": "__int128", "microseconds": 562225}, - {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 330268}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 735908}, + {"group": "one_word", "operation": "div", "implementation": "int128", "microseconds": 330268}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 735908}, {"group": "one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 558200}, {"group": "one_word", "operation": "mod", "implementation": "__int128", "microseconds": 548690}, - {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 297050}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 726252}, + {"group": "one_word", "operation": "mod", "implementation": "int128", "microseconds": 297050}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 726252}, {"group": "one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 542242}, {"group": "two_one_word", "operation": "eq", "implementation": "__int128", "microseconds": 94231}, {"group": "two_one_word", "operation": "ne", "implementation": "__int128", "microseconds": 91661}, @@ -122,20 +122,20 @@ {"group": "two_one_word", "operation": "gt", "implementation": "__int128", "microseconds": 96112}, {"group": "two_one_word", "operation": "ge", "implementation": "__int128", "microseconds": 89252}, {"group": "two_one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 551299}, - {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 91087}, - {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 91450}, - {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 90824}, - {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 90781}, - {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 93442}, - {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 90822}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 548513}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 180933}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 175641}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 168580}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 167965}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 166762}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 168868}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1028861}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128", "microseconds": 91087}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128", "microseconds": 91450}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128", "microseconds": 90824}, + {"group": "two_one_word", "operation": "le", "implementation": "int128", "microseconds": 90781}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128", "microseconds": 93442}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128", "microseconds": 90822}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 548513}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 180933}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 175641}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 168580}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 167965}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 166762}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 168868}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1028861}, {"group": "two_one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 90112}, {"group": "two_one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 91515}, {"group": "two_one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 91970}, @@ -144,24 +144,24 @@ {"group": "two_one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 90578}, {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 549481}, {"group": "two_one_word", "operation": "add", "implementation": "__int128", "microseconds": 84996}, - {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 82149}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 170077}, + {"group": "two_one_word", "operation": "add", "implementation": "int128", "microseconds": 82149}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 170077}, {"group": "two_one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 83718}, {"group": "two_one_word", "operation": "sub", "implementation": "__int128", "microseconds": 82952}, - {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 81958}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 170687}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128", "microseconds": 81958}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 170687}, {"group": "two_one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 85156}, {"group": "two_one_word", "operation": "mul", "implementation": "__int128", "microseconds": 83962}, - {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 84762}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 192107}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128", "microseconds": 84762}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 192107}, {"group": "two_one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 86570}, {"group": "two_one_word", "operation": "div", "implementation": "__int128", "microseconds": 747051}, - {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 819306}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 907036}, + {"group": "two_one_word", "operation": "div", "implementation": "int128", "microseconds": 819306}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 907036}, {"group": "two_one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 745494}, {"group": "two_one_word", "operation": "mod", "implementation": "__int128", "microseconds": 755976}, - {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 814190}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 877777}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128", "microseconds": 814190}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 877777}, {"group": "two_one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 755490}, {"group": "one_two_word", "operation": "eq", "implementation": "__int128", "microseconds": 91959}, {"group": "one_two_word", "operation": "ne", "implementation": "__int128", "microseconds": 93179}, @@ -170,20 +170,20 @@ {"group": "one_two_word", "operation": "gt", "implementation": "__int128", "microseconds": 94037}, {"group": "one_two_word", "operation": "ge", "implementation": "__int128", "microseconds": 91801}, {"group": "one_two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 552142}, - {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 91478}, - {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 90697}, - {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 89118}, - {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 88834}, - {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 90209}, - {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 86919}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 537374}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 185126}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 171807}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 162455}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 162560}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 164047}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 163226}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1009355}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128", "microseconds": 91478}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128", "microseconds": 90697}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128", "microseconds": 89118}, + {"group": "one_two_word", "operation": "le", "implementation": "int128", "microseconds": 88834}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128", "microseconds": 90209}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128", "microseconds": 86919}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 537374}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 185126}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 171807}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 162455}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 162560}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 164047}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 163226}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1009355}, {"group": "one_two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 93054}, {"group": "one_two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 92550}, {"group": "one_two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 89629}, @@ -192,24 +192,24 @@ {"group": "one_two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 92219}, {"group": "one_two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 547388}, {"group": "one_two_word", "operation": "add", "implementation": "__int128", "microseconds": 84567}, - {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 83491}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 172641}, + {"group": "one_two_word", "operation": "add", "implementation": "int128", "microseconds": 83491}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 172641}, {"group": "one_two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 85516}, {"group": "one_two_word", "operation": "sub", "implementation": "__int128", "microseconds": 84074}, - {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 82595}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 175309}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128", "microseconds": 82595}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 175309}, {"group": "one_two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 84927}, {"group": "one_two_word", "operation": "mul", "implementation": "__int128", "microseconds": 82821}, - {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 83126}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 190585}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128", "microseconds": 83126}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 190585}, {"group": "one_two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 85741}, {"group": "one_two_word", "operation": "div", "implementation": "__int128", "microseconds": 747268}, - {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 818962}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 908127}, + {"group": "one_two_word", "operation": "div", "implementation": "int128", "microseconds": 818962}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 908127}, {"group": "one_two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 744227}, {"group": "one_two_word", "operation": "mod", "implementation": "__int128", "microseconds": 755923}, - {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 809486}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 880374}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128", "microseconds": 809486}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 880374}, {"group": "one_two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 756424}, {"group": "random_width", "operation": "eq", "implementation": "__int128", "microseconds": 92793}, {"group": "random_width", "operation": "ne", "implementation": "__int128", "microseconds": 92767}, @@ -218,20 +218,20 @@ {"group": "random_width", "operation": "gt", "implementation": "__int128", "microseconds": 341953}, {"group": "random_width", "operation": "ge", "implementation": "__int128", "microseconds": 346719}, {"group": "random_width", "operation": "comparisons", "implementation": "__int128", "microseconds": 1548448}, - {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 93743}, - {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 93068}, - {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 189078}, - {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 191149}, - {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 223589}, - {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 187857}, - {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 978632}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 427108}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 420579}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 380888}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 377691}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 373834}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 378206}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2358441}, + {"group": "random_width", "operation": "eq", "implementation": "int128", "microseconds": 93743}, + {"group": "random_width", "operation": "ne", "implementation": "int128", "microseconds": 93068}, + {"group": "random_width", "operation": "lt", "implementation": "int128", "microseconds": 189078}, + {"group": "random_width", "operation": "le", "implementation": "int128", "microseconds": 191149}, + {"group": "random_width", "operation": "gt", "implementation": "int128", "microseconds": 223589}, + {"group": "random_width", "operation": "ge", "implementation": "int128", "microseconds": 187857}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128", "microseconds": 978632}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 427108}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 420579}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 380888}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 377691}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 373834}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 378206}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 2358441}, {"group": "random_width", "operation": "eq", "implementation": "absl::int128", "microseconds": 101443}, {"group": "random_width", "operation": "ne", "implementation": "absl::int128", "microseconds": 98404}, {"group": "random_width", "operation": "lt", "implementation": "absl::int128", "microseconds": 351608}, @@ -240,32 +240,32 @@ {"group": "random_width", "operation": "ge", "implementation": "absl::int128", "microseconds": 347625}, {"group": "random_width", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 1576854}, {"group": "random_width", "operation": "add", "implementation": "__int128", "microseconds": 86459}, - {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 87101}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 221898}, + {"group": "random_width", "operation": "add", "implementation": "int128", "microseconds": 87101}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 221898}, {"group": "random_width", "operation": "add", "implementation": "absl::int128", "microseconds": 88399}, {"group": "random_width", "operation": "sub", "implementation": "__int128", "microseconds": 87087}, - {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 85946}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 455419}, + {"group": "random_width", "operation": "sub", "implementation": "int128", "microseconds": 85946}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 455419}, {"group": "random_width", "operation": "sub", "implementation": "absl::int128", "microseconds": 86913}, {"group": "random_width", "operation": "mul", "implementation": "__int128", "microseconds": 84919}, - {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 84091}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 187422}, + {"group": "random_width", "operation": "mul", "implementation": "int128", "microseconds": 84091}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 187422}, {"group": "random_width", "operation": "mul", "implementation": "absl::int128", "microseconds": 83956}, {"group": "random_width", "operation": "div", "implementation": "__int128", "microseconds": 814967}, - {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 767734}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 966484}, + {"group": "random_width", "operation": "div", "implementation": "int128", "microseconds": 767734}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 966484}, {"group": "random_width", "operation": "div", "implementation": "absl::int128", "microseconds": 812755}, {"group": "random_width", "operation": "mod", "implementation": "__int128", "microseconds": 839380}, - {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 767831}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 953283}, + {"group": "random_width", "operation": "mod", "implementation": "int128", "microseconds": 767831}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 953283}, {"group": "random_width", "operation": "mod", "implementation": "absl::int128", "microseconds": 841903}, {"group": "random_width", "operation": "shl", "implementation": "__int128", "microseconds": 96550}, - {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 96402}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 196535}, + {"group": "random_width", "operation": "shl", "implementation": "int128", "microseconds": 96402}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128", "microseconds": 196535}, {"group": "random_width", "operation": "shl", "implementation": "absl::int128", "microseconds": 94459}, {"group": "random_width", "operation": "shr", "implementation": "__int128", "microseconds": 123826}, - {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 125975}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 179188}, + {"group": "random_width", "operation": "shr", "implementation": "int128", "microseconds": 125975}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128", "microseconds": 179188}, {"group": "random_width", "operation": "shr", "implementation": "absl::int128", "microseconds": 120637} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-arm64/u128.json b/doc/modules/ROOT/data/benchmarks-linux-arm64/u128.json index fe2d1606..807c32f9 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-arm64/u128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-arm64/u128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "uint128_t", + "type": "uint128", "sign": "u128", "os": "linux", "arch": "ARM64", @@ -9,7 +9,7 @@ "elements": 20000000, "repetitions": 5, "baseline": "unsigned __int128", - "implementations": ["unsigned __int128", "uint128_t", "boost::mp::uint128_t", "absl::uint128"], + "implementations": ["unsigned __int128", "uint128", "boost::mp::uint128", "absl::uint128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 96801}, {"group": "two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 96082}, @@ -18,20 +18,20 @@ {"group": "two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 244191}, {"group": "two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 241682}, {"group": "two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 1161574}, - {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 97805}, - {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 95817}, - {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 94158}, - {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 92586}, - {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 92867}, - {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 94307}, - {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 567670}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 267582}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 273524}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 244110}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 243705}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 243242}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 240731}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1513008}, + {"group": "two_word", "operation": "eq", "implementation": "uint128", "microseconds": 97805}, + {"group": "two_word", "operation": "ne", "implementation": "uint128", "microseconds": 95817}, + {"group": "two_word", "operation": "lt", "implementation": "uint128", "microseconds": 94158}, + {"group": "two_word", "operation": "le", "implementation": "uint128", "microseconds": 92586}, + {"group": "two_word", "operation": "gt", "implementation": "uint128", "microseconds": 92867}, + {"group": "two_word", "operation": "ge", "implementation": "uint128", "microseconds": 94307}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 567670}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 267582}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 273524}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 244110}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 243705}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 243242}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 240731}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1513008}, {"group": "two_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 99060}, {"group": "two_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 95700}, {"group": "two_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 244708}, @@ -40,32 +40,32 @@ {"group": "two_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 240854}, {"group": "two_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1172962}, {"group": "two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 86249}, - {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 88105}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 85598}, + {"group": "two_word", "operation": "add", "implementation": "uint128", "microseconds": 88105}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 85598}, {"group": "two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 86037}, {"group": "two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 86948}, - {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 87315}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 86824}, + {"group": "two_word", "operation": "sub", "implementation": "uint128", "microseconds": 87315}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 86824}, {"group": "two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 87684}, {"group": "two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86032}, - {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 85119}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 83537}, + {"group": "two_word", "operation": "mul", "implementation": "uint128", "microseconds": 85119}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 83537}, {"group": "two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 86042}, {"group": "two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 493501}, - {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 541863}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 521749}, + {"group": "two_word", "operation": "div", "implementation": "uint128", "microseconds": 541863}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 521749}, {"group": "two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 487186}, {"group": "two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 525969}, - {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 562398}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 562015}, + {"group": "two_word", "operation": "mod", "implementation": "uint128", "microseconds": 562398}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 562015}, {"group": "two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 515464}, {"group": "two_word", "operation": "div64", "implementation": "unsigned __int128", "microseconds": 1355397}, - {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 1574228}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 1354652}, + {"group": "two_word", "operation": "div64", "implementation": "uint128", "microseconds": 1574228}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128", "microseconds": 1354652}, {"group": "two_word", "operation": "div64", "implementation": "absl::uint128", "microseconds": 1364685}, {"group": "two_word", "operation": "div32", "implementation": "unsigned __int128", "microseconds": 1321763}, - {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 1233252}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 1321807}, + {"group": "two_word", "operation": "div32", "implementation": "uint128", "microseconds": 1233252}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128", "microseconds": 1321807}, {"group": "two_word", "operation": "div32", "implementation": "absl::uint128", "microseconds": 1321967}, {"group": "one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 92051}, {"group": "one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 93937}, @@ -74,20 +74,20 @@ {"group": "one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 262234}, {"group": "one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 277312}, {"group": "one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 1243734}, - {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 95163}, - {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 93344}, - {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 95720}, - {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 93386}, - {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 95602}, - {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 93001}, - {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 566356}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 272521}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 278180}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 267528}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 270616}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 263357}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 273757}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1626063}, + {"group": "one_word", "operation": "eq", "implementation": "uint128", "microseconds": 95163}, + {"group": "one_word", "operation": "ne", "implementation": "uint128", "microseconds": 93344}, + {"group": "one_word", "operation": "lt", "implementation": "uint128", "microseconds": 95720}, + {"group": "one_word", "operation": "le", "implementation": "uint128", "microseconds": 93386}, + {"group": "one_word", "operation": "gt", "implementation": "uint128", "microseconds": 95602}, + {"group": "one_word", "operation": "ge", "implementation": "uint128", "microseconds": 93001}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 566356}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 272521}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 278180}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 267528}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 270616}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 263357}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 273757}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1626063}, {"group": "one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 97822}, {"group": "one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 99060}, {"group": "one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 251911}, @@ -96,24 +96,24 @@ {"group": "one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 267916}, {"group": "one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1237959}, {"group": "one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 88077}, - {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 85541}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 85793}, + {"group": "one_word", "operation": "add", "implementation": "uint128", "microseconds": 85541}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 85793}, {"group": "one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 86958}, {"group": "one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 86856}, - {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 89014}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 89227}, + {"group": "one_word", "operation": "sub", "implementation": "uint128", "microseconds": 89014}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 89227}, {"group": "one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 88207}, {"group": "one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 85139}, - {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 87745}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 89291}, + {"group": "one_word", "operation": "mul", "implementation": "uint128", "microseconds": 87745}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 89291}, {"group": "one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 89372}, {"group": "one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 533785}, - {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 281659}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 564345}, + {"group": "one_word", "operation": "div", "implementation": "uint128", "microseconds": 281659}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 564345}, {"group": "one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 521453}, {"group": "one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 557004}, - {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 273201}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 571544}, + {"group": "one_word", "operation": "mod", "implementation": "uint128", "microseconds": 273201}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 571544}, {"group": "two_one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 96163}, {"group": "two_one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 97740}, {"group": "two_one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 99260}, @@ -121,20 +121,20 @@ {"group": "two_one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 92743}, {"group": "two_one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 96355}, {"group": "two_one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 576158}, - {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 96780}, - {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 93933}, - {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 93654}, - {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 95099}, - {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 94698}, - {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 95868}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 570146}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 108534}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 109212}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 96563}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 91327}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 90544}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 92831}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 589126}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128", "microseconds": 96780}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128", "microseconds": 93933}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128", "microseconds": 93654}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128", "microseconds": 95099}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128", "microseconds": 94698}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128", "microseconds": 95868}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 570146}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 108534}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 109212}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 96563}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 91327}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 90544}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 92831}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 589126}, {"group": "two_one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 94204}, {"group": "two_one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 94709}, {"group": "two_one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 95971}, @@ -143,24 +143,24 @@ {"group": "two_one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 94882}, {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 571079}, {"group": "two_one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 89155}, - {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 88529}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 87142}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128", "microseconds": 88529}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 87142}, {"group": "two_one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 87942}, {"group": "two_one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 88961}, - {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 88498}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 89095}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128", "microseconds": 88498}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 89095}, {"group": "two_one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 89704}, {"group": "two_one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 89008}, - {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 92265}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 90371}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128", "microseconds": 92265}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 90371}, {"group": "two_one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 90639}, {"group": "two_one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 750350}, - {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 821321}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 769254}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128", "microseconds": 821321}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 769254}, {"group": "two_one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 743601}, {"group": "two_one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 808167}, - {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 826311}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 818923}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128", "microseconds": 826311}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 818923}, {"group": "two_one_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 803169}, {"group": "one_two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 93773}, {"group": "one_two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 94523}, @@ -169,39 +169,39 @@ {"group": "one_two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 91070}, {"group": "one_two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 95221}, {"group": "one_two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 564016}, - {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 102034}, - {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 97014}, - {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 97099}, - {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 95353}, - {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 93043}, - {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 93361}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 578018}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 107889}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 113665}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 96942}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 90981}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 89575}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 91579}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 590768}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128", "microseconds": 102034}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128", "microseconds": 97014}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128", "microseconds": 97099}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128", "microseconds": 95353}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128", "microseconds": 93043}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128", "microseconds": 93361}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 578018}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 107889}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 113665}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 96942}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 90981}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 89575}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 91579}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 590768}, {"group": "one_two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 89012}, - {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 86165}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 88076}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128", "microseconds": 86165}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 88076}, {"group": "one_two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 87448}, {"group": "one_two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 87915}, - {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 87620}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 87610}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128", "microseconds": 87620}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 87610}, {"group": "one_two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 86748}, {"group": "one_two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 84979}, - {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 85988}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 84912}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128", "microseconds": 85988}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 84912}, {"group": "one_two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 87784}, {"group": "one_two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 747812}, - {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 821471}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 770100}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128", "microseconds": 821471}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 770100}, {"group": "one_two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 742130}, {"group": "one_two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 806102}, - {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 827260}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 819027}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128", "microseconds": 827260}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 819027}, {"group": "one_two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 802308}, {"group": "random_width", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 95922}, {"group": "random_width", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 95308}, @@ -210,20 +210,20 @@ {"group": "random_width", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 338503}, {"group": "random_width", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 343466}, {"group": "random_width", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 1551148}, - {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 97318}, - {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 95404}, - {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 190356}, - {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 189786}, - {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 189707}, - {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 191920}, - {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 954612}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 363832}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 357504}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 342125}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 342123}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 339635}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 345500}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 2090864}, + {"group": "random_width", "operation": "eq", "implementation": "uint128", "microseconds": 97318}, + {"group": "random_width", "operation": "ne", "implementation": "uint128", "microseconds": 95404}, + {"group": "random_width", "operation": "lt", "implementation": "uint128", "microseconds": 190356}, + {"group": "random_width", "operation": "le", "implementation": "uint128", "microseconds": 189786}, + {"group": "random_width", "operation": "gt", "implementation": "uint128", "microseconds": 189707}, + {"group": "random_width", "operation": "ge", "implementation": "uint128", "microseconds": 191920}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128", "microseconds": 954612}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 363832}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 357504}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 342125}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 342123}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 339635}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 345500}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 2090864}, {"group": "random_width", "operation": "eq", "implementation": "absl::uint128", "microseconds": 94406}, {"group": "random_width", "operation": "ne", "implementation": "absl::uint128", "microseconds": 94266}, {"group": "random_width", "operation": "lt", "implementation": "absl::uint128", "microseconds": 342078}, @@ -232,44 +232,44 @@ {"group": "random_width", "operation": "ge", "implementation": "absl::uint128", "microseconds": 346528}, {"group": "random_width", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1559081}, {"group": "random_width", "operation": "add", "implementation": "unsigned __int128", "microseconds": 88531}, - {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 87204}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 87303}, + {"group": "random_width", "operation": "add", "implementation": "uint128", "microseconds": 87204}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 87303}, {"group": "random_width", "operation": "add", "implementation": "absl::uint128", "microseconds": 87544}, {"group": "random_width", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 89194}, - {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 90112}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 90873}, + {"group": "random_width", "operation": "sub", "implementation": "uint128", "microseconds": 90112}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 90873}, {"group": "random_width", "operation": "sub", "implementation": "absl::uint128", "microseconds": 87986}, {"group": "random_width", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86854}, - {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 87632}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 88376}, + {"group": "random_width", "operation": "mul", "implementation": "uint128", "microseconds": 87632}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 88376}, {"group": "random_width", "operation": "mul", "implementation": "absl::uint128", "microseconds": 91189}, {"group": "random_width", "operation": "div", "implementation": "unsigned __int128", "microseconds": 732287}, - {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 652951}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 766334}, + {"group": "random_width", "operation": "div", "implementation": "uint128", "microseconds": 652951}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 766334}, {"group": "random_width", "operation": "div", "implementation": "absl::uint128", "microseconds": 722710}, {"group": "random_width", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 768287}, - {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 662783}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 801508}, + {"group": "random_width", "operation": "mod", "implementation": "uint128", "microseconds": 662783}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 801508}, {"group": "random_width", "operation": "mod", "implementation": "absl::uint128", "microseconds": 758006}, {"group": "random_width", "operation": "shl", "implementation": "unsigned __int128", "microseconds": 100133}, - {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 96703}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 102252}, + {"group": "random_width", "operation": "shl", "implementation": "uint128", "microseconds": 96703}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128", "microseconds": 102252}, {"group": "random_width", "operation": "shl", "implementation": "absl::uint128", "microseconds": 101008}, {"group": "random_width", "operation": "shr", "implementation": "unsigned __int128", "microseconds": 121744}, - {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 122306}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 137232}, + {"group": "random_width", "operation": "shr", "implementation": "uint128", "microseconds": 122306}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128", "microseconds": 137232}, {"group": "random_width", "operation": "shr", "implementation": "absl::uint128", "microseconds": 129332}, {"group": "random_width", "operation": "and", "implementation": "unsigned __int128", "microseconds": 90304}, - {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 91037}, - {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 85571}, + {"group": "random_width", "operation": "and", "implementation": "uint128", "microseconds": 91037}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128", "microseconds": 85571}, {"group": "random_width", "operation": "and", "implementation": "absl::uint128", "microseconds": 85928}, {"group": "random_width", "operation": "or", "implementation": "unsigned __int128", "microseconds": 85344}, - {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 89197}, - {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 86644}, + {"group": "random_width", "operation": "or", "implementation": "uint128", "microseconds": 89197}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128", "microseconds": 86644}, {"group": "random_width", "operation": "or", "implementation": "absl::uint128", "microseconds": 88350}, {"group": "random_width", "operation": "xor", "implementation": "unsigned __int128", "microseconds": 92293}, - {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 96052}, - {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 90375}, + {"group": "random_width", "operation": "xor", "implementation": "uint128", "microseconds": 96052}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128", "microseconds": 90375}, {"group": "random_width", "operation": "xor", "implementation": "absl::uint128", "microseconds": 95313} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-ppc64le/i128.json b/doc/modules/ROOT/data/benchmarks-linux-ppc64le/i128.json index a4e3c65f..160561d8 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-ppc64le/i128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-ppc64le/i128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "int128_t", + "type": "int128", "sign": "i128", "os": "linux", "arch": "ppc64le", @@ -9,7 +9,7 @@ "elements": 2000000, "repetitions": 5, "baseline": "__int128", - "implementations": ["__int128", "int128_t", "boost::mp::int128_t"], + "implementations": ["__int128", "int128", "boost::mp::int128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "__int128", "microseconds": 26864}, {"group": "two_word", "operation": "ne", "implementation": "__int128", "microseconds": 27009}, @@ -18,41 +18,41 @@ {"group": "two_word", "operation": "gt", "implementation": "__int128", "microseconds": 100523}, {"group": "two_word", "operation": "ge", "implementation": "__int128", "microseconds": 102917}, {"group": "two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 459794}, - {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 77762}, - {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 39509}, - {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 67544}, - {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 64008}, - {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 63831}, - {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 67331}, - {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 381032}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 364361}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 160359}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 100099}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 105102}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 158090}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 99608}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 989542}, + {"group": "two_word", "operation": "eq", "implementation": "int128", "microseconds": 77762}, + {"group": "two_word", "operation": "ne", "implementation": "int128", "microseconds": 39509}, + {"group": "two_word", "operation": "lt", "implementation": "int128", "microseconds": 67544}, + {"group": "two_word", "operation": "le", "implementation": "int128", "microseconds": 64008}, + {"group": "two_word", "operation": "gt", "implementation": "int128", "microseconds": 63831}, + {"group": "two_word", "operation": "ge", "implementation": "int128", "microseconds": 67331}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 381032}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 364361}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 160359}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 100099}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 105102}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 158090}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 99608}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 989542}, {"group": "two_word", "operation": "add", "implementation": "__int128", "microseconds": 25189}, - {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 16398}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 141533}, + {"group": "two_word", "operation": "add", "implementation": "int128", "microseconds": 16398}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 141533}, {"group": "two_word", "operation": "sub", "implementation": "__int128", "microseconds": 105040}, - {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 14722}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 213498}, + {"group": "two_word", "operation": "sub", "implementation": "int128", "microseconds": 14722}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 213498}, {"group": "two_word", "operation": "mul", "implementation": "__int128", "microseconds": 16428}, - {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 16394}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 123948}, + {"group": "two_word", "operation": "mul", "implementation": "int128", "microseconds": 16394}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 123948}, {"group": "two_word", "operation": "div", "implementation": "__int128", "microseconds": 553701}, - {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 773416}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 626008}, + {"group": "two_word", "operation": "div", "implementation": "int128", "microseconds": 773416}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 626008}, {"group": "two_word", "operation": "mod", "implementation": "__int128", "microseconds": 571472}, - {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1002259}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 606271}, + {"group": "two_word", "operation": "mod", "implementation": "int128", "microseconds": 1002259}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 606271}, {"group": "two_word", "operation": "div64", "implementation": "__int128", "microseconds": 799859}, - {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 464233}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 1112953}, + {"group": "two_word", "operation": "div64", "implementation": "int128", "microseconds": 464233}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128", "microseconds": 1112953}, {"group": "two_word", "operation": "div32", "implementation": "__int128", "microseconds": 711942}, - {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 306547}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 696290}, + {"group": "two_word", "operation": "div32", "implementation": "int128", "microseconds": 306547}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128", "microseconds": 696290}, {"group": "one_word", "operation": "eq", "implementation": "__int128", "microseconds": 26654}, {"group": "one_word", "operation": "ne", "implementation": "__int128", "microseconds": 26854}, {"group": "one_word", "operation": "lt", "implementation": "__int128", "microseconds": 117819}, @@ -60,35 +60,35 @@ {"group": "one_word", "operation": "gt", "implementation": "__int128", "microseconds": 90342}, {"group": "one_word", "operation": "ge", "implementation": "__int128", "microseconds": 128999}, {"group": "one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 483970}, - {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 206909}, - {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 46406}, - {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 106080}, - {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 68942}, - {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 105957}, - {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 106091}, - {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 640793}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 472771}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 189717}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 168966}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 180580}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 205538}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 167614}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1385641}, + {"group": "one_word", "operation": "eq", "implementation": "int128", "microseconds": 206909}, + {"group": "one_word", "operation": "ne", "implementation": "int128", "microseconds": 46406}, + {"group": "one_word", "operation": "lt", "implementation": "int128", "microseconds": 106080}, + {"group": "one_word", "operation": "le", "implementation": "int128", "microseconds": 68942}, + {"group": "one_word", "operation": "gt", "implementation": "int128", "microseconds": 105957}, + {"group": "one_word", "operation": "ge", "implementation": "int128", "microseconds": 106091}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 640793}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 472771}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 189717}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 168966}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 180580}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 205538}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 167614}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1385641}, {"group": "one_word", "operation": "add", "implementation": "__int128", "microseconds": 25007}, - {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 16260}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 146183}, + {"group": "one_word", "operation": "add", "implementation": "int128", "microseconds": 16260}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 146183}, {"group": "one_word", "operation": "sub", "implementation": "__int128", "microseconds": 104772}, - {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 14608}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 293091}, + {"group": "one_word", "operation": "sub", "implementation": "int128", "microseconds": 14608}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 293091}, {"group": "one_word", "operation": "mul", "implementation": "__int128", "microseconds": 16165}, - {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 16316}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 88763}, + {"group": "one_word", "operation": "mul", "implementation": "int128", "microseconds": 16316}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 88763}, {"group": "one_word", "operation": "div", "implementation": "__int128", "microseconds": 565334}, - {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 338201}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 604060}, + {"group": "one_word", "operation": "div", "implementation": "int128", "microseconds": 338201}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 604060}, {"group": "one_word", "operation": "mod", "implementation": "__int128", "microseconds": 657120}, - {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 481117}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 688930}, + {"group": "one_word", "operation": "mod", "implementation": "int128", "microseconds": 481117}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 688930}, {"group": "two_one_word", "operation": "eq", "implementation": "__int128", "microseconds": 26765}, {"group": "two_one_word", "operation": "ne", "implementation": "__int128", "microseconds": 26738}, {"group": "two_one_word", "operation": "lt", "implementation": "__int128", "microseconds": 42601}, @@ -96,35 +96,35 @@ {"group": "two_one_word", "operation": "gt", "implementation": "__int128", "microseconds": 42781}, {"group": "two_one_word", "operation": "ge", "implementation": "__int128", "microseconds": 40903}, {"group": "two_one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 221124}, - {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 32010}, - {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 39238}, - {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 67236}, - {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 63782}, - {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 63808}, - {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 67391}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 333846}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 326994}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 103070}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 82459}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 71271}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 74974}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 83561}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 742841}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128", "microseconds": 32010}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128", "microseconds": 39238}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128", "microseconds": 67236}, + {"group": "two_one_word", "operation": "le", "implementation": "int128", "microseconds": 63782}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128", "microseconds": 63808}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128", "microseconds": 67391}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 333846}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 326994}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 103070}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 82459}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 71271}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 74974}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 83561}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 742841}, {"group": "two_one_word", "operation": "add", "implementation": "__int128", "microseconds": 24957}, - {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 16254}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 110034}, + {"group": "two_one_word", "operation": "add", "implementation": "int128", "microseconds": 16254}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 110034}, {"group": "two_one_word", "operation": "sub", "implementation": "__int128", "microseconds": 104878}, - {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 14652}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 117085}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128", "microseconds": 14652}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 117085}, {"group": "two_one_word", "operation": "mul", "implementation": "__int128", "microseconds": 16214}, - {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 16287}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 88624}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128", "microseconds": 16287}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 88624}, {"group": "two_one_word", "operation": "div", "implementation": "__int128", "microseconds": 577321}, - {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 502335}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 599187}, + {"group": "two_one_word", "operation": "div", "implementation": "int128", "microseconds": 502335}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 599187}, {"group": "two_one_word", "operation": "mod", "implementation": "__int128", "microseconds": 591000}, - {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 676605}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 625565}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128", "microseconds": 676605}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 625565}, {"group": "one_two_word", "operation": "eq", "implementation": "__int128", "microseconds": 26767}, {"group": "one_two_word", "operation": "ne", "implementation": "__int128", "microseconds": 26727}, {"group": "one_two_word", "operation": "lt", "implementation": "__int128", "microseconds": 42636}, @@ -132,35 +132,35 @@ {"group": "one_two_word", "operation": "gt", "implementation": "__int128", "microseconds": 42691}, {"group": "one_two_word", "operation": "ge", "implementation": "__int128", "microseconds": 40987}, {"group": "one_two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 221180}, - {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 32082}, - {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 39277}, - {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 67327}, - {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 63742}, - {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 63772}, - {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 67300}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 333966}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 326911}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 102816}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 81734}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 71290}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 74854}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 82631}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 740904}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128", "microseconds": 32082}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128", "microseconds": 39277}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128", "microseconds": 67327}, + {"group": "one_two_word", "operation": "le", "implementation": "int128", "microseconds": 63742}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128", "microseconds": 63772}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128", "microseconds": 67300}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 333966}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 326911}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 102816}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 81734}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 71290}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 74854}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 82631}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 740904}, {"group": "one_two_word", "operation": "add", "implementation": "__int128", "microseconds": 24994}, - {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 16223}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 109873}, + {"group": "one_two_word", "operation": "add", "implementation": "int128", "microseconds": 16223}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 109873}, {"group": "one_two_word", "operation": "sub", "implementation": "__int128", "microseconds": 104652}, - {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 14501}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 117271}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128", "microseconds": 14501}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 117271}, {"group": "one_two_word", "operation": "mul", "implementation": "__int128", "microseconds": 16208}, - {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 16301}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 88677}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128", "microseconds": 16301}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 88677}, {"group": "one_two_word", "operation": "div", "implementation": "__int128", "microseconds": 577583}, - {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 456790}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 598170}, + {"group": "one_two_word", "operation": "div", "implementation": "int128", "microseconds": 456790}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 598170}, {"group": "one_two_word", "operation": "mod", "implementation": "__int128", "microseconds": 587225}, - {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 593808}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 589766}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128", "microseconds": 593808}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 589766}, {"group": "random_width", "operation": "eq", "implementation": "__int128", "microseconds": 26675}, {"group": "random_width", "operation": "ne", "implementation": "__int128", "microseconds": 26752}, {"group": "random_width", "operation": "lt", "implementation": "__int128", "microseconds": 96469}, @@ -168,40 +168,40 @@ {"group": "random_width", "operation": "gt", "implementation": "__int128", "microseconds": 91548}, {"group": "random_width", "operation": "ge", "implementation": "__int128", "microseconds": 95090}, {"group": "random_width", "operation": "comparisons", "implementation": "__int128", "microseconds": 428645}, - {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 97740}, - {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 60478}, - {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 76063}, - {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 75804}, - {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 75196}, - {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 76806}, - {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 462487}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 388496}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 137411}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 122871}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 124370}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 124399}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 123025}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1021098}, + {"group": "random_width", "operation": "eq", "implementation": "int128", "microseconds": 97740}, + {"group": "random_width", "operation": "ne", "implementation": "int128", "microseconds": 60478}, + {"group": "random_width", "operation": "lt", "implementation": "int128", "microseconds": 76063}, + {"group": "random_width", "operation": "le", "implementation": "int128", "microseconds": 75804}, + {"group": "random_width", "operation": "gt", "implementation": "int128", "microseconds": 75196}, + {"group": "random_width", "operation": "ge", "implementation": "int128", "microseconds": 76806}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128", "microseconds": 462487}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 388496}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 137411}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 122871}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 124370}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 124399}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 123025}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1021098}, {"group": "random_width", "operation": "add", "implementation": "__int128", "microseconds": 24939}, - {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 16225}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 118021}, + {"group": "random_width", "operation": "add", "implementation": "int128", "microseconds": 16225}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 118021}, {"group": "random_width", "operation": "sub", "implementation": "__int128", "microseconds": 104630}, - {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 14546}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 172685}, + {"group": "random_width", "operation": "sub", "implementation": "int128", "microseconds": 14546}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 172685}, {"group": "random_width", "operation": "mul", "implementation": "__int128", "microseconds": 16136}, - {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 16268}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 88742}, + {"group": "random_width", "operation": "mul", "implementation": "int128", "microseconds": 16268}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 88742}, {"group": "random_width", "operation": "div", "implementation": "__int128", "microseconds": 614489}, - {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 509815}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 629501}, + {"group": "random_width", "operation": "div", "implementation": "int128", "microseconds": 509815}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 629501}, {"group": "random_width", "operation": "mod", "implementation": "__int128", "microseconds": 627865}, - {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 686382}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 642930}, + {"group": "random_width", "operation": "mod", "implementation": "int128", "microseconds": 686382}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 642930}, {"group": "random_width", "operation": "shl", "implementation": "__int128", "microseconds": 82607}, - {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 39393}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 287824}, + {"group": "random_width", "operation": "shl", "implementation": "int128", "microseconds": 39393}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128", "microseconds": 287824}, {"group": "random_width", "operation": "shr", "implementation": "__int128", "microseconds": 132436}, - {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 128904}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 186647} + {"group": "random_width", "operation": "shr", "implementation": "int128", "microseconds": 128904}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128", "microseconds": 186647} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-ppc64le/u128.json b/doc/modules/ROOT/data/benchmarks-linux-ppc64le/u128.json index f013a1e2..ef37ffd0 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-ppc64le/u128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-ppc64le/u128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "uint128_t", + "type": "uint128", "sign": "u128", "os": "linux", "arch": "ppc64le", @@ -9,7 +9,7 @@ "elements": 2000000, "repetitions": 5, "baseline": "unsigned __int128", - "implementations": ["unsigned __int128", "uint128_t", "boost::mp::uint128_t"], + "implementations": ["unsigned __int128", "uint128", "boost::mp::uint128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 26830}, {"group": "two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 26989}, @@ -18,41 +18,41 @@ {"group": "two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 67944}, {"group": "two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 71812}, {"group": "two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 357540}, - {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 77816}, - {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 39310}, - {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 53887}, - {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 56997}, - {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 53426}, - {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 53497}, - {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 336050}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 169130}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 82036}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 67392}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 92386}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 68019}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 71497}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 552276}, + {"group": "two_word", "operation": "eq", "implementation": "uint128", "microseconds": 77816}, + {"group": "two_word", "operation": "ne", "implementation": "uint128", "microseconds": 39310}, + {"group": "two_word", "operation": "lt", "implementation": "uint128", "microseconds": 53887}, + {"group": "two_word", "operation": "le", "implementation": "uint128", "microseconds": 56997}, + {"group": "two_word", "operation": "gt", "implementation": "uint128", "microseconds": 53426}, + {"group": "two_word", "operation": "ge", "implementation": "uint128", "microseconds": 53497}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 336050}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 169130}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 82036}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 67392}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 92386}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 68019}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 71497}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 552276}, {"group": "two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 25099}, - {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 16352}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 25100}, + {"group": "two_word", "operation": "add", "implementation": "uint128", "microseconds": 16352}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 25100}, {"group": "two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 25093}, - {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 14600}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 25144}, + {"group": "two_word", "operation": "sub", "implementation": "uint128", "microseconds": 14600}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 25144}, {"group": "two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 16322}, - {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 16404}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 16587}, + {"group": "two_word", "operation": "mul", "implementation": "uint128", "microseconds": 16404}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 16587}, {"group": "two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 524951}, - {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 645297}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 479663}, + {"group": "two_word", "operation": "div", "implementation": "uint128", "microseconds": 645297}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 479663}, {"group": "two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 484689}, - {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 695620}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 544036}, + {"group": "two_word", "operation": "mod", "implementation": "uint128", "microseconds": 695620}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 544036}, {"group": "two_word", "operation": "div64", "implementation": "unsigned __int128", "microseconds": 921021}, - {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 471234}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 767221}, + {"group": "two_word", "operation": "div64", "implementation": "uint128", "microseconds": 471234}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128", "microseconds": 767221}, {"group": "two_word", "operation": "div32", "implementation": "unsigned __int128", "microseconds": 645581}, - {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 254559}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 644957}, + {"group": "two_word", "operation": "div32", "implementation": "uint128", "microseconds": 254559}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128", "microseconds": 644957}, {"group": "one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 26660}, {"group": "one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 26778}, {"group": "one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 83459}, @@ -60,35 +60,35 @@ {"group": "one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 83815}, {"group": "one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 175367}, {"group": "one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 540328}, - {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 207081}, - {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 91216}, - {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 69327}, - {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 60896}, - {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 60782}, - {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 102399}, - {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 592086}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 260941}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 233740}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 111309}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 144146}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 84244}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 175348}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1010174}, + {"group": "one_word", "operation": "eq", "implementation": "uint128", "microseconds": 207081}, + {"group": "one_word", "operation": "ne", "implementation": "uint128", "microseconds": 91216}, + {"group": "one_word", "operation": "lt", "implementation": "uint128", "microseconds": 69327}, + {"group": "one_word", "operation": "le", "implementation": "uint128", "microseconds": 60896}, + {"group": "one_word", "operation": "gt", "implementation": "uint128", "microseconds": 60782}, + {"group": "one_word", "operation": "ge", "implementation": "uint128", "microseconds": 102399}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 592086}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 260941}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 233740}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 111309}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 144146}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 84244}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 175348}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1010174}, {"group": "one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 25144}, - {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 16289}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 25069}, + {"group": "one_word", "operation": "add", "implementation": "uint128", "microseconds": 16289}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 25069}, {"group": "one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 25085}, - {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 14795}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 24955}, + {"group": "one_word", "operation": "sub", "implementation": "uint128", "microseconds": 14795}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 24955}, {"group": "one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 16193}, - {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 16250}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 16237}, + {"group": "one_word", "operation": "mul", "implementation": "uint128", "microseconds": 16250}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 16237}, {"group": "one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 534118}, - {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 345292}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 540302}, + {"group": "one_word", "operation": "div", "implementation": "uint128", "microseconds": 345292}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 540302}, {"group": "one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 612959}, - {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 335049}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 527806}, + {"group": "one_word", "operation": "mod", "implementation": "uint128", "microseconds": 335049}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 527806}, {"group": "two_one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 26695}, {"group": "two_one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 26865}, {"group": "two_one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 42707}, @@ -96,35 +96,35 @@ {"group": "two_one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 42707}, {"group": "two_one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 40926}, {"group": "two_one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 221456}, - {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 32161}, - {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 39223}, - {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 53385}, - {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 56893}, - {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 53243}, - {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 53321}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 288637}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 128675}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 64695}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 42673}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 40914}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 42948}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 40855}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 361301}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128", "microseconds": 32161}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128", "microseconds": 39223}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128", "microseconds": 53385}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128", "microseconds": 56893}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128", "microseconds": 53243}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128", "microseconds": 53321}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 288637}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 128675}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 64695}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 42673}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 40914}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 42948}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 40855}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 361301}, {"group": "two_one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 24956}, - {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 16206}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 24971}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128", "microseconds": 16206}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 24971}, {"group": "two_one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 25015}, - {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 14509}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 25015}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128", "microseconds": 14509}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 25015}, {"group": "two_one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 16213}, - {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 16351}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 16260}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128", "microseconds": 16351}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 16260}, {"group": "two_one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 568862}, - {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 498599}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 580362}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128", "microseconds": 498599}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 580362}, {"group": "two_one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 567562}, - {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 498324}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 571027}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128", "microseconds": 498324}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 571027}, {"group": "one_two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 26712}, {"group": "one_two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 26780}, {"group": "one_two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 42768}, @@ -132,35 +132,35 @@ {"group": "one_two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 42679}, {"group": "one_two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 40857}, {"group": "one_two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 221410}, - {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 32001}, - {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 39253}, - {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 53352}, - {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 56701}, - {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 53294}, - {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 53204}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 288281}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 128845}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 62240}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 42701}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 40902}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 42697}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 40932}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 358862}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128", "microseconds": 32001}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128", "microseconds": 39253}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128", "microseconds": 53352}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128", "microseconds": 56701}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128", "microseconds": 53294}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128", "microseconds": 53204}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 288281}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 128845}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 62240}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 42701}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 40902}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 42697}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 40932}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 358862}, {"group": "one_two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 24945}, - {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 16211}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 24945}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128", "microseconds": 16211}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 24945}, {"group": "one_two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 25128}, - {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 14538}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 24958}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128", "microseconds": 14538}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 24958}, {"group": "one_two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 16244}, - {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 16369}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 16281}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128", "microseconds": 16369}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 16281}, {"group": "one_two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 568591}, - {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 445037}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 578649}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128", "microseconds": 445037}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 578649}, {"group": "one_two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 560923}, - {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 452171}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 570974}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128", "microseconds": 452171}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 570974}, {"group": "random_width", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 26732}, {"group": "random_width", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 26806}, {"group": "random_width", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 91952}, @@ -168,49 +168,49 @@ {"group": "random_width", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 88204}, {"group": "random_width", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 92998}, {"group": "random_width", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 415221}, - {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 99375}, - {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 60525}, - {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 72996}, - {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 73720}, - {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 73630}, - {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 72537}, - {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 453245}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 197997}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 131536}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 91715}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 88032}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 88017}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 92685}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 690480}, + {"group": "random_width", "operation": "eq", "implementation": "uint128", "microseconds": 99375}, + {"group": "random_width", "operation": "ne", "implementation": "uint128", "microseconds": 60525}, + {"group": "random_width", "operation": "lt", "implementation": "uint128", "microseconds": 72996}, + {"group": "random_width", "operation": "le", "implementation": "uint128", "microseconds": 73720}, + {"group": "random_width", "operation": "gt", "implementation": "uint128", "microseconds": 73630}, + {"group": "random_width", "operation": "ge", "implementation": "uint128", "microseconds": 72537}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128", "microseconds": 453245}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 197997}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 131536}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 91715}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 88032}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 88017}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 92685}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 690480}, {"group": "random_width", "operation": "add", "implementation": "unsigned __int128", "microseconds": 25106}, - {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 16257}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 24998}, + {"group": "random_width", "operation": "add", "implementation": "uint128", "microseconds": 16257}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 24998}, {"group": "random_width", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 25044}, - {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 14548}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 24982}, + {"group": "random_width", "operation": "sub", "implementation": "uint128", "microseconds": 14548}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 24982}, {"group": "random_width", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 17000}, - {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 16304}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 16310}, + {"group": "random_width", "operation": "mul", "implementation": "uint128", "microseconds": 16304}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 16310}, {"group": "random_width", "operation": "div", "implementation": "unsigned __int128", "microseconds": 581682}, - {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 489550}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 589757}, + {"group": "random_width", "operation": "div", "implementation": "uint128", "microseconds": 489550}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 589757}, {"group": "random_width", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 581990}, - {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 490872}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 590958}, + {"group": "random_width", "operation": "mod", "implementation": "uint128", "microseconds": 490872}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 590958}, {"group": "random_width", "operation": "shl", "implementation": "unsigned __int128", "microseconds": 83000}, - {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 39488}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 105992}, + {"group": "random_width", "operation": "shl", "implementation": "uint128", "microseconds": 39488}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128", "microseconds": 105992}, {"group": "random_width", "operation": "shr", "implementation": "unsigned __int128", "microseconds": 123969}, - {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 100428}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 217117}, + {"group": "random_width", "operation": "shr", "implementation": "uint128", "microseconds": 100428}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128", "microseconds": 217117}, {"group": "random_width", "operation": "and", "implementation": "unsigned __int128", "microseconds": 18163}, - {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 18064}, - {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 16413}, + {"group": "random_width", "operation": "and", "implementation": "uint128", "microseconds": 18064}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128", "microseconds": 16413}, {"group": "random_width", "operation": "or", "implementation": "unsigned __int128", "microseconds": 18079}, - {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 18170}, - {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 16390}, + {"group": "random_width", "operation": "or", "implementation": "uint128", "microseconds": 18170}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128", "microseconds": 16390}, {"group": "random_width", "operation": "xor", "implementation": "unsigned __int128", "microseconds": 18150}, - {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 18059}, - {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 16322} + {"group": "random_width", "operation": "xor", "implementation": "uint128", "microseconds": 18059}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128", "microseconds": 16322} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-s390x/i128.json b/doc/modules/ROOT/data/benchmarks-linux-s390x/i128.json index 8c6c5375..1e3969a5 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-s390x/i128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-s390x/i128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "int128_t", + "type": "int128", "sign": "i128", "os": "linux", "arch": "s390x", @@ -9,7 +9,7 @@ "elements": 2000000, "repetitions": 5, "baseline": "__int128", - "implementations": ["__int128", "int128_t", "boost::mp::int128_t", "absl::int128"], + "implementations": ["__int128", "int128", "boost::mp::int128", "absl::int128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "__int128", "microseconds": 56727}, {"group": "two_word", "operation": "ne", "implementation": "__int128", "microseconds": 57262}, @@ -18,20 +18,20 @@ {"group": "two_word", "operation": "gt", "implementation": "__int128", "microseconds": 102570}, {"group": "two_word", "operation": "ge", "implementation": "__int128", "microseconds": 118450}, {"group": "two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 626091}, - {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81899}, - {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 75435}, - {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 69586}, - {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 69605}, - {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 69540}, - {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 69905}, - {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 436946}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 297585}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 383939}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 289701}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 318982}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 324624}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 290134}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1906672}, + {"group": "two_word", "operation": "eq", "implementation": "int128", "microseconds": 81899}, + {"group": "two_word", "operation": "ne", "implementation": "int128", "microseconds": 75435}, + {"group": "two_word", "operation": "lt", "implementation": "int128", "microseconds": 69586}, + {"group": "two_word", "operation": "le", "implementation": "int128", "microseconds": 69605}, + {"group": "two_word", "operation": "gt", "implementation": "int128", "microseconds": 69540}, + {"group": "two_word", "operation": "ge", "implementation": "int128", "microseconds": 69905}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 436946}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 297585}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 383939}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 289701}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 318982}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 324624}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 290134}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1906672}, {"group": "two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 50337}, {"group": "two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 50670}, {"group": "two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 87172}, @@ -40,32 +40,32 @@ {"group": "two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 98795}, {"group": "two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 473776}, {"group": "two_word", "operation": "add", "implementation": "__int128", "microseconds": 50657}, - {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 44155}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 253381}, + {"group": "two_word", "operation": "add", "implementation": "int128", "microseconds": 44155}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 253381}, {"group": "two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 36856}, {"group": "two_word", "operation": "sub", "implementation": "__int128", "microseconds": 51086}, - {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 41560}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 281461}, + {"group": "two_word", "operation": "sub", "implementation": "int128", "microseconds": 41560}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 281461}, {"group": "two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 41423}, {"group": "two_word", "operation": "mul", "implementation": "__int128", "microseconds": 54010}, - {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 36548}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 150820}, + {"group": "two_word", "operation": "mul", "implementation": "int128", "microseconds": 36548}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 150820}, {"group": "two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 36688}, {"group": "two_word", "operation": "div", "implementation": "__int128", "microseconds": 711176}, - {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 902634}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 884308}, + {"group": "two_word", "operation": "div", "implementation": "int128", "microseconds": 902634}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 884308}, {"group": "two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 710205}, {"group": "two_word", "operation": "mod", "implementation": "__int128", "microseconds": 757463}, - {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 959350}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 825496}, + {"group": "two_word", "operation": "mod", "implementation": "int128", "microseconds": 959350}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 825496}, {"group": "two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 751829}, {"group": "two_word", "operation": "div64", "implementation": "__int128", "microseconds": 910658}, - {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 533352}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 962878}, + {"group": "two_word", "operation": "div64", "implementation": "int128", "microseconds": 533352}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128", "microseconds": 962878}, {"group": "two_word", "operation": "div64", "implementation": "absl::int128", "microseconds": 911621}, {"group": "two_word", "operation": "div32", "implementation": "__int128", "microseconds": 1308868}, - {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 470698}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 1419660}, + {"group": "two_word", "operation": "div32", "implementation": "int128", "microseconds": 470698}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128", "microseconds": 1419660}, {"group": "two_word", "operation": "div32", "implementation": "absl::int128", "microseconds": 1311482}, {"group": "one_word", "operation": "eq", "implementation": "__int128", "microseconds": 56557}, {"group": "one_word", "operation": "ne", "implementation": "__int128", "microseconds": 57194}, @@ -74,20 +74,20 @@ {"group": "one_word", "operation": "gt", "implementation": "__int128", "microseconds": 283565}, {"group": "one_word", "operation": "ge", "implementation": "__int128", "microseconds": 155161}, {"group": "one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 1117414}, - {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 75210}, - {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 220386}, - {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 250258}, - {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 228754}, - {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 248155}, - {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 229071}, - {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1252320}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 348679}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 485819}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 314896}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 344651}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 349420}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 316169}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2160075}, + {"group": "one_word", "operation": "eq", "implementation": "int128", "microseconds": 75210}, + {"group": "one_word", "operation": "ne", "implementation": "int128", "microseconds": 220386}, + {"group": "one_word", "operation": "lt", "implementation": "int128", "microseconds": 250258}, + {"group": "one_word", "operation": "le", "implementation": "int128", "microseconds": 228754}, + {"group": "one_word", "operation": "gt", "implementation": "int128", "microseconds": 248155}, + {"group": "one_word", "operation": "ge", "implementation": "int128", "microseconds": 229071}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 1252320}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 348679}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 485819}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 314896}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 344651}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 349420}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 316169}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 2160075}, {"group": "one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 50418}, {"group": "one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 50533}, {"group": "one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 134821}, @@ -96,24 +96,24 @@ {"group": "one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 136664}, {"group": "one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 644180}, {"group": "one_word", "operation": "add", "implementation": "__int128", "microseconds": 50673}, - {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 44432}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 273057}, + {"group": "one_word", "operation": "add", "implementation": "int128", "microseconds": 44432}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 273057}, {"group": "one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 36949}, {"group": "one_word", "operation": "sub", "implementation": "__int128", "microseconds": 50569}, - {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 41340}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 370113}, + {"group": "one_word", "operation": "sub", "implementation": "int128", "microseconds": 41340}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 370113}, {"group": "one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 41290}, {"group": "one_word", "operation": "mul", "implementation": "__int128", "microseconds": 53766}, - {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 36509}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 150725}, + {"group": "one_word", "operation": "mul", "implementation": "int128", "microseconds": 36509}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 150725}, {"group": "one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 36494}, {"group": "one_word", "operation": "div", "implementation": "__int128", "microseconds": 801301}, - {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 439455}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 966825}, + {"group": "one_word", "operation": "div", "implementation": "int128", "microseconds": 439455}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 966825}, {"group": "one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 802018}, {"group": "one_word", "operation": "mod", "implementation": "__int128", "microseconds": 851725}, - {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 440544}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 889861}, + {"group": "one_word", "operation": "mod", "implementation": "int128", "microseconds": 440544}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 889861}, {"group": "one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 856274}, {"group": "two_one_word", "operation": "eq", "implementation": "__int128", "microseconds": 56522}, {"group": "two_one_word", "operation": "ne", "implementation": "__int128", "microseconds": 57245}, @@ -122,20 +122,20 @@ {"group": "two_one_word", "operation": "gt", "implementation": "__int128", "microseconds": 100623}, {"group": "two_one_word", "operation": "ge", "implementation": "__int128", "microseconds": 115749}, {"group": "two_one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 581236}, - {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81849}, - {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 75332}, - {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 69477}, - {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 69268}, - {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 69287}, - {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 69589}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 435178}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 273946}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 352476}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 260750}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 288767}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 294371}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 257406}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1728211}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128", "microseconds": 81849}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128", "microseconds": 75332}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128", "microseconds": 69477}, + {"group": "two_one_word", "operation": "le", "implementation": "int128", "microseconds": 69268}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128", "microseconds": 69287}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128", "microseconds": 69589}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 435178}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 273946}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 352476}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 260750}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 288767}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 294371}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 257406}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1728211}, {"group": "two_one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 50265}, {"group": "two_one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 50567}, {"group": "two_one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 84583}, @@ -144,24 +144,24 @@ {"group": "two_one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 97052}, {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 464807}, {"group": "two_one_word", "operation": "add", "implementation": "__int128", "microseconds": 50626}, - {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 44162}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 253091}, + {"group": "two_one_word", "operation": "add", "implementation": "int128", "microseconds": 44162}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 253091}, {"group": "two_one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 36862}, {"group": "two_one_word", "operation": "sub", "implementation": "__int128", "microseconds": 50667}, - {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 41306}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 281089}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128", "microseconds": 41306}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 281089}, {"group": "two_one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 41604}, {"group": "two_one_word", "operation": "mul", "implementation": "__int128", "microseconds": 53773}, - {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 36487}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 150619}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128", "microseconds": 36487}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 150619}, {"group": "two_one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 36467}, {"group": "two_one_word", "operation": "div", "implementation": "__int128", "microseconds": 720219}, - {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 654373}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 894659}, + {"group": "two_one_word", "operation": "div", "implementation": "int128", "microseconds": 654373}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 894659}, {"group": "two_one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 717749}, {"group": "two_one_word", "operation": "mod", "implementation": "__int128", "microseconds": 762502}, - {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 678746}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 829480}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128", "microseconds": 678746}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 829480}, {"group": "two_one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 757477}, {"group": "one_two_word", "operation": "eq", "implementation": "__int128", "microseconds": 56507}, {"group": "one_two_word", "operation": "ne", "implementation": "__int128", "microseconds": 57147}, @@ -170,20 +170,20 @@ {"group": "one_two_word", "operation": "gt", "implementation": "__int128", "microseconds": 100567}, {"group": "one_two_word", "operation": "ge", "implementation": "__int128", "microseconds": 115820}, {"group": "one_two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 580541}, - {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81783}, - {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 75317}, - {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 69509}, - {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 69400}, - {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 69236}, - {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 69812}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 435437}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 269202}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 352030}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 259880}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 288977}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 294023}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 257600}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1722106}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128", "microseconds": 81783}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128", "microseconds": 75317}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128", "microseconds": 69509}, + {"group": "one_two_word", "operation": "le", "implementation": "int128", "microseconds": 69400}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128", "microseconds": 69236}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128", "microseconds": 69812}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 435437}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 269202}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 352030}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 259880}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 288977}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 294023}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 257600}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1722106}, {"group": "one_two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 50213}, {"group": "one_two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 50548}, {"group": "one_two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 84693}, @@ -192,24 +192,24 @@ {"group": "one_two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 96999}, {"group": "one_two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 464566}, {"group": "one_two_word", "operation": "add", "implementation": "__int128", "microseconds": 50634}, - {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 44066}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 253253}, + {"group": "one_two_word", "operation": "add", "implementation": "int128", "microseconds": 44066}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 253253}, {"group": "one_two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 36805}, {"group": "one_two_word", "operation": "sub", "implementation": "__int128", "microseconds": 50696}, - {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 41373}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 282131}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128", "microseconds": 41373}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 282131}, {"group": "one_two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 41352}, {"group": "one_two_word", "operation": "mul", "implementation": "__int128", "microseconds": 53815}, - {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 36419}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 150530}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128", "microseconds": 36419}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 150530}, {"group": "one_two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 36472}, {"group": "one_two_word", "operation": "div", "implementation": "__int128", "microseconds": 719639}, - {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 646241}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 894470}, + {"group": "one_two_word", "operation": "div", "implementation": "int128", "microseconds": 646241}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 894470}, {"group": "one_two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 716229}, {"group": "one_two_word", "operation": "mod", "implementation": "__int128", "microseconds": 761179}, - {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 678548}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 834617}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128", "microseconds": 678548}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 834617}, {"group": "one_two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 757677}, {"group": "random_width", "operation": "eq", "implementation": "__int128", "microseconds": 56807}, {"group": "random_width", "operation": "ne", "implementation": "__int128", "microseconds": 57079}, @@ -218,20 +218,20 @@ {"group": "random_width", "operation": "gt", "implementation": "__int128", "microseconds": 158511}, {"group": "random_width", "operation": "ge", "implementation": "__int128", "microseconds": 131614}, {"group": "random_width", "operation": "comparisons", "implementation": "__int128", "microseconds": 785777}, - {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 80237}, - {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 117647}, - {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 133763}, - {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 120672}, - {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 127326}, - {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 128756}, - {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 708911}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 326608}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 426773}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 311517}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 338998}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 342167}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 312727}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2059404}, + {"group": "random_width", "operation": "eq", "implementation": "int128", "microseconds": 80237}, + {"group": "random_width", "operation": "ne", "implementation": "int128", "microseconds": 117647}, + {"group": "random_width", "operation": "lt", "implementation": "int128", "microseconds": 133763}, + {"group": "random_width", "operation": "le", "implementation": "int128", "microseconds": 120672}, + {"group": "random_width", "operation": "gt", "implementation": "int128", "microseconds": 127326}, + {"group": "random_width", "operation": "ge", "implementation": "int128", "microseconds": 128756}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128", "microseconds": 708911}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 326608}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 426773}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 311517}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 338998}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 342167}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 312727}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 2059404}, {"group": "random_width", "operation": "eq", "implementation": "absl::int128", "microseconds": 50285}, {"group": "random_width", "operation": "ne", "implementation": "absl::int128", "microseconds": 50525}, {"group": "random_width", "operation": "lt", "implementation": "absl::int128", "microseconds": 103496}, @@ -240,32 +240,32 @@ {"group": "random_width", "operation": "ge", "implementation": "absl::int128", "microseconds": 111341}, {"group": "random_width", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 525305}, {"group": "random_width", "operation": "add", "implementation": "__int128", "microseconds": 50685}, - {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 44057}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 258246}, + {"group": "random_width", "operation": "add", "implementation": "int128", "microseconds": 44057}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 258246}, {"group": "random_width", "operation": "add", "implementation": "absl::int128", "microseconds": 37090}, {"group": "random_width", "operation": "sub", "implementation": "__int128", "microseconds": 50668}, - {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 41357}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 303965}, + {"group": "random_width", "operation": "sub", "implementation": "int128", "microseconds": 41357}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 303965}, {"group": "random_width", "operation": "sub", "implementation": "absl::int128", "microseconds": 41352}, {"group": "random_width", "operation": "mul", "implementation": "__int128", "microseconds": 53734}, - {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 36512}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 150617}, + {"group": "random_width", "operation": "mul", "implementation": "int128", "microseconds": 36512}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 150617}, {"group": "random_width", "operation": "mul", "implementation": "absl::int128", "microseconds": 36708}, {"group": "random_width", "operation": "div", "implementation": "__int128", "microseconds": 752827}, - {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 682729}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 919962}, + {"group": "random_width", "operation": "div", "implementation": "int128", "microseconds": 682729}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 919962}, {"group": "random_width", "operation": "div", "implementation": "absl::int128", "microseconds": 752655}, {"group": "random_width", "operation": "mod", "implementation": "__int128", "microseconds": 802322}, - {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 720485}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 851901}, + {"group": "random_width", "operation": "mod", "implementation": "int128", "microseconds": 720485}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 851901}, {"group": "random_width", "operation": "mod", "implementation": "absl::int128", "microseconds": 796760}, {"group": "random_width", "operation": "shl", "implementation": "__int128", "microseconds": 54070}, - {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 50781}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 172707}, + {"group": "random_width", "operation": "shl", "implementation": "int128", "microseconds": 50781}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128", "microseconds": 172707}, {"group": "random_width", "operation": "shl", "implementation": "absl::int128", "microseconds": 54046}, {"group": "random_width", "operation": "shr", "implementation": "__int128", "microseconds": 69663}, - {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 64780}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 181796}, + {"group": "random_width", "operation": "shr", "implementation": "int128", "microseconds": 64780}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128", "microseconds": 181796}, {"group": "random_width", "operation": "shr", "implementation": "absl::int128", "microseconds": 69833} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-s390x/u128.json b/doc/modules/ROOT/data/benchmarks-linux-s390x/u128.json index d9a351aa..2ff366f1 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-s390x/u128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-s390x/u128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "uint128_t", + "type": "uint128", "sign": "u128", "os": "linux", "arch": "s390x", @@ -9,7 +9,7 @@ "elements": 2000000, "repetitions": 5, "baseline": "unsigned __int128", - "implementations": ["unsigned __int128", "uint128_t", "boost::mp::uint128_t", "absl::uint128"], + "implementations": ["unsigned __int128", "uint128", "boost::mp::uint128", "absl::uint128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 57495}, {"group": "two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 57313}, @@ -18,20 +18,20 @@ {"group": "two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 102470}, {"group": "two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 118244}, {"group": "two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 559538}, - {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 81912}, - {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 75556}, - {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 75872}, - {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 66165}, - {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75799}, - {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 69252}, - {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 445813}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 185557}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 192243}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 358525}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 118439}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 104782}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 119630}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1080788}, + {"group": "two_word", "operation": "eq", "implementation": "uint128", "microseconds": 81912}, + {"group": "two_word", "operation": "ne", "implementation": "uint128", "microseconds": 75556}, + {"group": "two_word", "operation": "lt", "implementation": "uint128", "microseconds": 75872}, + {"group": "two_word", "operation": "le", "implementation": "uint128", "microseconds": 66165}, + {"group": "two_word", "operation": "gt", "implementation": "uint128", "microseconds": 75799}, + {"group": "two_word", "operation": "ge", "implementation": "uint128", "microseconds": 69252}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 445813}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 185557}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 192243}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 358525}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 118439}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 104782}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 119630}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1080788}, {"group": "two_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 235480}, {"group": "two_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 230227}, {"group": "two_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 161688}, @@ -40,32 +40,32 @@ {"group": "two_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 166922}, {"group": "two_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1130592}, {"group": "two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 50741}, - {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 44208}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 50797}, + {"group": "two_word", "operation": "add", "implementation": "uint128", "microseconds": 44208}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 50797}, {"group": "two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 50678}, {"group": "two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 50734}, - {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 41426}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 50649}, + {"group": "two_word", "operation": "sub", "implementation": "uint128", "microseconds": 41426}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 50649}, {"group": "two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 53736}, {"group": "two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53906}, - {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 36529}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 50612}, + {"group": "two_word", "operation": "mul", "implementation": "uint128", "microseconds": 36529}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 50612}, {"group": "two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 106966}, {"group": "two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 614561}, - {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 792604}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 636003}, + {"group": "two_word", "operation": "div", "implementation": "uint128", "microseconds": 792604}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 636003}, {"group": "two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 685691}, {"group": "two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 618877}, - {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 745641}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 639231}, + {"group": "two_word", "operation": "mod", "implementation": "uint128", "microseconds": 745641}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 639231}, {"group": "two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 667796}, {"group": "two_word", "operation": "div64", "implementation": "unsigned __int128", "microseconds": 877356}, - {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 485703}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 865957}, + {"group": "two_word", "operation": "div64", "implementation": "uint128", "microseconds": 485703}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128", "microseconds": 865957}, {"group": "two_word", "operation": "div64", "implementation": "absl::uint128", "microseconds": 905854}, {"group": "two_word", "operation": "div32", "implementation": "unsigned __int128", "microseconds": 1187952}, - {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 385198}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 1188209}, + {"group": "two_word", "operation": "div32", "implementation": "uint128", "microseconds": 385198}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128", "microseconds": 1188209}, {"group": "two_word", "operation": "div32", "implementation": "absl::uint128", "microseconds": 1217091}, {"group": "one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 56699}, {"group": "one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 57234}, @@ -74,20 +74,20 @@ {"group": "one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 147347}, {"group": "one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 154939}, {"group": "one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 719759}, - {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 75322}, - {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 220203}, - {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 113026}, - {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 110008}, - {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 110264}, - {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 113021}, - {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 742395}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 231581}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 308935}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 375002}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 155312}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 147284}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 155122}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1373694}, + {"group": "one_word", "operation": "eq", "implementation": "uint128", "microseconds": 75322}, + {"group": "one_word", "operation": "ne", "implementation": "uint128", "microseconds": 220203}, + {"group": "one_word", "operation": "lt", "implementation": "uint128", "microseconds": 113026}, + {"group": "one_word", "operation": "le", "implementation": "uint128", "microseconds": 110008}, + {"group": "one_word", "operation": "gt", "implementation": "uint128", "microseconds": 110264}, + {"group": "one_word", "operation": "ge", "implementation": "uint128", "microseconds": 113021}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 742395}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 231581}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 308935}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 375002}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 155312}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 147284}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 155122}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1373694}, {"group": "one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 235283}, {"group": "one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 229676}, {"group": "one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 208026}, @@ -96,24 +96,24 @@ {"group": "one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 204752}, {"group": "one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1297332}, {"group": "one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 50806}, - {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 44074}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 50822}, + {"group": "one_word", "operation": "add", "implementation": "uint128", "microseconds": 44074}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 50822}, {"group": "one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 50518}, {"group": "one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 50608}, - {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 41346}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 50440}, + {"group": "one_word", "operation": "sub", "implementation": "uint128", "microseconds": 41346}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 50440}, {"group": "one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 53564}, {"group": "one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53808}, - {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 36402}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 50639}, + {"group": "one_word", "operation": "mul", "implementation": "uint128", "microseconds": 36402}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 50639}, {"group": "one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 106601}, {"group": "one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 716138}, - {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 407624}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 736640}, + {"group": "one_word", "operation": "div", "implementation": "uint128", "microseconds": 407624}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 736640}, {"group": "one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 758885}, {"group": "one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 730455}, - {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 410003}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 738935}, + {"group": "one_word", "operation": "mod", "implementation": "uint128", "microseconds": 410003}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 738935}, {"group": "two_one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 56921}, {"group": "two_one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 57101}, {"group": "two_one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 100502}, @@ -121,20 +121,20 @@ {"group": "two_one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 100504}, {"group": "two_one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 115874}, {"group": "two_one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 547354}, - {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 81713}, - {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 75377}, - {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 75695}, - {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 66043}, - {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75540}, - {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 69367}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 444215}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 152220}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 168481}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 323079}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 115992}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 100527}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 115724}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 976676}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128", "microseconds": 81713}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128", "microseconds": 75377}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128", "microseconds": 75695}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128", "microseconds": 66043}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128", "microseconds": 75540}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128", "microseconds": 69367}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 444215}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 152220}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 168481}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 323079}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 115992}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 100527}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 115724}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 976676}, {"group": "two_one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 235523}, {"group": "two_one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 229884}, {"group": "two_one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 160914}, @@ -143,24 +143,24 @@ {"group": "two_one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 165786}, {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1125500}, {"group": "two_one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 50913}, - {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 44081}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 51030}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128", "microseconds": 44081}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 51030}, {"group": "two_one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 50487}, {"group": "two_one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 50723}, - {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 41412}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 50602}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128", "microseconds": 41412}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 50602}, {"group": "two_one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 53480}, {"group": "two_one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53729}, - {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 36350}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 50394}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128", "microseconds": 36350}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 50394}, {"group": "two_one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 106855}, {"group": "two_one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 656814}, - {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 545190}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 679933}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128", "microseconds": 545190}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 679933}, {"group": "two_one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 702448}, {"group": "two_one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 671222}, - {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 571953}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 690624}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128", "microseconds": 571953}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 690624}, {"group": "two_one_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 718346}, {"group": "one_two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 56857}, {"group": "one_two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 57359}, @@ -169,39 +169,39 @@ {"group": "one_two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 100474}, {"group": "one_two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 116171}, {"group": "one_two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 547591}, - {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 81801}, - {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 75603}, - {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 76057}, - {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 66202}, - {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 76057}, - {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 69314}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 445408}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 152331}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 168375}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 321871}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 115911}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 100499}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 115797}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 975177}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128", "microseconds": 81801}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128", "microseconds": 75603}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128", "microseconds": 76057}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128", "microseconds": 66202}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128", "microseconds": 76057}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128", "microseconds": 69314}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 445408}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 152331}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 168375}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 321871}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 115911}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 100499}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 115797}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 975177}, {"group": "one_two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 50691}, - {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 44109}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 50893}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128", "microseconds": 44109}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 50893}, {"group": "one_two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 50498}, {"group": "one_two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 50635}, - {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 41302}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 50893}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128", "microseconds": 41302}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 50893}, {"group": "one_two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 53572}, {"group": "one_two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53815}, - {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 36396}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 50518}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128", "microseconds": 36396}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 50518}, {"group": "one_two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 106635}, {"group": "one_two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 656513}, - {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 544792}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 678546}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128", "microseconds": 544792}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 678546}, {"group": "one_two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 702273}, {"group": "one_two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 673970}, - {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 572193}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 690791}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128", "microseconds": 572193}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 690791}, {"group": "one_two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 719162}, {"group": "random_width", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 56735}, {"group": "random_width", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 57067}, @@ -210,20 +210,20 @@ {"group": "random_width", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 115995}, {"group": "random_width", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 131584}, {"group": "random_width", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 609693}, - {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 80563}, - {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 117782}, - {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 90604}, - {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 79266}, - {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 89337}, - {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 81156}, - {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 539203}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 213157}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 244537}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 383142}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 128398}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 116128}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 132127}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1218003}, + {"group": "random_width", "operation": "eq", "implementation": "uint128", "microseconds": 80563}, + {"group": "random_width", "operation": "ne", "implementation": "uint128", "microseconds": 117782}, + {"group": "random_width", "operation": "lt", "implementation": "uint128", "microseconds": 90604}, + {"group": "random_width", "operation": "le", "implementation": "uint128", "microseconds": 79266}, + {"group": "random_width", "operation": "gt", "implementation": "uint128", "microseconds": 89337}, + {"group": "random_width", "operation": "ge", "implementation": "uint128", "microseconds": 81156}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128", "microseconds": 539203}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 213157}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 244537}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 383142}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 128398}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 116128}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 132127}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1218003}, {"group": "random_width", "operation": "eq", "implementation": "absl::uint128", "microseconds": 235736}, {"group": "random_width", "operation": "ne", "implementation": "absl::uint128", "microseconds": 229333}, {"group": "random_width", "operation": "lt", "implementation": "absl::uint128", "microseconds": 176182}, @@ -232,44 +232,44 @@ {"group": "random_width", "operation": "ge", "implementation": "absl::uint128", "microseconds": 178007}, {"group": "random_width", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1178669}, {"group": "random_width", "operation": "add", "implementation": "unsigned __int128", "microseconds": 50814}, - {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 44087}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 50939}, + {"group": "random_width", "operation": "add", "implementation": "uint128", "microseconds": 44087}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 50939}, {"group": "random_width", "operation": "add", "implementation": "absl::uint128", "microseconds": 50573}, {"group": "random_width", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 50584}, - {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 41277}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 50738}, + {"group": "random_width", "operation": "sub", "implementation": "uint128", "microseconds": 41277}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 50738}, {"group": "random_width", "operation": "sub", "implementation": "absl::uint128", "microseconds": 53373}, {"group": "random_width", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53604}, - {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 36614}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 50442}, + {"group": "random_width", "operation": "mul", "implementation": "uint128", "microseconds": 36614}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 50442}, {"group": "random_width", "operation": "mul", "implementation": "absl::uint128", "microseconds": 106646}, {"group": "random_width", "operation": "div", "implementation": "unsigned __int128", "microseconds": 782276}, - {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 608192}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 813958}, + {"group": "random_width", "operation": "div", "implementation": "uint128", "microseconds": 608192}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 813958}, {"group": "random_width", "operation": "div", "implementation": "absl::uint128", "microseconds": 830929}, {"group": "random_width", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 812511}, - {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 607793}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 840997}, + {"group": "random_width", "operation": "mod", "implementation": "uint128", "microseconds": 607793}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 840997}, {"group": "random_width", "operation": "mod", "implementation": "absl::uint128", "microseconds": 874632}, {"group": "random_width", "operation": "shl", "implementation": "unsigned __int128", "microseconds": 54107}, - {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 52548}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 104906}, + {"group": "random_width", "operation": "shl", "implementation": "uint128", "microseconds": 52548}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128", "microseconds": 104906}, {"group": "random_width", "operation": "shl", "implementation": "absl::uint128", "microseconds": 89258}, {"group": "random_width", "operation": "shr", "implementation": "unsigned __int128", "microseconds": 83670}, - {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 66248}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 111752}, + {"group": "random_width", "operation": "shr", "implementation": "uint128", "microseconds": 66248}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128", "microseconds": 111752}, {"group": "random_width", "operation": "shr", "implementation": "absl::uint128", "microseconds": 81776}, {"group": "random_width", "operation": "and", "implementation": "unsigned __int128", "microseconds": 51934}, - {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 50505}, - {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 51912}, + {"group": "random_width", "operation": "and", "implementation": "uint128", "microseconds": 50505}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128", "microseconds": 51912}, {"group": "random_width", "operation": "and", "implementation": "absl::uint128", "microseconds": 121147}, {"group": "random_width", "operation": "or", "implementation": "unsigned __int128", "microseconds": 51950}, - {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 50695}, - {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 51843}, + {"group": "random_width", "operation": "or", "implementation": "uint128", "microseconds": 50695}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128", "microseconds": 51843}, {"group": "random_width", "operation": "or", "implementation": "absl::uint128", "microseconds": 120345}, {"group": "random_width", "operation": "xor", "implementation": "unsigned __int128", "microseconds": 50519}, - {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 50636}, - {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 50504}, + {"group": "random_width", "operation": "xor", "implementation": "uint128", "microseconds": 50636}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128", "microseconds": 50504}, {"group": "random_width", "operation": "xor", "implementation": "absl::uint128", "microseconds": 132533} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-x64/i128.json b/doc/modules/ROOT/data/benchmarks-linux-x64/i128.json index 73d194bb..1c30e25e 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-x64/i128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-x64/i128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "int128_t", + "type": "int128", "sign": "i128", "os": "linux", "arch": "x64", @@ -9,7 +9,7 @@ "elements": 20000000, "repetitions": 5, "baseline": "__int128", - "implementations": ["__int128", "int128_t", "boost::mp::int128_t", "absl::int128"], + "implementations": ["__int128", "int128", "boost::mp::int128", "absl::int128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "__int128", "microseconds": 102391}, {"group": "two_word", "operation": "ne", "implementation": "__int128", "microseconds": 102395}, @@ -18,20 +18,20 @@ {"group": "two_word", "operation": "gt", "implementation": "__int128", "microseconds": 94245}, {"group": "two_word", "operation": "ge", "implementation": "__int128", "microseconds": 90604}, {"group": "two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 574653}, - {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81177}, - {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 89994}, - {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 84390}, - {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 84064}, - {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 83899}, - {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 83022}, - {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 506698}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 374846}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 382438}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 363007}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 109952}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 111908}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 360541}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1702868}, + {"group": "two_word", "operation": "eq", "implementation": "int128", "microseconds": 81177}, + {"group": "two_word", "operation": "ne", "implementation": "int128", "microseconds": 89994}, + {"group": "two_word", "operation": "lt", "implementation": "int128", "microseconds": 84390}, + {"group": "two_word", "operation": "le", "implementation": "int128", "microseconds": 84064}, + {"group": "two_word", "operation": "gt", "implementation": "int128", "microseconds": 83899}, + {"group": "two_word", "operation": "ge", "implementation": "int128", "microseconds": 83022}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 506698}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 374846}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 382438}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 363007}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 109952}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 111908}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 360541}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1702868}, {"group": "two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 101434}, {"group": "two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 88747}, {"group": "two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 84430}, @@ -40,32 +40,32 @@ {"group": "two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 81642}, {"group": "two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 522121}, {"group": "two_word", "operation": "add", "implementation": "__int128", "microseconds": 65920}, - {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 61808}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 143341}, + {"group": "two_word", "operation": "add", "implementation": "int128", "microseconds": 61808}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 143341}, {"group": "two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 61955}, {"group": "two_word", "operation": "sub", "implementation": "__int128", "microseconds": 65931}, - {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 71163}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 474092}, + {"group": "two_word", "operation": "sub", "implementation": "int128", "microseconds": 71163}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 474092}, {"group": "two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 71211}, {"group": "two_word", "operation": "mul", "implementation": "__int128", "microseconds": 86777}, - {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 74570}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 196914}, + {"group": "two_word", "operation": "mul", "implementation": "int128", "microseconds": 74570}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 196914}, {"group": "two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 75043}, {"group": "two_word", "operation": "div", "implementation": "__int128", "microseconds": 1078930}, - {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1103523}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1009801}, + {"group": "two_word", "operation": "div", "implementation": "int128", "microseconds": 1103523}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 1009801}, {"group": "two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 1047021}, {"group": "two_word", "operation": "mod", "implementation": "__int128", "microseconds": 781633}, - {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 867853}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 766518}, + {"group": "two_word", "operation": "mod", "implementation": "int128", "microseconds": 867853}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 766518}, {"group": "two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 757506}, {"group": "two_word", "operation": "div64", "implementation": "__int128", "microseconds": 581804}, - {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 687098}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 994200}, + {"group": "two_word", "operation": "div64", "implementation": "int128", "microseconds": 687098}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128", "microseconds": 994200}, {"group": "two_word", "operation": "div64", "implementation": "absl::int128", "microseconds": 606581}, {"group": "two_word", "operation": "div32", "implementation": "__int128", "microseconds": 687745}, - {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 687074}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 695194}, + {"group": "two_word", "operation": "div32", "implementation": "int128", "microseconds": 687074}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128", "microseconds": 695194}, {"group": "two_word", "operation": "div32", "implementation": "absl::int128", "microseconds": 687922}, {"group": "one_word", "operation": "eq", "implementation": "__int128", "microseconds": 102486}, {"group": "one_word", "operation": "ne", "implementation": "__int128", "microseconds": 102555}, @@ -74,20 +74,20 @@ {"group": "one_word", "operation": "gt", "implementation": "__int128", "microseconds": 94197}, {"group": "one_word", "operation": "ge", "implementation": "__int128", "microseconds": 90667}, {"group": "one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 574990}, - {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 82191}, - {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 89993}, - {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 81959}, - {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 82066}, - {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 84504}, - {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 89306}, - {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 510194}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 387565}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 383804}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 363613}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 110071}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 110600}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 360765}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1716605}, + {"group": "one_word", "operation": "eq", "implementation": "int128", "microseconds": 82191}, + {"group": "one_word", "operation": "ne", "implementation": "int128", "microseconds": 89993}, + {"group": "one_word", "operation": "lt", "implementation": "int128", "microseconds": 81959}, + {"group": "one_word", "operation": "le", "implementation": "int128", "microseconds": 82066}, + {"group": "one_word", "operation": "gt", "implementation": "int128", "microseconds": 84504}, + {"group": "one_word", "operation": "ge", "implementation": "int128", "microseconds": 89306}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 510194}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 387565}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 383804}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 363613}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 110071}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 110600}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 360765}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1716605}, {"group": "one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 87593}, {"group": "one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 87807}, {"group": "one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 83181}, @@ -96,24 +96,24 @@ {"group": "one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 83398}, {"group": "one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 507310}, {"group": "one_word", "operation": "add", "implementation": "__int128", "microseconds": 66199}, - {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 61789}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 262369}, + {"group": "one_word", "operation": "add", "implementation": "int128", "microseconds": 61789}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 262369}, {"group": "one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 61592}, {"group": "one_word", "operation": "sub", "implementation": "__int128", "microseconds": 66035}, - {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 71276}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 689871}, + {"group": "one_word", "operation": "sub", "implementation": "int128", "microseconds": 71276}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 689871}, {"group": "one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 71173}, {"group": "one_word", "operation": "mul", "implementation": "__int128", "microseconds": 86781}, - {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 74000}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 195539}, + {"group": "one_word", "operation": "mul", "implementation": "int128", "microseconds": 74000}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 195539}, {"group": "one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 75062}, {"group": "one_word", "operation": "div", "implementation": "__int128", "microseconds": 415102}, - {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 486423}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 389401}, + {"group": "one_word", "operation": "div", "implementation": "int128", "microseconds": 486423}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 389401}, {"group": "one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 388593}, {"group": "one_word", "operation": "mod", "implementation": "__int128", "microseconds": 414106}, - {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 599197}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 511277}, + {"group": "one_word", "operation": "mod", "implementation": "int128", "microseconds": 599197}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 511277}, {"group": "one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 388401}, {"group": "two_one_word", "operation": "eq", "implementation": "__int128", "microseconds": 102198}, {"group": "two_one_word", "operation": "ne", "implementation": "__int128", "microseconds": 102379}, @@ -122,20 +122,20 @@ {"group": "two_one_word", "operation": "gt", "implementation": "__int128", "microseconds": 94178}, {"group": "two_one_word", "operation": "ge", "implementation": "__int128", "microseconds": 90520}, {"group": "two_one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 574294}, - {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81041}, - {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 89153}, - {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 82356}, - {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 81590}, - {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 81586}, - {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 81893}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 497771}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 110474}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 125435}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 102279}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 110556}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 110586}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 101215}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 660719}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128", "microseconds": 81041}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128", "microseconds": 89153}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128", "microseconds": 82356}, + {"group": "two_one_word", "operation": "le", "implementation": "int128", "microseconds": 81590}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128", "microseconds": 81586}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128", "microseconds": 81893}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 497771}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 110474}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 125435}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 102279}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 110556}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 110586}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 101215}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 660719}, {"group": "two_one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 88509}, {"group": "two_one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 89195}, {"group": "two_one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 84093}, @@ -144,24 +144,24 @@ {"group": "two_one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 83304}, {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 514589}, {"group": "two_one_word", "operation": "add", "implementation": "__int128", "microseconds": 66097}, - {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 62691}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 144126}, + {"group": "two_one_word", "operation": "add", "implementation": "int128", "microseconds": 62691}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 144126}, {"group": "two_one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 62609}, {"group": "two_one_word", "operation": "sub", "implementation": "__int128", "microseconds": 66014}, - {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 71286}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 179874}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128", "microseconds": 71286}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 179874}, {"group": "two_one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 71402}, {"group": "two_one_word", "operation": "mul", "implementation": "__int128", "microseconds": 86792}, - {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 74571}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 195821}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128", "microseconds": 74571}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 195821}, {"group": "two_one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 74294}, {"group": "two_one_word", "operation": "div", "implementation": "__int128", "microseconds": 545027}, - {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 343997}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 654288}, + {"group": "two_one_word", "operation": "div", "implementation": "int128", "microseconds": 343997}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 654288}, {"group": "two_one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 505516}, {"group": "two_one_word", "operation": "mod", "implementation": "__int128", "microseconds": 553185}, - {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 344857}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 699846}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128", "microseconds": 344857}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 699846}, {"group": "two_one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 523339}, {"group": "one_two_word", "operation": "eq", "implementation": "__int128", "microseconds": 102109}, {"group": "one_two_word", "operation": "ne", "implementation": "__int128", "microseconds": 102289}, @@ -170,20 +170,20 @@ {"group": "one_two_word", "operation": "gt", "implementation": "__int128", "microseconds": 94305}, {"group": "one_two_word", "operation": "ge", "implementation": "__int128", "microseconds": 90616}, {"group": "one_two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 574206}, - {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81043}, - {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 89708}, - {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 84195}, - {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 84083}, - {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 83643}, - {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 83995}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 506815}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 110974}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 126016}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 100292}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 110463}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 110329}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 101099}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 659342}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128", "microseconds": 81043}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128", "microseconds": 89708}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128", "microseconds": 84195}, + {"group": "one_two_word", "operation": "le", "implementation": "int128", "microseconds": 84083}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128", "microseconds": 83643}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128", "microseconds": 83995}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 506815}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 110974}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 126016}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 100292}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 110463}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 110329}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 101099}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 659342}, {"group": "one_two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 86746}, {"group": "one_two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 87235}, {"group": "one_two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 83669}, @@ -192,24 +192,24 @@ {"group": "one_two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 83406}, {"group": "one_two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 507620}, {"group": "one_two_word", "operation": "add", "implementation": "__int128", "microseconds": 66053}, - {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 59843}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 143311}, + {"group": "one_two_word", "operation": "add", "implementation": "int128", "microseconds": 59843}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 143311}, {"group": "one_two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 61114}, {"group": "one_two_word", "operation": "sub", "implementation": "__int128", "microseconds": 66010}, - {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 71236}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 178688}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128", "microseconds": 71236}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 178688}, {"group": "one_two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 71258}, {"group": "one_two_word", "operation": "mul", "implementation": "__int128", "microseconds": 86601}, - {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 73840}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 195508}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128", "microseconds": 73840}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 195508}, {"group": "one_two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 74528}, {"group": "one_two_word", "operation": "div", "implementation": "__int128", "microseconds": 545464}, - {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 344066}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 654027}, + {"group": "one_two_word", "operation": "div", "implementation": "int128", "microseconds": 344066}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 654027}, {"group": "one_two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 506277}, {"group": "one_two_word", "operation": "mod", "implementation": "__int128", "microseconds": 569127}, - {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 344896}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 701083}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128", "microseconds": 344896}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 701083}, {"group": "one_two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 523250}, {"group": "random_width", "operation": "eq", "implementation": "__int128", "microseconds": 102201}, {"group": "random_width", "operation": "ne", "implementation": "__int128", "microseconds": 102463}, @@ -218,20 +218,20 @@ {"group": "random_width", "operation": "gt", "implementation": "__int128", "microseconds": 94445}, {"group": "random_width", "operation": "ge", "implementation": "__int128", "microseconds": 90604}, {"group": "random_width", "operation": "comparisons", "implementation": "__int128", "microseconds": 575065}, - {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 81127}, - {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 88253}, - {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 82206}, - {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 83247}, - {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 81874}, - {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 83578}, - {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 500451}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 371894}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 381005}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 367895}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 110356}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 110715}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 361118}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1703153}, + {"group": "random_width", "operation": "eq", "implementation": "int128", "microseconds": 81127}, + {"group": "random_width", "operation": "ne", "implementation": "int128", "microseconds": 88253}, + {"group": "random_width", "operation": "lt", "implementation": "int128", "microseconds": 82206}, + {"group": "random_width", "operation": "le", "implementation": "int128", "microseconds": 83247}, + {"group": "random_width", "operation": "gt", "implementation": "int128", "microseconds": 81874}, + {"group": "random_width", "operation": "ge", "implementation": "int128", "microseconds": 83578}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128", "microseconds": 500451}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 371894}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 381005}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 367895}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 110356}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 110715}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 361118}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1703153}, {"group": "random_width", "operation": "eq", "implementation": "absl::int128", "microseconds": 87797}, {"group": "random_width", "operation": "ne", "implementation": "absl::int128", "microseconds": 87663}, {"group": "random_width", "operation": "lt", "implementation": "absl::int128", "microseconds": 84201}, @@ -240,32 +240,32 @@ {"group": "random_width", "operation": "ge", "implementation": "absl::int128", "microseconds": 81401}, {"group": "random_width", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 503204}, {"group": "random_width", "operation": "add", "implementation": "__int128", "microseconds": 65874}, - {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 60371}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 176054}, + {"group": "random_width", "operation": "add", "implementation": "int128", "microseconds": 60371}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 176054}, {"group": "random_width", "operation": "add", "implementation": "absl::int128", "microseconds": 60901}, {"group": "random_width", "operation": "sub", "implementation": "__int128", "microseconds": 65944}, - {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 72082}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 569596}, + {"group": "random_width", "operation": "sub", "implementation": "int128", "microseconds": 72082}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 569596}, {"group": "random_width", "operation": "sub", "implementation": "absl::int128", "microseconds": 71309}, {"group": "random_width", "operation": "mul", "implementation": "__int128", "microseconds": 86629}, - {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 74522}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 196324}, + {"group": "random_width", "operation": "mul", "implementation": "int128", "microseconds": 74522}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 196324}, {"group": "random_width", "operation": "mul", "implementation": "absl::int128", "microseconds": 74967}, {"group": "random_width", "operation": "div", "implementation": "__int128", "microseconds": 999372}, - {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 978885}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 985280}, + {"group": "random_width", "operation": "div", "implementation": "int128", "microseconds": 978885}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 985280}, {"group": "random_width", "operation": "div", "implementation": "absl::int128", "microseconds": 970981}, {"group": "random_width", "operation": "mod", "implementation": "__int128", "microseconds": 940401}, - {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 963188}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1010396}, + {"group": "random_width", "operation": "mod", "implementation": "int128", "microseconds": 963188}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 1010396}, {"group": "random_width", "operation": "mod", "implementation": "absl::int128", "microseconds": 918835}, {"group": "random_width", "operation": "shl", "implementation": "__int128", "microseconds": 452496}, - {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 449417}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 187973}, + {"group": "random_width", "operation": "shl", "implementation": "int128", "microseconds": 449417}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128", "microseconds": 187973}, {"group": "random_width", "operation": "shl", "implementation": "absl::int128", "microseconds": 452632}, {"group": "random_width", "operation": "shr", "implementation": "__int128", "microseconds": 462957}, - {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 459922}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 157373}, + {"group": "random_width", "operation": "shr", "implementation": "int128", "microseconds": 459922}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128", "microseconds": 157373}, {"group": "random_width", "operation": "shr", "implementation": "absl::int128", "microseconds": 461838} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-x64/u128.json b/doc/modules/ROOT/data/benchmarks-linux-x64/u128.json index b0c2fc9e..1b9a5f0e 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-x64/u128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-x64/u128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "uint128_t", + "type": "uint128", "sign": "u128", "os": "linux", "arch": "x64", @@ -9,7 +9,7 @@ "elements": 20000000, "repetitions": 5, "baseline": "unsigned __int128", - "implementations": ["unsigned __int128", "uint128_t", "boost::mp::uint128_t", "absl::uint128"], + "implementations": ["unsigned __int128", "uint128", "boost::mp::uint128", "absl::uint128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 102180}, {"group": "two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 102201}, @@ -18,20 +18,20 @@ {"group": "two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 74739}, {"group": "two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 74954}, {"group": "two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 503941}, - {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 99148}, - {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 134743}, - {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 75844}, - {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 75883}, - {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75728}, - {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 75735}, - {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 537246}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 389733}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 410653}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 74738}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 74720}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 74940}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 74984}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1099931}, + {"group": "two_word", "operation": "eq", "implementation": "uint128", "microseconds": 99148}, + {"group": "two_word", "operation": "ne", "implementation": "uint128", "microseconds": 134743}, + {"group": "two_word", "operation": "lt", "implementation": "uint128", "microseconds": 75844}, + {"group": "two_word", "operation": "le", "implementation": "uint128", "microseconds": 75883}, + {"group": "two_word", "operation": "gt", "implementation": "uint128", "microseconds": 75728}, + {"group": "two_word", "operation": "ge", "implementation": "uint128", "microseconds": 75735}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 537246}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 389733}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 410653}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 74738}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 74720}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 74940}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 74984}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1099931}, {"group": "two_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 98927}, {"group": "two_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 98655}, {"group": "two_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 76277}, @@ -40,32 +40,32 @@ {"group": "two_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 76480}, {"group": "two_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 503733}, {"group": "two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 66072}, - {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 61766}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 66009}, + {"group": "two_word", "operation": "add", "implementation": "uint128", "microseconds": 61766}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 66009}, {"group": "two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 61818}, {"group": "two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 65986}, - {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 71192}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 69312}, + {"group": "two_word", "operation": "sub", "implementation": "uint128", "microseconds": 71192}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 69312}, {"group": "two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 66692}, {"group": "two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86322}, - {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 74746}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 86343}, + {"group": "two_word", "operation": "mul", "implementation": "uint128", "microseconds": 74746}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 86343}, {"group": "two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 75511}, {"group": "two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 946171}, - {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 891648}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 981047}, + {"group": "two_word", "operation": "div", "implementation": "uint128", "microseconds": 891648}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 981047}, {"group": "two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 968211}, {"group": "two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 744246}, - {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 697299}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 754132}, + {"group": "two_word", "operation": "mod", "implementation": "uint128", "microseconds": 697299}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 754132}, {"group": "two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 761108}, {"group": "two_word", "operation": "div64", "implementation": "unsigned __int128", "microseconds": 734551}, - {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 687104}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 721411}, + {"group": "two_word", "operation": "div64", "implementation": "uint128", "microseconds": 687104}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128", "microseconds": 721411}, {"group": "two_word", "operation": "div64", "implementation": "absl::uint128", "microseconds": 718386}, {"group": "two_word", "operation": "div32", "implementation": "unsigned __int128", "microseconds": 687412}, - {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 687027}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 687415}, + {"group": "two_word", "operation": "div32", "implementation": "uint128", "microseconds": 687027}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128", "microseconds": 687415}, {"group": "two_word", "operation": "div32", "implementation": "absl::uint128", "microseconds": 687498}, {"group": "one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 102207}, {"group": "one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 102501}, @@ -74,20 +74,20 @@ {"group": "one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 74798}, {"group": "one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 74743}, {"group": "one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 504031}, - {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 98951}, - {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 135152}, - {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 75431}, - {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 75639}, - {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75635}, - {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 75741}, - {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 536743}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 391268}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 410397}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 74777}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 74799}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 74829}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 74723}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1100966}, + {"group": "one_word", "operation": "eq", "implementation": "uint128", "microseconds": 98951}, + {"group": "one_word", "operation": "ne", "implementation": "uint128", "microseconds": 135152}, + {"group": "one_word", "operation": "lt", "implementation": "uint128", "microseconds": 75431}, + {"group": "one_word", "operation": "le", "implementation": "uint128", "microseconds": 75639}, + {"group": "one_word", "operation": "gt", "implementation": "uint128", "microseconds": 75635}, + {"group": "one_word", "operation": "ge", "implementation": "uint128", "microseconds": 75741}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 536743}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 391268}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 410397}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 74777}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 74799}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 74829}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 74723}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1100966}, {"group": "one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 98648}, {"group": "one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 101349}, {"group": "one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 89346}, @@ -96,24 +96,24 @@ {"group": "one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 76502}, {"group": "one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 519117}, {"group": "one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 66042}, - {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 60005}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 65979}, + {"group": "one_word", "operation": "add", "implementation": "uint128", "microseconds": 60005}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 65979}, {"group": "one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 61841}, {"group": "one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 66307}, - {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 71214}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 65975}, + {"group": "one_word", "operation": "sub", "implementation": "uint128", "microseconds": 71214}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 65975}, {"group": "one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 64268}, {"group": "one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86607}, - {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 75219}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 86348}, + {"group": "one_word", "operation": "mul", "implementation": "uint128", "microseconds": 75219}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 86348}, {"group": "one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 75628}, {"group": "one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 353094}, - {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 392174}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 380971}, + {"group": "one_word", "operation": "div", "implementation": "uint128", "microseconds": 392174}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 380971}, {"group": "one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 381099}, {"group": "one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 317709}, - {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 402571}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 317707}, + {"group": "one_word", "operation": "mod", "implementation": "uint128", "microseconds": 402571}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 317707}, {"group": "two_one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 102168}, {"group": "two_one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 102209}, {"group": "two_one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 74766}, @@ -121,20 +121,20 @@ {"group": "two_one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 74668}, {"group": "two_one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 74770}, {"group": "two_one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 503584}, - {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 99005}, - {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 135103}, - {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 76077}, - {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 76022}, - {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75972}, - {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 75973}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 538304}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 170939}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 181399}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 74831}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 75078}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 74760}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 74729}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 651890}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128", "microseconds": 99005}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128", "microseconds": 135103}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128", "microseconds": 76077}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128", "microseconds": 76022}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128", "microseconds": 75972}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128", "microseconds": 75973}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 538304}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 170939}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 181399}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 74831}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 75078}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 74760}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 74729}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 651890}, {"group": "two_one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 98817}, {"group": "two_one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 98817}, {"group": "two_one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 76343}, @@ -143,24 +143,24 @@ {"group": "two_one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 76569}, {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 503898}, {"group": "two_one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 66123}, - {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 60596}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 65947}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128", "microseconds": 60596}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 65947}, {"group": "two_one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 60957}, {"group": "two_one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 65905}, - {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 71452}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 65866}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128", "microseconds": 71452}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 65866}, {"group": "two_one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 64344}, {"group": "two_one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86301}, - {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 74341}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 86398}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128", "microseconds": 74341}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 86398}, {"group": "two_one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 74454}, {"group": "two_one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 516551}, - {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 343719}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 549618}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128", "microseconds": 343719}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 549618}, {"group": "two_one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 549145}, {"group": "two_one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 518088}, - {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 344174}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 531107}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128", "microseconds": 344174}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 531107}, {"group": "two_one_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 550184}, {"group": "one_two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 102327}, {"group": "one_two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 102119}, @@ -169,39 +169,39 @@ {"group": "one_two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 74642}, {"group": "one_two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 74877}, {"group": "one_two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 503666}, - {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 98870}, - {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 134243}, - {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 75707}, - {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 76055}, - {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75961}, - {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 75818}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 536809}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 170136}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 180426}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 74714}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 74863}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 75011}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 74710}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 650023}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128", "microseconds": 98870}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128", "microseconds": 134243}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128", "microseconds": 75707}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128", "microseconds": 76055}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128", "microseconds": 75961}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128", "microseconds": 75818}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 536809}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 170136}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 180426}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 74714}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 74863}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 75011}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 74710}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 650023}, {"group": "one_two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 66124}, - {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 60882}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 66471}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128", "microseconds": 60882}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 66471}, {"group": "one_two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 60477}, {"group": "one_two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 66345}, - {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 71197}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 65892}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128", "microseconds": 71197}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 65892}, {"group": "one_two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 64178}, {"group": "one_two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86252}, - {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 74715}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 86366}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128", "microseconds": 74715}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 86366}, {"group": "one_two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 75143}, {"group": "one_two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 517067}, - {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 345744}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 557815}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128", "microseconds": 345744}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 557815}, {"group": "one_two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 548693}, {"group": "one_two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 518752}, - {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 343766}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 520799}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128", "microseconds": 343766}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 520799}, {"group": "one_two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 550093}, {"group": "random_width", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 104652}, {"group": "random_width", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 103064}, @@ -210,20 +210,20 @@ {"group": "random_width", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 87467}, {"group": "random_width", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 80705}, {"group": "random_width", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 538116}, - {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 101406}, - {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 139756}, - {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 76147}, - {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 76035}, - {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 76003}, - {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 75612}, - {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 545110}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 390030}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 410462}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 74879}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 74850}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 74745}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 75022}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1100158}, + {"group": "random_width", "operation": "eq", "implementation": "uint128", "microseconds": 101406}, + {"group": "random_width", "operation": "ne", "implementation": "uint128", "microseconds": 139756}, + {"group": "random_width", "operation": "lt", "implementation": "uint128", "microseconds": 76147}, + {"group": "random_width", "operation": "le", "implementation": "uint128", "microseconds": 76035}, + {"group": "random_width", "operation": "gt", "implementation": "uint128", "microseconds": 76003}, + {"group": "random_width", "operation": "ge", "implementation": "uint128", "microseconds": 75612}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128", "microseconds": 545110}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 390030}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 410462}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 74879}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 74850}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 74745}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 75022}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1100158}, {"group": "random_width", "operation": "eq", "implementation": "absl::uint128", "microseconds": 99083}, {"group": "random_width", "operation": "ne", "implementation": "absl::uint128", "microseconds": 99002}, {"group": "random_width", "operation": "lt", "implementation": "absl::uint128", "microseconds": 76428}, @@ -232,44 +232,44 @@ {"group": "random_width", "operation": "ge", "implementation": "absl::uint128", "microseconds": 76373}, {"group": "random_width", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 504183}, {"group": "random_width", "operation": "add", "implementation": "unsigned __int128", "microseconds": 66230}, - {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 60477}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 65991}, + {"group": "random_width", "operation": "add", "implementation": "uint128", "microseconds": 60477}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 65991}, {"group": "random_width", "operation": "add", "implementation": "absl::uint128", "microseconds": 60608}, {"group": "random_width", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 65810}, - {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 71192}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 65943}, + {"group": "random_width", "operation": "sub", "implementation": "uint128", "microseconds": 71192}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 65943}, {"group": "random_width", "operation": "sub", "implementation": "absl::uint128", "microseconds": 64127}, {"group": "random_width", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86476}, - {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 74446}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 86230}, + {"group": "random_width", "operation": "mul", "implementation": "uint128", "microseconds": 74446}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 86230}, {"group": "random_width", "operation": "mul", "implementation": "absl::uint128", "microseconds": 74626}, {"group": "random_width", "operation": "div", "implementation": "unsigned __int128", "microseconds": 908484}, - {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 761299}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 940478}, + {"group": "random_width", "operation": "div", "implementation": "uint128", "microseconds": 761299}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 940478}, {"group": "random_width", "operation": "div", "implementation": "absl::uint128", "microseconds": 928884}, {"group": "random_width", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 837475}, - {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 697322}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 858246}, + {"group": "random_width", "operation": "mod", "implementation": "uint128", "microseconds": 697322}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 858246}, {"group": "random_width", "operation": "mod", "implementation": "absl::uint128", "microseconds": 856182}, {"group": "random_width", "operation": "shl", "implementation": "unsigned __int128", "microseconds": 452524}, - {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 450311}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 493541}, + {"group": "random_width", "operation": "shl", "implementation": "uint128", "microseconds": 450311}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128", "microseconds": 493541}, {"group": "random_width", "operation": "shl", "implementation": "absl::uint128", "microseconds": 450092}, {"group": "random_width", "operation": "shr", "implementation": "unsigned __int128", "microseconds": 461906}, - {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 459608}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 489951}, + {"group": "random_width", "operation": "shr", "implementation": "uint128", "microseconds": 459608}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128", "microseconds": 489951}, {"group": "random_width", "operation": "shr", "implementation": "absl::uint128", "microseconds": 460259}, {"group": "random_width", "operation": "and", "implementation": "unsigned __int128", "microseconds": 73511}, - {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 66344}, - {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 65909}, + {"group": "random_width", "operation": "and", "implementation": "uint128", "microseconds": 66344}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128", "microseconds": 65909}, {"group": "random_width", "operation": "and", "implementation": "absl::uint128", "microseconds": 62649}, {"group": "random_width", "operation": "or", "implementation": "unsigned __int128", "microseconds": 65779}, - {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 65826}, - {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 66054}, + {"group": "random_width", "operation": "or", "implementation": "uint128", "microseconds": 65826}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128", "microseconds": 66054}, {"group": "random_width", "operation": "or", "implementation": "absl::uint128", "microseconds": 62402}, {"group": "random_width", "operation": "xor", "implementation": "unsigned __int128", "microseconds": 65919}, - {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 66049}, - {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 66151}, + {"group": "random_width", "operation": "xor", "implementation": "uint128", "microseconds": 66049}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128", "microseconds": 66151}, {"group": "random_width", "operation": "xor", "implementation": "absl::uint128", "microseconds": 62279} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-x86/i128.json b/doc/modules/ROOT/data/benchmarks-linux-x86/i128.json index bbe3917f..cea3768f 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-x86/i128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-x86/i128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "int128_t", + "type": "int128", "sign": "i128", "os": "linux", "arch": "x86", @@ -8,136 +8,136 @@ "cxxstd": 202002, "elements": 10000000, "repetitions": 5, - "baseline": "boost::mp::int128_t", - "implementations": ["int128_t", "boost::mp::int128_t"], + "baseline": "boost::mp::int128", + "implementations": ["int128", "boost::mp::int128"], "results": [ - {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 206732}, - {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 201844}, - {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 238905}, - {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 241413}, - {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 239626}, - {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 259249}, - {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1388042}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 250645}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 264995}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 308256}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 265899}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 254326}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 247423}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1591746}, - {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 190304}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 793455}, - {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 194264}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1109671}, - {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 207054}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1623280}, - {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1803776}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1730520}, - {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1961114}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2005625}, - {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 1945944}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 5605530}, - {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 1172449}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 1724061}, - {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 160497}, - {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 163099}, - {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 201509}, - {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 208734}, - {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 228393}, - {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 245318}, - {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1207756}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 239353}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 247143}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 247898}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 250834}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 251459}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 255974}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1492872}, - {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 193624}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 854728}, - {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 209357}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 942925}, - {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 213098}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1217478}, - {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 1041397}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1419785}, - {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 852671}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1179562}, - {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 187811}, - {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 189702}, - {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 224110}, - {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 227138}, - {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 209343}, - {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 214176}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1252469}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 178974}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 178545}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 175817}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 178681}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 177141}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 182037}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1071359}, - {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 148169}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1006479}, - {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 150980}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1055332}, - {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 187906}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1409860}, - {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 1473828}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 3130361}, - {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1520415}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2966092}, - {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 198033}, - {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 190608}, - {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 223712}, - {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 234831}, - {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 255021}, - {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 258814}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1361237}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 235036}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 242531}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 237766}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 232575}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 221998}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 230367}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1400470}, - {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 177107}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 999331}, - {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 150235}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1052818}, - {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 162625}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1406308}, - {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1474105}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 3139189}, - {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1521882}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2965033}, - {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 259046}, - {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 255796}, - {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 320994}, - {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 321884}, - {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 322941}, - {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 322447}, - {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1803323}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 358685}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 350283}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 368821}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 369128}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 358482}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 360790}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2166376}, - {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 159907}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1198244}, - {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 178360}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1416733}, - {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 213890}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1726368}, - {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 1711915}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2680645}, - {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 1706134}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2539888}, - {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 359283}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 1508102}, - {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 431065}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 935102} + {"group": "two_word", "operation": "eq", "implementation": "int128", "microseconds": 206732}, + {"group": "two_word", "operation": "ne", "implementation": "int128", "microseconds": 201844}, + {"group": "two_word", "operation": "lt", "implementation": "int128", "microseconds": 238905}, + {"group": "two_word", "operation": "le", "implementation": "int128", "microseconds": 241413}, + {"group": "two_word", "operation": "gt", "implementation": "int128", "microseconds": 239626}, + {"group": "two_word", "operation": "ge", "implementation": "int128", "microseconds": 259249}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 1388042}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 250645}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 264995}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 308256}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 265899}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 254326}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 247423}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1591746}, + {"group": "two_word", "operation": "add", "implementation": "int128", "microseconds": 190304}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 793455}, + {"group": "two_word", "operation": "sub", "implementation": "int128", "microseconds": 194264}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1109671}, + {"group": "two_word", "operation": "mul", "implementation": "int128", "microseconds": 207054}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1623280}, + {"group": "two_word", "operation": "div", "implementation": "int128", "microseconds": 1803776}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 1730520}, + {"group": "two_word", "operation": "mod", "implementation": "int128", "microseconds": 1961114}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 2005625}, + {"group": "two_word", "operation": "div64", "implementation": "int128", "microseconds": 1945944}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128", "microseconds": 5605530}, + {"group": "two_word", "operation": "div32", "implementation": "int128", "microseconds": 1172449}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128", "microseconds": 1724061}, + {"group": "one_word", "operation": "eq", "implementation": "int128", "microseconds": 160497}, + {"group": "one_word", "operation": "ne", "implementation": "int128", "microseconds": 163099}, + {"group": "one_word", "operation": "lt", "implementation": "int128", "microseconds": 201509}, + {"group": "one_word", "operation": "le", "implementation": "int128", "microseconds": 208734}, + {"group": "one_word", "operation": "gt", "implementation": "int128", "microseconds": 228393}, + {"group": "one_word", "operation": "ge", "implementation": "int128", "microseconds": 245318}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 1207756}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 239353}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 247143}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 247898}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 250834}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 251459}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 255974}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1492872}, + {"group": "one_word", "operation": "add", "implementation": "int128", "microseconds": 193624}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 854728}, + {"group": "one_word", "operation": "sub", "implementation": "int128", "microseconds": 209357}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 942925}, + {"group": "one_word", "operation": "mul", "implementation": "int128", "microseconds": 213098}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1217478}, + {"group": "one_word", "operation": "div", "implementation": "int128", "microseconds": 1041397}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 1419785}, + {"group": "one_word", "operation": "mod", "implementation": "int128", "microseconds": 852671}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 1179562}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128", "microseconds": 187811}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128", "microseconds": 189702}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128", "microseconds": 224110}, + {"group": "two_one_word", "operation": "le", "implementation": "int128", "microseconds": 227138}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128", "microseconds": 209343}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128", "microseconds": 214176}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 1252469}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 178974}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 178545}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 175817}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 178681}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 177141}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 182037}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1071359}, + {"group": "two_one_word", "operation": "add", "implementation": "int128", "microseconds": 148169}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1006479}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128", "microseconds": 150980}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1055332}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128", "microseconds": 187906}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1409860}, + {"group": "two_one_word", "operation": "div", "implementation": "int128", "microseconds": 1473828}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 3130361}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128", "microseconds": 1520415}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 2966092}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128", "microseconds": 198033}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128", "microseconds": 190608}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128", "microseconds": 223712}, + {"group": "one_two_word", "operation": "le", "implementation": "int128", "microseconds": 234831}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128", "microseconds": 255021}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128", "microseconds": 258814}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 1361237}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 235036}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 242531}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 237766}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 232575}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 221998}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 230367}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1400470}, + {"group": "one_two_word", "operation": "add", "implementation": "int128", "microseconds": 177107}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 999331}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128", "microseconds": 150235}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1052818}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128", "microseconds": 162625}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1406308}, + {"group": "one_two_word", "operation": "div", "implementation": "int128", "microseconds": 1474105}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 3139189}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128", "microseconds": 1521882}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 2965033}, + {"group": "random_width", "operation": "eq", "implementation": "int128", "microseconds": 259046}, + {"group": "random_width", "operation": "ne", "implementation": "int128", "microseconds": 255796}, + {"group": "random_width", "operation": "lt", "implementation": "int128", "microseconds": 320994}, + {"group": "random_width", "operation": "le", "implementation": "int128", "microseconds": 321884}, + {"group": "random_width", "operation": "gt", "implementation": "int128", "microseconds": 322941}, + {"group": "random_width", "operation": "ge", "implementation": "int128", "microseconds": 322447}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128", "microseconds": 1803323}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 358685}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 350283}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 368821}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 369128}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 358482}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 360790}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 2166376}, + {"group": "random_width", "operation": "add", "implementation": "int128", "microseconds": 159907}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1198244}, + {"group": "random_width", "operation": "sub", "implementation": "int128", "microseconds": 178360}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1416733}, + {"group": "random_width", "operation": "mul", "implementation": "int128", "microseconds": 213890}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1726368}, + {"group": "random_width", "operation": "div", "implementation": "int128", "microseconds": 1711915}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 2680645}, + {"group": "random_width", "operation": "mod", "implementation": "int128", "microseconds": 1706134}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 2539888}, + {"group": "random_width", "operation": "shl", "implementation": "int128", "microseconds": 359283}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128", "microseconds": 1508102}, + {"group": "random_width", "operation": "shr", "implementation": "int128", "microseconds": 431065}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128", "microseconds": 935102} ] } diff --git a/doc/modules/ROOT/data/benchmarks-linux-x86/u128.json b/doc/modules/ROOT/data/benchmarks-linux-x86/u128.json index 4abaa6d4..47aca8c6 100644 --- a/doc/modules/ROOT/data/benchmarks-linux-x86/u128.json +++ b/doc/modules/ROOT/data/benchmarks-linux-x86/u128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "uint128_t", + "type": "uint128", "sign": "u128", "os": "linux", "arch": "x86", @@ -8,142 +8,142 @@ "cxxstd": 202002, "elements": 10000000, "repetitions": 5, - "baseline": "boost::mp::uint128_t", - "implementations": ["uint128_t", "boost::mp::uint128_t"], + "baseline": "boost::mp::uint128", + "implementations": ["uint128", "boost::mp::uint128"], "results": [ - {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 200888}, - {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 193692}, - {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 222158}, - {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 227645}, - {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 227519}, - {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 222873}, - {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1295053}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 233110}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 246585}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 245769}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 240565}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 247803}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 237422}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1451483}, - {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 197949}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 699561}, - {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 208011}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 828979}, - {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 216433}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1278542}, - {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1539923}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1667096}, - {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1636958}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1669997}, - {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 2126752}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 5883895}, - {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 1342484}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 1636937}, - {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 172764}, - {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 165836}, - {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 192707}, - {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 196071}, - {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 194572}, - {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 230567}, - {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1152736}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 226080}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 239707}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 238034}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 239073}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 246198}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 239121}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1428414}, - {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 196541}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 675613}, - {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 202223}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 819395}, - {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 222406}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 890098}, - {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 896995}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1367415}, - {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 747721}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1099155}, - {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 198664}, - {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 193669}, - {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 225050}, - {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 215438}, - {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 220471}, - {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 223561}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1277090}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 237101}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 238512}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 233937}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 235274}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 240901}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 234252}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1420194}, - {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 199771}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 820305}, - {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 153948}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 912704}, - {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 164921}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1072714}, - {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1511993}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 3281900}, - {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1501929}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 3081208}, - {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 198420}, - {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 195319}, - {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 221136}, - {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 228299}, - {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 225206}, - {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 213353}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1281946}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 231322}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 230158}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 241217}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 252128}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 242163}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 236963}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1434172}, - {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 191943}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 858000}, - {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 199164}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 928124}, - {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 210911}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1182181}, - {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1507080}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 3274762}, - {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1493873}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 3079699}, - {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 262905}, - {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 264109}, - {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 400115}, - {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 384551}, - {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 402552}, - {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 397861}, - {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 2112319}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 284531}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 289013}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 276892}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 250781}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 229823}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 237304}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1568536}, - {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 143659}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1144222}, - {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 156320}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1382478}, - {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 203481}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1221882}, - {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 1558822}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2170543}, - {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 1526280}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1873501}, - {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 373576}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 1471433}, - {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 461914}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 788282}, - {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 140836}, - {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 1000528}, - {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 141054}, - {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 799976}, - {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 142252}, - {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 804843} + {"group": "two_word", "operation": "eq", "implementation": "uint128", "microseconds": 200888}, + {"group": "two_word", "operation": "ne", "implementation": "uint128", "microseconds": 193692}, + {"group": "two_word", "operation": "lt", "implementation": "uint128", "microseconds": 222158}, + {"group": "two_word", "operation": "le", "implementation": "uint128", "microseconds": 227645}, + {"group": "two_word", "operation": "gt", "implementation": "uint128", "microseconds": 227519}, + {"group": "two_word", "operation": "ge", "implementation": "uint128", "microseconds": 222873}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 1295053}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 233110}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 246585}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 245769}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 240565}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 247803}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 237422}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1451483}, + {"group": "two_word", "operation": "add", "implementation": "uint128", "microseconds": 197949}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 699561}, + {"group": "two_word", "operation": "sub", "implementation": "uint128", "microseconds": 208011}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 828979}, + {"group": "two_word", "operation": "mul", "implementation": "uint128", "microseconds": 216433}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1278542}, + {"group": "two_word", "operation": "div", "implementation": "uint128", "microseconds": 1539923}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 1667096}, + {"group": "two_word", "operation": "mod", "implementation": "uint128", "microseconds": 1636958}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 1669997}, + {"group": "two_word", "operation": "div64", "implementation": "uint128", "microseconds": 2126752}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128", "microseconds": 5883895}, + {"group": "two_word", "operation": "div32", "implementation": "uint128", "microseconds": 1342484}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128", "microseconds": 1636937}, + {"group": "one_word", "operation": "eq", "implementation": "uint128", "microseconds": 172764}, + {"group": "one_word", "operation": "ne", "implementation": "uint128", "microseconds": 165836}, + {"group": "one_word", "operation": "lt", "implementation": "uint128", "microseconds": 192707}, + {"group": "one_word", "operation": "le", "implementation": "uint128", "microseconds": 196071}, + {"group": "one_word", "operation": "gt", "implementation": "uint128", "microseconds": 194572}, + {"group": "one_word", "operation": "ge", "implementation": "uint128", "microseconds": 230567}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 1152736}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 226080}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 239707}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 238034}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 239073}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 246198}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 239121}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1428414}, + {"group": "one_word", "operation": "add", "implementation": "uint128", "microseconds": 196541}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 675613}, + {"group": "one_word", "operation": "sub", "implementation": "uint128", "microseconds": 202223}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 819395}, + {"group": "one_word", "operation": "mul", "implementation": "uint128", "microseconds": 222406}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 890098}, + {"group": "one_word", "operation": "div", "implementation": "uint128", "microseconds": 896995}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 1367415}, + {"group": "one_word", "operation": "mod", "implementation": "uint128", "microseconds": 747721}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 1099155}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128", "microseconds": 198664}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128", "microseconds": 193669}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128", "microseconds": 225050}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128", "microseconds": 215438}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128", "microseconds": 220471}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128", "microseconds": 223561}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 1277090}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 237101}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 238512}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 233937}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 235274}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 240901}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 234252}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1420194}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128", "microseconds": 199771}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 820305}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128", "microseconds": 153948}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 912704}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128", "microseconds": 164921}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1072714}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128", "microseconds": 1511993}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 3281900}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128", "microseconds": 1501929}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 3081208}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128", "microseconds": 198420}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128", "microseconds": 195319}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128", "microseconds": 221136}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128", "microseconds": 228299}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128", "microseconds": 225206}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128", "microseconds": 213353}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 1281946}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 231322}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 230158}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 241217}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 252128}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 242163}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 236963}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1434172}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128", "microseconds": 191943}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 858000}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128", "microseconds": 199164}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 928124}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128", "microseconds": 210911}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1182181}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128", "microseconds": 1507080}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 3274762}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128", "microseconds": 1493873}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 3079699}, + {"group": "random_width", "operation": "eq", "implementation": "uint128", "microseconds": 262905}, + {"group": "random_width", "operation": "ne", "implementation": "uint128", "microseconds": 264109}, + {"group": "random_width", "operation": "lt", "implementation": "uint128", "microseconds": 400115}, + {"group": "random_width", "operation": "le", "implementation": "uint128", "microseconds": 384551}, + {"group": "random_width", "operation": "gt", "implementation": "uint128", "microseconds": 402552}, + {"group": "random_width", "operation": "ge", "implementation": "uint128", "microseconds": 397861}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128", "microseconds": 2112319}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 284531}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 289013}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 276892}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 250781}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 229823}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 237304}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1568536}, + {"group": "random_width", "operation": "add", "implementation": "uint128", "microseconds": 143659}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1144222}, + {"group": "random_width", "operation": "sub", "implementation": "uint128", "microseconds": 156320}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1382478}, + {"group": "random_width", "operation": "mul", "implementation": "uint128", "microseconds": 203481}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1221882}, + {"group": "random_width", "operation": "div", "implementation": "uint128", "microseconds": 1558822}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 2170543}, + {"group": "random_width", "operation": "mod", "implementation": "uint128", "microseconds": 1526280}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 1873501}, + {"group": "random_width", "operation": "shl", "implementation": "uint128", "microseconds": 373576}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128", "microseconds": 1471433}, + {"group": "random_width", "operation": "shr", "implementation": "uint128", "microseconds": 461914}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128", "microseconds": 788282}, + {"group": "random_width", "operation": "and", "implementation": "uint128", "microseconds": 140836}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128", "microseconds": 1000528}, + {"group": "random_width", "operation": "or", "implementation": "uint128", "microseconds": 141054}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128", "microseconds": 799976}, + {"group": "random_width", "operation": "xor", "implementation": "uint128", "microseconds": 142252}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128", "microseconds": 804843} ] } diff --git a/doc/modules/ROOT/data/benchmarks-macos-arm64/i128.json b/doc/modules/ROOT/data/benchmarks-macos-arm64/i128.json index 905899d6..55ee82a4 100644 --- a/doc/modules/ROOT/data/benchmarks-macos-arm64/i128.json +++ b/doc/modules/ROOT/data/benchmarks-macos-arm64/i128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "int128_t", + "type": "int128", "sign": "i128", "os": "macos", "arch": "ARM64", @@ -9,7 +9,7 @@ "elements": 20000000, "repetitions": 5, "baseline": "__int128", - "implementations": ["__int128", "int128_t", "boost::mp::int128_t", "absl::int128"], + "implementations": ["__int128", "int128", "boost::mp::int128", "absl::int128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "__int128", "microseconds": 73476}, {"group": "two_word", "operation": "ne", "implementation": "__int128", "microseconds": 60101}, @@ -18,20 +18,20 @@ {"group": "two_word", "operation": "gt", "implementation": "__int128", "microseconds": 65278}, {"group": "two_word", "operation": "ge", "implementation": "__int128", "microseconds": 62970}, {"group": "two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 397838}, - {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 103017}, - {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 70747}, - {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 58788}, - {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 68241}, - {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 53835}, - {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 56456}, - {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 411262}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 128842}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 120132}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 166192}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 189449}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 205541}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 160480}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 970791}, + {"group": "two_word", "operation": "eq", "implementation": "int128", "microseconds": 103017}, + {"group": "two_word", "operation": "ne", "implementation": "int128", "microseconds": 70747}, + {"group": "two_word", "operation": "lt", "implementation": "int128", "microseconds": 58788}, + {"group": "two_word", "operation": "le", "implementation": "int128", "microseconds": 68241}, + {"group": "two_word", "operation": "gt", "implementation": "int128", "microseconds": 53835}, + {"group": "two_word", "operation": "ge", "implementation": "int128", "microseconds": 56456}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 411262}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 128842}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 120132}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 166192}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 189449}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 205541}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 160480}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 970791}, {"group": "two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 64809}, {"group": "two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 78086}, {"group": "two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 62129}, @@ -40,32 +40,32 @@ {"group": "two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 63494}, {"group": "two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 401999}, {"group": "two_word", "operation": "add", "implementation": "__int128", "microseconds": 59006}, - {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 73178}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 409567}, + {"group": "two_word", "operation": "add", "implementation": "int128", "microseconds": 73178}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 409567}, {"group": "two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 54699}, {"group": "two_word", "operation": "sub", "implementation": "__int128", "microseconds": 69502}, - {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 57679}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 419699}, + {"group": "two_word", "operation": "sub", "implementation": "int128", "microseconds": 57679}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 419699}, {"group": "two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 63942}, {"group": "two_word", "operation": "mul", "implementation": "__int128", "microseconds": 67404}, - {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 56790}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 205690}, + {"group": "two_word", "operation": "mul", "implementation": "int128", "microseconds": 56790}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 205690}, {"group": "two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 60062}, {"group": "two_word", "operation": "div", "implementation": "__int128", "microseconds": 1149568}, - {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1317759}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1614328}, + {"group": "two_word", "operation": "div", "implementation": "int128", "microseconds": 1317759}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 1614328}, {"group": "two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 1133300}, {"group": "two_word", "operation": "mod", "implementation": "__int128", "microseconds": 1282159}, - {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1470751}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1659016}, + {"group": "two_word", "operation": "mod", "implementation": "int128", "microseconds": 1470751}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 1659016}, {"group": "two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 1251267}, {"group": "two_word", "operation": "div64", "implementation": "__int128", "microseconds": 2229623}, - {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 1954282}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 3286996}, + {"group": "two_word", "operation": "div64", "implementation": "int128", "microseconds": 1954282}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128", "microseconds": 3286996}, {"group": "two_word", "operation": "div64", "implementation": "absl::int128", "microseconds": 2103592}, {"group": "two_word", "operation": "div32", "implementation": "__int128", "microseconds": 938883}, - {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 557681}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 1226292}, + {"group": "two_word", "operation": "div32", "implementation": "int128", "microseconds": 557681}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128", "microseconds": 1226292}, {"group": "two_word", "operation": "div32", "implementation": "absl::int128", "microseconds": 975977}, {"group": "one_word", "operation": "eq", "implementation": "__int128", "microseconds": 77981}, {"group": "one_word", "operation": "ne", "implementation": "__int128", "microseconds": 73126}, @@ -74,20 +74,20 @@ {"group": "one_word", "operation": "gt", "implementation": "__int128", "microseconds": 64805}, {"group": "one_word", "operation": "ge", "implementation": "__int128", "microseconds": 70196}, {"group": "one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 417374}, - {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 110608}, - {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 85577}, - {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 55125}, - {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 61920}, - {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 71874}, - {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 62032}, - {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 447779}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 122345}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 96088}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 198669}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 188831}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 220922}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 172761}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 999828}, + {"group": "one_word", "operation": "eq", "implementation": "int128", "microseconds": 110608}, + {"group": "one_word", "operation": "ne", "implementation": "int128", "microseconds": 85577}, + {"group": "one_word", "operation": "lt", "implementation": "int128", "microseconds": 55125}, + {"group": "one_word", "operation": "le", "implementation": "int128", "microseconds": 61920}, + {"group": "one_word", "operation": "gt", "implementation": "int128", "microseconds": 71874}, + {"group": "one_word", "operation": "ge", "implementation": "int128", "microseconds": 62032}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 447779}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 122345}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 96088}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 198669}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 188831}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 220922}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 172761}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 999828}, {"group": "one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 94704}, {"group": "one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 101422}, {"group": "one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 60831}, @@ -96,24 +96,24 @@ {"group": "one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 73656}, {"group": "one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 456657}, {"group": "one_word", "operation": "add", "implementation": "__int128", "microseconds": 73888}, - {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 56333}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 429181}, + {"group": "one_word", "operation": "add", "implementation": "int128", "microseconds": 56333}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 429181}, {"group": "one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 64790}, {"group": "one_word", "operation": "sub", "implementation": "__int128", "microseconds": 64633}, - {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 59336}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 508577}, + {"group": "one_word", "operation": "sub", "implementation": "int128", "microseconds": 59336}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 508577}, {"group": "one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 65479}, {"group": "one_word", "operation": "mul", "implementation": "__int128", "microseconds": 69670}, - {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 68957}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 255544}, + {"group": "one_word", "operation": "mul", "implementation": "int128", "microseconds": 68957}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 255544}, {"group": "one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 68925}, {"group": "one_word", "operation": "div", "implementation": "__int128", "microseconds": 965857}, - {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 746675}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1248135}, + {"group": "one_word", "operation": "div", "implementation": "int128", "microseconds": 746675}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 1248135}, {"group": "one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 862523}, {"group": "one_word", "operation": "mod", "implementation": "__int128", "microseconds": 941603}, - {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 753248}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1500164}, + {"group": "one_word", "operation": "mod", "implementation": "int128", "microseconds": 753248}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 1500164}, {"group": "one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 945527}, {"group": "two_one_word", "operation": "eq", "implementation": "__int128", "microseconds": 104339}, {"group": "two_one_word", "operation": "ne", "implementation": "__int128", "microseconds": 72673}, @@ -122,20 +122,20 @@ {"group": "two_one_word", "operation": "gt", "implementation": "__int128", "microseconds": 82091}, {"group": "two_one_word", "operation": "ge", "implementation": "__int128", "microseconds": 135785}, {"group": "two_one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 553738}, - {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 97805}, - {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 70456}, - {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 81018}, - {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 64783}, - {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 73920}, - {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 56601}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 444763}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 235336}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 125649}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 158293}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 205007}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 212302}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 147691}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1084599}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128", "microseconds": 97805}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128", "microseconds": 70456}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128", "microseconds": 81018}, + {"group": "two_one_word", "operation": "le", "implementation": "int128", "microseconds": 64783}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128", "microseconds": 73920}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128", "microseconds": 56601}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 444763}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 235336}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 125649}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 158293}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 205007}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 212302}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 147691}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1084599}, {"group": "two_one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 69760}, {"group": "two_one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 58258}, {"group": "two_one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 69526}, @@ -144,24 +144,24 @@ {"group": "two_one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 63410}, {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 430856}, {"group": "two_one_word", "operation": "add", "implementation": "__int128", "microseconds": 98295}, - {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 89001}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 464442}, + {"group": "two_one_word", "operation": "add", "implementation": "int128", "microseconds": 89001}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 464442}, {"group": "two_one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 68244}, {"group": "two_one_word", "operation": "sub", "implementation": "__int128", "microseconds": 61378}, - {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 61834}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 516184}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128", "microseconds": 61834}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 516184}, {"group": "two_one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 70252}, {"group": "two_one_word", "operation": "mul", "implementation": "__int128", "microseconds": 70705}, - {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 77657}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 292257}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128", "microseconds": 77657}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 292257}, {"group": "two_one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 86897}, {"group": "two_one_word", "operation": "div", "implementation": "__int128", "microseconds": 1321540}, - {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 1350442}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1902685}, + {"group": "two_one_word", "operation": "div", "implementation": "int128", "microseconds": 1350442}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 1902685}, {"group": "two_one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 1208431}, {"group": "two_one_word", "operation": "mod", "implementation": "__int128", "microseconds": 1277355}, - {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1223377}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1960399}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128", "microseconds": 1223377}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 1960399}, {"group": "two_one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 1244970}, {"group": "one_two_word", "operation": "eq", "implementation": "__int128", "microseconds": 68344}, {"group": "one_two_word", "operation": "ne", "implementation": "__int128", "microseconds": 63223}, @@ -170,20 +170,20 @@ {"group": "one_two_word", "operation": "gt", "implementation": "__int128", "microseconds": 65436}, {"group": "one_two_word", "operation": "ge", "implementation": "__int128", "microseconds": 60786}, {"group": "one_two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 375394}, - {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 77884}, - {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 60692}, - {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 75333}, - {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 56330}, - {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 47802}, - {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 51713}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 369996}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 212408}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 117919}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 182669}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 186439}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 177522}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 132252}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1009500}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128", "microseconds": 77884}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128", "microseconds": 60692}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128", "microseconds": 75333}, + {"group": "one_two_word", "operation": "le", "implementation": "int128", "microseconds": 56330}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128", "microseconds": 47802}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128", "microseconds": 51713}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 369996}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 212408}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 117919}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 182669}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 186439}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 177522}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 132252}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1009500}, {"group": "one_two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 52820}, {"group": "one_two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 62624}, {"group": "one_two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 55587}, @@ -192,24 +192,24 @@ {"group": "one_two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 71032}, {"group": "one_two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 360174}, {"group": "one_two_word", "operation": "add", "implementation": "__int128", "microseconds": 56406}, - {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 75147}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 428020}, + {"group": "one_two_word", "operation": "add", "implementation": "int128", "microseconds": 75147}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 428020}, {"group": "one_two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 63299}, {"group": "one_two_word", "operation": "sub", "implementation": "__int128", "microseconds": 50998}, - {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 46246}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 456154}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128", "microseconds": 46246}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 456154}, {"group": "one_two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 59507}, {"group": "one_two_word", "operation": "mul", "implementation": "__int128", "microseconds": 54984}, - {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 69009}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 229872}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128", "microseconds": 69009}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 229872}, {"group": "one_two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 75284}, {"group": "one_two_word", "operation": "div", "implementation": "__int128", "microseconds": 1281193}, - {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1365693}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2086751}, + {"group": "one_two_word", "operation": "div", "implementation": "int128", "microseconds": 1365693}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 2086751}, {"group": "one_two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 1279185}, {"group": "one_two_word", "operation": "mod", "implementation": "__int128", "microseconds": 1300703}, - {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1368650}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2005592}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128", "microseconds": 1368650}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 2005592}, {"group": "one_two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 1307973}, {"group": "random_width", "operation": "eq", "implementation": "__int128", "microseconds": 71421}, {"group": "random_width", "operation": "ne", "implementation": "__int128", "microseconds": 63788}, @@ -218,20 +218,20 @@ {"group": "random_width", "operation": "gt", "implementation": "__int128", "microseconds": 137680}, {"group": "random_width", "operation": "ge", "implementation": "__int128", "microseconds": 66115}, {"group": "random_width", "operation": "comparisons", "implementation": "__int128", "microseconds": 479219}, - {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 68982}, - {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 58046}, - {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 57557}, - {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 67658}, - {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 53944}, - {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 51777}, - {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 358275}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 137971}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 117750}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 165821}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 197630}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 257801}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 157725}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1035078}, + {"group": "random_width", "operation": "eq", "implementation": "int128", "microseconds": 68982}, + {"group": "random_width", "operation": "ne", "implementation": "int128", "microseconds": 58046}, + {"group": "random_width", "operation": "lt", "implementation": "int128", "microseconds": 57557}, + {"group": "random_width", "operation": "le", "implementation": "int128", "microseconds": 67658}, + {"group": "random_width", "operation": "gt", "implementation": "int128", "microseconds": 53944}, + {"group": "random_width", "operation": "ge", "implementation": "int128", "microseconds": 51777}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128", "microseconds": 358275}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 137971}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 117750}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 165821}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 197630}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 257801}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 157725}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1035078}, {"group": "random_width", "operation": "eq", "implementation": "absl::int128", "microseconds": 82748}, {"group": "random_width", "operation": "ne", "implementation": "absl::int128", "microseconds": 66609}, {"group": "random_width", "operation": "lt", "implementation": "absl::int128", "microseconds": 66824}, @@ -240,32 +240,32 @@ {"group": "random_width", "operation": "ge", "implementation": "absl::int128", "microseconds": 54727}, {"group": "random_width", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 405457}, {"group": "random_width", "operation": "add", "implementation": "__int128", "microseconds": 152489}, - {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 90873}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 444144}, + {"group": "random_width", "operation": "add", "implementation": "int128", "microseconds": 90873}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 444144}, {"group": "random_width", "operation": "add", "implementation": "absl::int128", "microseconds": 72358}, {"group": "random_width", "operation": "sub", "implementation": "__int128", "microseconds": 51306}, - {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 75991}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 383429}, + {"group": "random_width", "operation": "sub", "implementation": "int128", "microseconds": 75991}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 383429}, {"group": "random_width", "operation": "sub", "implementation": "absl::int128", "microseconds": 87675}, {"group": "random_width", "operation": "mul", "implementation": "__int128", "microseconds": 60826}, - {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 49480}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 205901}, + {"group": "random_width", "operation": "mul", "implementation": "int128", "microseconds": 49480}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 205901}, {"group": "random_width", "operation": "mul", "implementation": "absl::int128", "microseconds": 64798}, {"group": "random_width", "operation": "div", "implementation": "__int128", "microseconds": 1363999}, - {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 1378656}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1893255}, + {"group": "random_width", "operation": "div", "implementation": "int128", "microseconds": 1378656}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 1893255}, {"group": "random_width", "operation": "div", "implementation": "absl::int128", "microseconds": 1372411}, {"group": "random_width", "operation": "mod", "implementation": "__int128", "microseconds": 1534656}, - {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 1435001}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2223197}, + {"group": "random_width", "operation": "mod", "implementation": "int128", "microseconds": 1435001}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 2223197}, {"group": "random_width", "operation": "mod", "implementation": "absl::int128", "microseconds": 1490100}, {"group": "random_width", "operation": "shl", "implementation": "__int128", "microseconds": 199478}, - {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 139037}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 506876}, + {"group": "random_width", "operation": "shl", "implementation": "int128", "microseconds": 139037}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128", "microseconds": 506876}, {"group": "random_width", "operation": "shl", "implementation": "absl::int128", "microseconds": 110991}, {"group": "random_width", "operation": "shr", "implementation": "__int128", "microseconds": 130830}, - {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 109148}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 720869}, + {"group": "random_width", "operation": "shr", "implementation": "int128", "microseconds": 109148}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128", "microseconds": 720869}, {"group": "random_width", "operation": "shr", "implementation": "absl::int128", "microseconds": 104365} ] } diff --git a/doc/modules/ROOT/data/benchmarks-macos-arm64/u128.json b/doc/modules/ROOT/data/benchmarks-macos-arm64/u128.json index 1a2e37b8..33165d7a 100644 --- a/doc/modules/ROOT/data/benchmarks-macos-arm64/u128.json +++ b/doc/modules/ROOT/data/benchmarks-macos-arm64/u128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "uint128_t", + "type": "uint128", "sign": "u128", "os": "macos", "arch": "ARM64", @@ -9,7 +9,7 @@ "elements": 20000000, "repetitions": 5, "baseline": "unsigned __int128", - "implementations": ["unsigned __int128", "uint128_t", "boost::mp::uint128_t", "absl::uint128"], + "implementations": ["unsigned __int128", "uint128", "boost::mp::uint128", "absl::uint128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 60786}, {"group": "two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 64443}, @@ -18,20 +18,20 @@ {"group": "two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 66152}, {"group": "two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 69586}, {"group": "two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 409438}, - {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 81896}, - {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 84114}, - {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 64131}, - {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 52577}, - {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 66351}, - {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 66535}, - {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 415911}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 56559}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 67889}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 66209}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 56444}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 66846}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 62253}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 376387}, + {"group": "two_word", "operation": "eq", "implementation": "uint128", "microseconds": 81896}, + {"group": "two_word", "operation": "ne", "implementation": "uint128", "microseconds": 84114}, + {"group": "two_word", "operation": "lt", "implementation": "uint128", "microseconds": 64131}, + {"group": "two_word", "operation": "le", "implementation": "uint128", "microseconds": 52577}, + {"group": "two_word", "operation": "gt", "implementation": "uint128", "microseconds": 66351}, + {"group": "two_word", "operation": "ge", "implementation": "uint128", "microseconds": 66535}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 415911}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 56559}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 67889}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 66209}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 56444}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 66846}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 62253}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 376387}, {"group": "two_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 76463}, {"group": "two_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 65337}, {"group": "two_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 63150}, @@ -40,32 +40,32 @@ {"group": "two_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 63335}, {"group": "two_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 405580}, {"group": "two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 55684}, - {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 67332}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 54281}, + {"group": "two_word", "operation": "add", "implementation": "uint128", "microseconds": 67332}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 54281}, {"group": "two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 52733}, {"group": "two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 76469}, - {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 60012}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 46709}, + {"group": "two_word", "operation": "sub", "implementation": "uint128", "microseconds": 60012}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 46709}, {"group": "two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 61725}, {"group": "two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 47658}, - {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 40978}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 53387}, + {"group": "two_word", "operation": "mul", "implementation": "uint128", "microseconds": 40978}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 53387}, {"group": "two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 55605}, {"group": "two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 958627}, - {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1154465}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1436461}, + {"group": "two_word", "operation": "div", "implementation": "uint128", "microseconds": 1154465}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 1436461}, {"group": "two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 990067}, {"group": "two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 1007225}, - {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1163413}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1474333}, + {"group": "two_word", "operation": "mod", "implementation": "uint128", "microseconds": 1163413}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 1474333}, {"group": "two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 1029152}, {"group": "two_word", "operation": "div64", "implementation": "unsigned __int128", "microseconds": 2060983}, - {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 1916412}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 2646237}, + {"group": "two_word", "operation": "div64", "implementation": "uint128", "microseconds": 1916412}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128", "microseconds": 2646237}, {"group": "two_word", "operation": "div64", "implementation": "absl::uint128", "microseconds": 2106147}, {"group": "two_word", "operation": "div32", "implementation": "unsigned __int128", "microseconds": 616506}, - {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 438747}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 778995}, + {"group": "two_word", "operation": "div32", "implementation": "uint128", "microseconds": 438747}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128", "microseconds": 778995}, {"group": "two_word", "operation": "div32", "implementation": "absl::uint128", "microseconds": 557879}, {"group": "one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 52857}, {"group": "one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 52457}, @@ -74,20 +74,20 @@ {"group": "one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 55680}, {"group": "one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 62266}, {"group": "one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 341774}, - {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 58885}, - {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 59616}, - {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 56870}, - {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 53502}, - {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 56789}, - {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 59089}, - {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 345001}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 62430}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 56342}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 121429}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 82364}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 85422}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 59900}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 468231}, + {"group": "one_word", "operation": "eq", "implementation": "uint128", "microseconds": 58885}, + {"group": "one_word", "operation": "ne", "implementation": "uint128", "microseconds": 59616}, + {"group": "one_word", "operation": "lt", "implementation": "uint128", "microseconds": 56870}, + {"group": "one_word", "operation": "le", "implementation": "uint128", "microseconds": 53502}, + {"group": "one_word", "operation": "gt", "implementation": "uint128", "microseconds": 56789}, + {"group": "one_word", "operation": "ge", "implementation": "uint128", "microseconds": 59089}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 345001}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 62430}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 56342}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 121429}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 82364}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 85422}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 59900}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 468231}, {"group": "one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 67989}, {"group": "one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 90690}, {"group": "one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 74748}, @@ -96,24 +96,24 @@ {"group": "one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 63930}, {"group": "one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 418876}, {"group": "one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 76376}, - {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 49947}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 55011}, + {"group": "one_word", "operation": "add", "implementation": "uint128", "microseconds": 49947}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 55011}, {"group": "one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 66672}, {"group": "one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 63359}, - {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 49234}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 69777}, + {"group": "one_word", "operation": "sub", "implementation": "uint128", "microseconds": 49234}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 69777}, {"group": "one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 70446}, {"group": "one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 60872}, - {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 56277}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 56845}, + {"group": "one_word", "operation": "mul", "implementation": "uint128", "microseconds": 56277}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 56845}, {"group": "one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 50889}, {"group": "one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 688937}, - {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 548323}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1093889}, + {"group": "one_word", "operation": "div", "implementation": "uint128", "microseconds": 548323}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 1093889}, {"group": "one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 667721}, {"group": "one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 663412}, - {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 491001}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 950134}, + {"group": "one_word", "operation": "mod", "implementation": "uint128", "microseconds": 491001}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 950134}, {"group": "two_one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 54976}, {"group": "two_one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 63214}, {"group": "two_one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 68055}, @@ -121,20 +121,20 @@ {"group": "two_one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 63111}, {"group": "two_one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 73310}, {"group": "two_one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 394640}, - {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 86933}, - {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 56313}, - {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 59658}, - {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 57797}, - {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 53082}, - {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 50804}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 364924}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 76026}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 57338}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 51297}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 60913}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 59118}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 57931}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 362816}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128", "microseconds": 86933}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128", "microseconds": 56313}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128", "microseconds": 59658}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128", "microseconds": 57797}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128", "microseconds": 53082}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128", "microseconds": 50804}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 364924}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 76026}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 57338}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 51297}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 60913}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 59118}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 57931}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 362816}, {"group": "two_one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 69930}, {"group": "two_one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 53263}, {"group": "two_one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 47902}, @@ -143,24 +143,24 @@ {"group": "two_one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 51172}, {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 349631}, {"group": "two_one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 45930}, - {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 45229}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 45220}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128", "microseconds": 45229}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 45220}, {"group": "two_one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 46222}, {"group": "two_one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 52292}, - {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 48065}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 49447}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128", "microseconds": 48065}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 49447}, {"group": "two_one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 60147}, {"group": "two_one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 49595}, - {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 65067}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 62332}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128", "microseconds": 65067}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 62332}, {"group": "two_one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 56557}, {"group": "two_one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 1137959}, - {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1222870}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1717067}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128", "microseconds": 1222870}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 1717067}, {"group": "two_one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 1271174}, {"group": "two_one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 1334879}, - {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1188264}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1764790}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128", "microseconds": 1188264}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 1764790}, {"group": "two_one_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 1343218}, {"group": "one_two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 76885}, {"group": "one_two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 67424}, @@ -169,39 +169,39 @@ {"group": "one_two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 57997}, {"group": "one_two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 62133}, {"group": "one_two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 434712}, - {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 80623}, - {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 66188}, - {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 67302}, - {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 62479}, - {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 65322}, - {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 69813}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 411943}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 52093}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 57838}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 54105}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 55315}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 68877}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 66885}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 355334}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128", "microseconds": 80623}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128", "microseconds": 66188}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128", "microseconds": 67302}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128", "microseconds": 62479}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128", "microseconds": 65322}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128", "microseconds": 69813}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 411943}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 52093}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 57838}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 54105}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 55315}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 68877}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 66885}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 355334}, {"group": "one_two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 58536}, - {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 77709}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 55825}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128", "microseconds": 77709}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 55825}, {"group": "one_two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 52110}, {"group": "one_two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 71027}, - {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 61288}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 51859}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128", "microseconds": 61288}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 51859}, {"group": "one_two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 57252}, {"group": "one_two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53122}, - {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 69045}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 46087}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128", "microseconds": 69045}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 46087}, {"group": "one_two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 56764}, {"group": "one_two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 1296994}, - {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1109370}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1578808}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128", "microseconds": 1109370}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 1578808}, {"group": "one_two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 1196651}, {"group": "one_two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 1302309}, - {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1134083}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1623809}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128", "microseconds": 1134083}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 1623809}, {"group": "one_two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 1262976}, {"group": "random_width", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 73300}, {"group": "random_width", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 51536}, @@ -210,20 +210,20 @@ {"group": "random_width", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 56088}, {"group": "random_width", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 62242}, {"group": "random_width", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 363881}, - {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 52898}, - {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 61077}, - {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 61663}, - {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 53087}, - {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 58924}, - {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 63455}, - {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 351327}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 60823}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 64153}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 60861}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 61569}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 77590}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 77781}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 403043}, + {"group": "random_width", "operation": "eq", "implementation": "uint128", "microseconds": 52898}, + {"group": "random_width", "operation": "ne", "implementation": "uint128", "microseconds": 61077}, + {"group": "random_width", "operation": "lt", "implementation": "uint128", "microseconds": 61663}, + {"group": "random_width", "operation": "le", "implementation": "uint128", "microseconds": 53087}, + {"group": "random_width", "operation": "gt", "implementation": "uint128", "microseconds": 58924}, + {"group": "random_width", "operation": "ge", "implementation": "uint128", "microseconds": 63455}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128", "microseconds": 351327}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 60823}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 64153}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 60861}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 61569}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 77590}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 77781}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 403043}, {"group": "random_width", "operation": "eq", "implementation": "absl::uint128", "microseconds": 54777}, {"group": "random_width", "operation": "ne", "implementation": "absl::uint128", "microseconds": 73326}, {"group": "random_width", "operation": "lt", "implementation": "absl::uint128", "microseconds": 64262}, @@ -232,44 +232,44 @@ {"group": "random_width", "operation": "ge", "implementation": "absl::uint128", "microseconds": 57035}, {"group": "random_width", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 373414}, {"group": "random_width", "operation": "add", "implementation": "unsigned __int128", "microseconds": 67797}, - {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 58792}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 64948}, + {"group": "random_width", "operation": "add", "implementation": "uint128", "microseconds": 58792}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 64948}, {"group": "random_width", "operation": "add", "implementation": "absl::uint128", "microseconds": 53003}, {"group": "random_width", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 49226}, - {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 45231}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 63076}, + {"group": "random_width", "operation": "sub", "implementation": "uint128", "microseconds": 45231}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 63076}, {"group": "random_width", "operation": "sub", "implementation": "absl::uint128", "microseconds": 67021}, {"group": "random_width", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 68952}, - {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 54470}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 64614}, + {"group": "random_width", "operation": "mul", "implementation": "uint128", "microseconds": 54470}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 64614}, {"group": "random_width", "operation": "mul", "implementation": "absl::uint128", "microseconds": 59419}, {"group": "random_width", "operation": "div", "implementation": "unsigned __int128", "microseconds": 1400576}, - {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 1477954}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1752490}, + {"group": "random_width", "operation": "div", "implementation": "uint128", "microseconds": 1477954}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 1752490}, {"group": "random_width", "operation": "div", "implementation": "absl::uint128", "microseconds": 1315311}, {"group": "random_width", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 1376647}, - {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 1462446}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2062026}, + {"group": "random_width", "operation": "mod", "implementation": "uint128", "microseconds": 1462446}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 2062026}, {"group": "random_width", "operation": "mod", "implementation": "absl::uint128", "microseconds": 1672512}, {"group": "random_width", "operation": "shl", "implementation": "unsigned __int128", "microseconds": 436660}, - {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 132331}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 118733}, + {"group": "random_width", "operation": "shl", "implementation": "uint128", "microseconds": 132331}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128", "microseconds": 118733}, {"group": "random_width", "operation": "shl", "implementation": "absl::uint128", "microseconds": 84840}, {"group": "random_width", "operation": "shr", "implementation": "unsigned __int128", "microseconds": 136232}, - {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 121592}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 143771}, + {"group": "random_width", "operation": "shr", "implementation": "uint128", "microseconds": 121592}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128", "microseconds": 143771}, {"group": "random_width", "operation": "shr", "implementation": "absl::uint128", "microseconds": 80725}, {"group": "random_width", "operation": "and", "implementation": "unsigned __int128", "microseconds": 46467}, - {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 59021}, - {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 52932}, + {"group": "random_width", "operation": "and", "implementation": "uint128", "microseconds": 59021}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128", "microseconds": 52932}, {"group": "random_width", "operation": "and", "implementation": "absl::uint128", "microseconds": 53076}, {"group": "random_width", "operation": "or", "implementation": "unsigned __int128", "microseconds": 51337}, - {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 54828}, - {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 54796}, + {"group": "random_width", "operation": "or", "implementation": "uint128", "microseconds": 54828}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128", "microseconds": 54796}, {"group": "random_width", "operation": "or", "implementation": "absl::uint128", "microseconds": 58223}, {"group": "random_width", "operation": "xor", "implementation": "unsigned __int128", "microseconds": 59883}, - {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 50005}, - {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 44337}, + {"group": "random_width", "operation": "xor", "implementation": "uint128", "microseconds": 50005}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128", "microseconds": 44337}, {"group": "random_width", "operation": "xor", "implementation": "absl::uint128", "microseconds": 49840} ] } diff --git a/doc/modules/ROOT/data/benchmarks-windows-arm64/i128.json b/doc/modules/ROOT/data/benchmarks-windows-arm64/i128.json index af9759a9..ab57c75b 100644 --- a/doc/modules/ROOT/data/benchmarks-windows-arm64/i128.json +++ b/doc/modules/ROOT/data/benchmarks-windows-arm64/i128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "int128_t", + "type": "int128", "sign": "i128", "os": "windows", "arch": "ARM64", @@ -9,7 +9,7 @@ "elements": 20000000, "repetitions": 5, "baseline": "std::_Signed128", - "implementations": ["std::_Signed128", "int128_t", "boost::mp::int128_t"], + "implementations": ["std::_Signed128", "int128", "boost::mp::int128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 100222}, {"group": "two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 108474}, @@ -18,41 +18,41 @@ {"group": "two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 116926}, {"group": "two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 120792}, {"group": "two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 670574}, - {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 97530}, - {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 103068}, - {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 104838}, - {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 108207}, - {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 113598}, - {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 114446}, - {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 642081}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 207652}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 262103}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 489455}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 493449}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 490611}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 477418}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2421071}, + {"group": "two_word", "operation": "eq", "implementation": "int128", "microseconds": 97530}, + {"group": "two_word", "operation": "ne", "implementation": "int128", "microseconds": 103068}, + {"group": "two_word", "operation": "lt", "implementation": "int128", "microseconds": 104838}, + {"group": "two_word", "operation": "le", "implementation": "int128", "microseconds": 108207}, + {"group": "two_word", "operation": "gt", "implementation": "int128", "microseconds": 113598}, + {"group": "two_word", "operation": "ge", "implementation": "int128", "microseconds": 114446}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 642081}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 207652}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 262103}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 489455}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 493449}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 490611}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 477418}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 2421071}, {"group": "two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 87229}, - {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 88643}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1318976}, + {"group": "two_word", "operation": "add", "implementation": "int128", "microseconds": 88643}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1318976}, {"group": "two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 85935}, - {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 86270}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1674347}, + {"group": "two_word", "operation": "sub", "implementation": "int128", "microseconds": 86270}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1674347}, {"group": "two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 506067}, - {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 82019}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2455795}, + {"group": "two_word", "operation": "mul", "implementation": "int128", "microseconds": 82019}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 2455795}, {"group": "two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1026881}, - {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1307573}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2551063}, + {"group": "two_word", "operation": "div", "implementation": "int128", "microseconds": 1307573}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 2551063}, {"group": "two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1286303}, - {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1446105}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2792552}, + {"group": "two_word", "operation": "mod", "implementation": "int128", "microseconds": 1446105}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 2792552}, {"group": "two_word", "operation": "div64", "implementation": "std::_Signed128", "microseconds": 2761992}, - {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 1577765}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 8520176}, + {"group": "two_word", "operation": "div64", "implementation": "int128", "microseconds": 1577765}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128", "microseconds": 8520176}, {"group": "two_word", "operation": "div32", "implementation": "std::_Signed128", "microseconds": 1131440}, - {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 1183154}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 3675370}, + {"group": "two_word", "operation": "div32", "implementation": "int128", "microseconds": 1183154}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128", "microseconds": 3675370}, {"group": "one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 97330}, {"group": "one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 98554}, {"group": "one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 136462}, @@ -60,35 +60,35 @@ {"group": "one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 144510}, {"group": "one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 148576}, {"group": "one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 772965}, - {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 92953}, - {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 104822}, - {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 135547}, - {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 130967}, - {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 135904}, - {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 136383}, - {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 736968}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 209855}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 257388}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 491415}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 493472}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 489518}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 476588}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2418595}, + {"group": "one_word", "operation": "eq", "implementation": "int128", "microseconds": 92953}, + {"group": "one_word", "operation": "ne", "implementation": "int128", "microseconds": 104822}, + {"group": "one_word", "operation": "lt", "implementation": "int128", "microseconds": 135547}, + {"group": "one_word", "operation": "le", "implementation": "int128", "microseconds": 130967}, + {"group": "one_word", "operation": "gt", "implementation": "int128", "microseconds": 135904}, + {"group": "one_word", "operation": "ge", "implementation": "int128", "microseconds": 136383}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 736968}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 209855}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 257388}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 491415}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 493472}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 489518}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 476588}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 2418595}, {"group": "one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 86251}, - {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 86666}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1345155}, + {"group": "one_word", "operation": "add", "implementation": "int128", "microseconds": 86666}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1345155}, {"group": "one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 86212}, - {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 86134}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1404998}, + {"group": "one_word", "operation": "sub", "implementation": "int128", "microseconds": 86134}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1404998}, {"group": "one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 505621}, - {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 81402}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1905949}, + {"group": "one_word", "operation": "mul", "implementation": "int128", "microseconds": 81402}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1905949}, {"group": "one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 462091}, - {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 838271}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1434688}, + {"group": "one_word", "operation": "div", "implementation": "int128", "microseconds": 838271}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 1434688}, {"group": "one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 744522}, - {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 880466}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1513323}, + {"group": "one_word", "operation": "mod", "implementation": "int128", "microseconds": 880466}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 1513323}, {"group": "two_one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 102044}, {"group": "two_one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 100393}, {"group": "two_one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 98887}, @@ -96,35 +96,35 @@ {"group": "two_one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 119721}, {"group": "two_one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 119709}, {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 659718}, - {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 92176}, - {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 97987}, - {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 108773}, - {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 112245}, - {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 113307}, - {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 109162}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 633970}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 176063}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 196559}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 247440}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 246920}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 244052}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 241320}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1352750}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128", "microseconds": 92176}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128", "microseconds": 97987}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128", "microseconds": 108773}, + {"group": "two_one_word", "operation": "le", "implementation": "int128", "microseconds": 112245}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128", "microseconds": 113307}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128", "microseconds": 109162}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 633970}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 176063}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 196559}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 247440}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 246920}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 244052}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 241320}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1352750}, {"group": "two_one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 89432}, - {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 84833}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1472602}, + {"group": "two_one_word", "operation": "add", "implementation": "int128", "microseconds": 84833}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1472602}, {"group": "two_one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 88620}, - {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 85499}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1516699}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128", "microseconds": 85499}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1516699}, {"group": "two_one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 506083}, - {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 80945}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2167853}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128", "microseconds": 80945}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 2167853}, {"group": "two_one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1768555}, - {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 1531715}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 4677254}, + {"group": "two_one_word", "operation": "div", "implementation": "int128", "microseconds": 1531715}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 4677254}, {"group": "two_one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 2184443}, - {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1509547}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 4432211}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128", "microseconds": 1509547}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 4432211}, {"group": "one_two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 100596}, {"group": "one_two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 104724}, {"group": "one_two_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 99626}, @@ -132,35 +132,35 @@ {"group": "one_two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 118222}, {"group": "one_two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 121375}, {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 662639}, - {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 96091}, - {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 98817}, - {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 104346}, - {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 113204}, - {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 113908}, - {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 111725}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 638399}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 175174}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 192445}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 248600}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 248641}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 244903}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 245032}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1355159}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128", "microseconds": 96091}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128", "microseconds": 98817}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128", "microseconds": 104346}, + {"group": "one_two_word", "operation": "le", "implementation": "int128", "microseconds": 113204}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128", "microseconds": 113908}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128", "microseconds": 111725}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 638399}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 175174}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 192445}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 248600}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 248641}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 244903}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 245032}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1355159}, {"group": "one_two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 89500}, - {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 84797}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1471006}, + {"group": "one_two_word", "operation": "add", "implementation": "int128", "microseconds": 84797}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1471006}, {"group": "one_two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 85844}, - {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 85481}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1515757}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128", "microseconds": 85481}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1515757}, {"group": "one_two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 506811}, - {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 80841}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2190521}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128", "microseconds": 80841}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 2190521}, {"group": "one_two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1767688}, - {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1530445}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 4678695}, + {"group": "one_two_word", "operation": "div", "implementation": "int128", "microseconds": 1530445}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 4678695}, {"group": "one_two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 2182962}, - {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1511529}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 4431483}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128", "microseconds": 1511529}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 4431483}, {"group": "random_width", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 99541}, {"group": "random_width", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 101111}, {"group": "random_width", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 257069}, @@ -168,40 +168,40 @@ {"group": "random_width", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 247939}, {"group": "random_width", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 243754}, {"group": "random_width", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 1191566}, - {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 92235}, - {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 99200}, - {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 226153}, - {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 257049}, - {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 224185}, - {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 226041}, - {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1125261}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 391406}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 395930}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 517486}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 522564}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 523292}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 520699}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2871780}, + {"group": "random_width", "operation": "eq", "implementation": "int128", "microseconds": 92235}, + {"group": "random_width", "operation": "ne", "implementation": "int128", "microseconds": 99200}, + {"group": "random_width", "operation": "lt", "implementation": "int128", "microseconds": 226153}, + {"group": "random_width", "operation": "le", "implementation": "int128", "microseconds": 257049}, + {"group": "random_width", "operation": "gt", "implementation": "int128", "microseconds": 224185}, + {"group": "random_width", "operation": "ge", "implementation": "int128", "microseconds": 226041}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128", "microseconds": 1125261}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 391406}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 395930}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 517486}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 522564}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 523292}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 520699}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 2871780}, {"group": "random_width", "operation": "add", "implementation": "std::_Signed128", "microseconds": 86160}, - {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 84055}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1598093}, + {"group": "random_width", "operation": "add", "implementation": "int128", "microseconds": 84055}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1598093}, {"group": "random_width", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 88263}, - {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 87934}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1769736}, + {"group": "random_width", "operation": "sub", "implementation": "int128", "microseconds": 87934}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1769736}, {"group": "random_width", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 505934}, - {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 81566}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2395038}, + {"group": "random_width", "operation": "mul", "implementation": "int128", "microseconds": 81566}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 2395038}, {"group": "random_width", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1506403}, - {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 1480602}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 3622476}, + {"group": "random_width", "operation": "div", "implementation": "int128", "microseconds": 1480602}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 3622476}, {"group": "random_width", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1722778}, - {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 1447734}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 3555076}, + {"group": "random_width", "operation": "mod", "implementation": "int128", "microseconds": 1447734}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 3555076}, {"group": "random_width", "operation": "shl", "implementation": "std::_Signed128", "microseconds": 321391}, - {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 295187}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 1744143}, + {"group": "random_width", "operation": "shl", "implementation": "int128", "microseconds": 295187}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128", "microseconds": 1744143}, {"group": "random_width", "operation": "shr", "implementation": "std::_Signed128", "microseconds": 314415}, - {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 303113}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 1180367} + {"group": "random_width", "operation": "shr", "implementation": "int128", "microseconds": 303113}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128", "microseconds": 1180367} ] } diff --git a/doc/modules/ROOT/data/benchmarks-windows-arm64/u128.json b/doc/modules/ROOT/data/benchmarks-windows-arm64/u128.json index a51925cf..6bd02db8 100644 --- a/doc/modules/ROOT/data/benchmarks-windows-arm64/u128.json +++ b/doc/modules/ROOT/data/benchmarks-windows-arm64/u128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "uint128_t", + "type": "uint128", "sign": "u128", "os": "windows", "arch": "ARM64", @@ -9,7 +9,7 @@ "elements": 20000000, "repetitions": 5, "baseline": "std::_Unsigned128", - "implementations": ["std::_Unsigned128", "uint128_t", "boost::mp::uint128_t"], + "implementations": ["std::_Unsigned128", "uint128", "boost::mp::uint128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 100360}, {"group": "two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 101552}, @@ -18,41 +18,41 @@ {"group": "two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 120464}, {"group": "two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 123267}, {"group": "two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 666098}, - {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 94201}, - {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 101220}, - {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 138902}, - {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 141856}, - {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 145539}, - {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 141501}, - {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 763613}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 162195}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 226487}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 455039}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 454108}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 509980}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 460324}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 2268555}, + {"group": "two_word", "operation": "eq", "implementation": "uint128", "microseconds": 94201}, + {"group": "two_word", "operation": "ne", "implementation": "uint128", "microseconds": 101220}, + {"group": "two_word", "operation": "lt", "implementation": "uint128", "microseconds": 138902}, + {"group": "two_word", "operation": "le", "implementation": "uint128", "microseconds": 141856}, + {"group": "two_word", "operation": "gt", "implementation": "uint128", "microseconds": 145539}, + {"group": "two_word", "operation": "ge", "implementation": "uint128", "microseconds": 141501}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 763613}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 162195}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 226487}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 455039}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 454108}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 509980}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 460324}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 2268555}, {"group": "two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 85243}, - {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 88185}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1210617}, + {"group": "two_word", "operation": "add", "implementation": "uint128", "microseconds": 88185}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1210617}, {"group": "two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 91544}, - {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 87401}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1390577}, + {"group": "two_word", "operation": "sub", "implementation": "uint128", "microseconds": 87401}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1390577}, {"group": "two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 455541}, - {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 81048}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1998709}, + {"group": "two_word", "operation": "mul", "implementation": "uint128", "microseconds": 81048}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1998709}, {"group": "two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1040396}, - {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 911416}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2312577}, + {"group": "two_word", "operation": "div", "implementation": "uint128", "microseconds": 911416}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 2312577}, {"group": "two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1226865}, - {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 978268}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2260183}, + {"group": "two_word", "operation": "mod", "implementation": "uint128", "microseconds": 978268}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 2260183}, {"group": "two_word", "operation": "div64", "implementation": "std::_Unsigned128", "microseconds": 2782425}, - {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 1628674}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 8196306}, + {"group": "two_word", "operation": "div64", "implementation": "uint128", "microseconds": 1628674}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128", "microseconds": 8196306}, {"group": "two_word", "operation": "div32", "implementation": "std::_Unsigned128", "microseconds": 1137917}, - {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 1199014}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 3691618}, + {"group": "two_word", "operation": "div32", "implementation": "uint128", "microseconds": 1199014}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128", "microseconds": 3691618}, {"group": "one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 92569}, {"group": "one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 98239}, {"group": "one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 137748}, @@ -60,35 +60,35 @@ {"group": "one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 144451}, {"group": "one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 147857}, {"group": "one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 766566}, - {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 99248}, - {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 108100}, - {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 137525}, - {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 136559}, - {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 145550}, - {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 147027}, - {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 774380}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 165125}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 225860}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 454895}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 447587}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 510614}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 462241}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 2266716}, + {"group": "one_word", "operation": "eq", "implementation": "uint128", "microseconds": 99248}, + {"group": "one_word", "operation": "ne", "implementation": "uint128", "microseconds": 108100}, + {"group": "one_word", "operation": "lt", "implementation": "uint128", "microseconds": 137525}, + {"group": "one_word", "operation": "le", "implementation": "uint128", "microseconds": 136559}, + {"group": "one_word", "operation": "gt", "implementation": "uint128", "microseconds": 145550}, + {"group": "one_word", "operation": "ge", "implementation": "uint128", "microseconds": 147027}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 774380}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 165125}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 225860}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 454895}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 447587}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 510614}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 462241}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 2266716}, {"group": "one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 95555}, - {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 93772}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1090814}, + {"group": "one_word", "operation": "add", "implementation": "uint128", "microseconds": 93772}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1090814}, {"group": "one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 86278}, - {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 85063}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1323505}, + {"group": "one_word", "operation": "sub", "implementation": "uint128", "microseconds": 85063}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1323505}, {"group": "one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 454907}, - {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 89410}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1427067}, + {"group": "one_word", "operation": "mul", "implementation": "uint128", "microseconds": 89410}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1427067}, {"group": "one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 353794}, - {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 464183}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1216283}, + {"group": "one_word", "operation": "div", "implementation": "uint128", "microseconds": 464183}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 1216283}, {"group": "one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 673643}, - {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 534781}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1265672}, + {"group": "one_word", "operation": "mod", "implementation": "uint128", "microseconds": 534781}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 1265672}, {"group": "two_one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 100045}, {"group": "two_one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 102545}, {"group": "two_one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 102844}, @@ -96,35 +96,35 @@ {"group": "two_one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 119678}, {"group": "two_one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 124118}, {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 667393}, - {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 93796}, - {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 102504}, - {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 137236}, - {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 137667}, - {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 143743}, - {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 144346}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 759708}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 127968}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 162206}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 173116}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 192679}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 190475}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 173552}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1020437}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128", "microseconds": 93796}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128", "microseconds": 102504}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128", "microseconds": 137236}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128", "microseconds": 137667}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128", "microseconds": 143743}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128", "microseconds": 144346}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 759708}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 127968}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 162206}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 173116}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 192679}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 190475}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 173552}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1020437}, {"group": "two_one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 87418}, - {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 87337}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1248195}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128", "microseconds": 87337}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1248195}, {"group": "two_one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 90329}, - {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 86841}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1388005}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128", "microseconds": 86841}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1388005}, {"group": "two_one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 456045}, - {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 81626}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1734186}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128", "microseconds": 81626}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1734186}, {"group": "two_one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1765475}, - {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1026385}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4451739}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128", "microseconds": 1026385}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 4451739}, {"group": "two_one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 2120280}, - {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 954960}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4187624}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128", "microseconds": 954960}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 4187624}, {"group": "one_two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 98930}, {"group": "one_two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 101913}, {"group": "one_two_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 104964}, @@ -132,35 +132,35 @@ {"group": "one_two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 121994}, {"group": "one_two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 126166}, {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 675754}, - {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 98353}, - {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 106028}, - {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 136914}, - {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 138517}, - {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 142954}, - {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 144139}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 767301}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 127480}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 162637}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 170810}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 199572}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 195143}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 173631}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1029634}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128", "microseconds": 98353}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128", "microseconds": 106028}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128", "microseconds": 136914}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128", "microseconds": 138517}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128", "microseconds": 142954}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128", "microseconds": 144139}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 767301}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 127480}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 162637}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 170810}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 199572}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 195143}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 173631}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1029634}, {"group": "one_two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 85972}, - {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 87724}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1249922}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128", "microseconds": 87724}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1249922}, {"group": "one_two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 90283}, - {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 87827}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1387555}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128", "microseconds": 87827}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1387555}, {"group": "one_two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 456049}, - {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 97489}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1737327}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128", "microseconds": 97489}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1737327}, {"group": "one_two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1766496}, - {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1027438}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4457200}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128", "microseconds": 1027438}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 4457200}, {"group": "one_two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 2122346}, - {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 954656}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4188477}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128", "microseconds": 954656}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 4188477}, {"group": "random_width", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 99891}, {"group": "random_width", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 98800}, {"group": "random_width", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 287160}, @@ -168,49 +168,49 @@ {"group": "random_width", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 254488}, {"group": "random_width", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 244334}, {"group": "random_width", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 1262216}, - {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 91780}, - {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 103496}, - {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 138065}, - {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 137683}, - {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 139323}, - {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 142637}, - {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 753322}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 233263}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 278490}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 295541}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 326875}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 323186}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 299314}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1757122}, + {"group": "random_width", "operation": "eq", "implementation": "uint128", "microseconds": 91780}, + {"group": "random_width", "operation": "ne", "implementation": "uint128", "microseconds": 103496}, + {"group": "random_width", "operation": "lt", "implementation": "uint128", "microseconds": 138065}, + {"group": "random_width", "operation": "le", "implementation": "uint128", "microseconds": 137683}, + {"group": "random_width", "operation": "gt", "implementation": "uint128", "microseconds": 139323}, + {"group": "random_width", "operation": "ge", "implementation": "uint128", "microseconds": 142637}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128", "microseconds": 753322}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 233263}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 278490}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 295541}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 326875}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 323186}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 299314}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1757122}, {"group": "random_width", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 86038}, - {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 84791}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1535904}, + {"group": "random_width", "operation": "add", "implementation": "uint128", "microseconds": 84791}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1535904}, {"group": "random_width", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 86521}, - {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 87885}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1712929}, + {"group": "random_width", "operation": "sub", "implementation": "uint128", "microseconds": 87885}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1712929}, {"group": "random_width", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 458107}, - {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 82947}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1780541}, + {"group": "random_width", "operation": "mul", "implementation": "uint128", "microseconds": 82947}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1780541}, {"group": "random_width", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1334323}, - {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 920483}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2843970}, + {"group": "random_width", "operation": "div", "implementation": "uint128", "microseconds": 920483}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 2843970}, {"group": "random_width", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1491426}, - {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 915935}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2420312}, + {"group": "random_width", "operation": "mod", "implementation": "uint128", "microseconds": 915935}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 2420312}, {"group": "random_width", "operation": "shl", "implementation": "std::_Unsigned128", "microseconds": 321758}, - {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 310332}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 1841484}, + {"group": "random_width", "operation": "shl", "implementation": "uint128", "microseconds": 310332}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128", "microseconds": 1841484}, {"group": "random_width", "operation": "shr", "implementation": "std::_Unsigned128", "microseconds": 306783}, - {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 345569}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 1047658}, + {"group": "random_width", "operation": "shr", "implementation": "uint128", "microseconds": 345569}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128", "microseconds": 1047658}, {"group": "random_width", "operation": "and", "implementation": "std::_Unsigned128", "microseconds": 79688}, - {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 86011}, - {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 1450863}, + {"group": "random_width", "operation": "and", "implementation": "uint128", "microseconds": 86011}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128", "microseconds": 1450863}, {"group": "random_width", "operation": "or", "implementation": "std::_Unsigned128", "microseconds": 80450}, - {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 85630}, - {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 1383602}, + {"group": "random_width", "operation": "or", "implementation": "uint128", "microseconds": 85630}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128", "microseconds": 1383602}, {"group": "random_width", "operation": "xor", "implementation": "std::_Unsigned128", "microseconds": 81021}, - {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 85832}, - {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 1382799} + {"group": "random_width", "operation": "xor", "implementation": "uint128", "microseconds": 85832}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128", "microseconds": 1382799} ] } diff --git a/doc/modules/ROOT/data/benchmarks-windows-x64/i128.json b/doc/modules/ROOT/data/benchmarks-windows-x64/i128.json index 9dfcc630..96797e4c 100644 --- a/doc/modules/ROOT/data/benchmarks-windows-x64/i128.json +++ b/doc/modules/ROOT/data/benchmarks-windows-x64/i128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "int128_t", + "type": "int128", "sign": "i128", "os": "windows", "arch": "x64", @@ -9,7 +9,7 @@ "elements": 20000000, "repetitions": 5, "baseline": "std::_Signed128", - "implementations": ["std::_Signed128", "int128_t", "boost::mp::int128_t"], + "implementations": ["std::_Signed128", "int128", "boost::mp::int128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 97495}, {"group": "two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 95312}, @@ -18,41 +18,41 @@ {"group": "two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 123457}, {"group": "two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 121013}, {"group": "two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 667643}, - {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 101883}, - {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 99937}, - {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 116216}, - {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 97760}, - {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 113131}, - {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 102515}, - {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 631930}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 269282}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 254759}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 359854}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 341488}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 341010}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 366251}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1933005}, + {"group": "two_word", "operation": "eq", "implementation": "int128", "microseconds": 101883}, + {"group": "two_word", "operation": "ne", "implementation": "int128", "microseconds": 99937}, + {"group": "two_word", "operation": "lt", "implementation": "int128", "microseconds": 116216}, + {"group": "two_word", "operation": "le", "implementation": "int128", "microseconds": 97760}, + {"group": "two_word", "operation": "gt", "implementation": "int128", "microseconds": 113131}, + {"group": "two_word", "operation": "ge", "implementation": "int128", "microseconds": 102515}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 631930}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 269282}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 254759}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 359854}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 341488}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 341010}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 366251}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1933005}, {"group": "two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 115772}, - {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 111073}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1620723}, + {"group": "two_word", "operation": "add", "implementation": "int128", "microseconds": 111073}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1620723}, {"group": "two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 108075}, - {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 108740}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 2107567}, + {"group": "two_word", "operation": "sub", "implementation": "int128", "microseconds": 108740}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 2107567}, {"group": "two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 198154}, - {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 114653}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 3100514}, + {"group": "two_word", "operation": "mul", "implementation": "int128", "microseconds": 114653}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 3100514}, {"group": "two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1090822}, - {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1163678}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2711779}, + {"group": "two_word", "operation": "div", "implementation": "int128", "microseconds": 1163678}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 2711779}, {"group": "two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1221749}, - {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1291719}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 3170071}, + {"group": "two_word", "operation": "mod", "implementation": "int128", "microseconds": 1291719}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 3170071}, {"group": "two_word", "operation": "div64", "implementation": "std::_Signed128", "microseconds": 610230}, - {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 611281}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 9872432}, + {"group": "two_word", "operation": "div64", "implementation": "int128", "microseconds": 611281}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128", "microseconds": 9872432}, {"group": "two_word", "operation": "div32", "implementation": "std::_Signed128", "microseconds": 609932}, - {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 609887}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 3374887}, + {"group": "two_word", "operation": "div32", "implementation": "int128", "microseconds": 609887}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128", "microseconds": 3374887}, {"group": "one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 103741}, {"group": "one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 104789}, {"group": "one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 141945}, @@ -60,35 +60,35 @@ {"group": "one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 142440}, {"group": "one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 142794}, {"group": "one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 778930}, - {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 103637}, - {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 101572}, - {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 121346}, - {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 121731}, - {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 120832}, - {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 119015}, - {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 688546}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 273014}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 257839}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 362908}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 345074}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 345548}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 368476}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1953220}, + {"group": "one_word", "operation": "eq", "implementation": "int128", "microseconds": 103637}, + {"group": "one_word", "operation": "ne", "implementation": "int128", "microseconds": 101572}, + {"group": "one_word", "operation": "lt", "implementation": "int128", "microseconds": 121346}, + {"group": "one_word", "operation": "le", "implementation": "int128", "microseconds": 121731}, + {"group": "one_word", "operation": "gt", "implementation": "int128", "microseconds": 120832}, + {"group": "one_word", "operation": "ge", "implementation": "int128", "microseconds": 119015}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 688546}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 273014}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 257839}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 362908}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 345074}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 345548}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 368476}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1953220}, {"group": "one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 116371}, - {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 108525}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1618900}, + {"group": "one_word", "operation": "add", "implementation": "int128", "microseconds": 108525}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1618900}, {"group": "one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 110491}, - {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 106162}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1781745}, + {"group": "one_word", "operation": "sub", "implementation": "int128", "microseconds": 106162}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1781745}, {"group": "one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 197400}, - {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 115300}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2354709}, + {"group": "one_word", "operation": "mul", "implementation": "int128", "microseconds": 115300}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 2354709}, {"group": "one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 600573}, - {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 895385}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1844891}, + {"group": "one_word", "operation": "div", "implementation": "int128", "microseconds": 895385}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 1844891}, {"group": "one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 819666}, - {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 969214}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1941634}, + {"group": "one_word", "operation": "mod", "implementation": "int128", "microseconds": 969214}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 1941634}, {"group": "two_one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 99479}, {"group": "two_one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 98439}, {"group": "two_one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 114749}, @@ -96,35 +96,35 @@ {"group": "two_one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 114376}, {"group": "two_one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 114981}, {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 658517}, - {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 97184}, - {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 98170}, - {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 114603}, - {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 97205}, - {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 114679}, - {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 100322}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 622582}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 219806}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 238385}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 304845}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 306355}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 303720}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 313890}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1687523}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128", "microseconds": 97184}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128", "microseconds": 98170}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128", "microseconds": 114603}, + {"group": "two_one_word", "operation": "le", "implementation": "int128", "microseconds": 97205}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128", "microseconds": 114679}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128", "microseconds": 100322}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 622582}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 219806}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 238385}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 304845}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 306355}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 303720}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 313890}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1687523}, {"group": "two_one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 114803}, - {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 104457}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1806624}, + {"group": "two_one_word", "operation": "add", "implementation": "int128", "microseconds": 104457}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1806624}, {"group": "two_one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 109890}, - {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 104679}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1848928}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128", "microseconds": 104679}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1848928}, {"group": "two_one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 196724}, - {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 113169}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2816832}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128", "microseconds": 113169}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 2816832}, {"group": "two_one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 603576}, - {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 674930}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 5336228}, + {"group": "two_one_word", "operation": "div", "implementation": "int128", "microseconds": 674930}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 5336228}, {"group": "two_one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 644142}, - {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 673970}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 4985368}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128", "microseconds": 673970}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 4985368}, {"group": "one_two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 99479}, {"group": "one_two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 99015}, {"group": "one_two_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 113526}, @@ -132,35 +132,35 @@ {"group": "one_two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 115012}, {"group": "one_two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 115202}, {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 657561}, - {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 98572}, - {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 95348}, - {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 113729}, - {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 95252}, - {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 112561}, - {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 98615}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 614494}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 221104}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 240347}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 305976}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 304259}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 303680}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 317493}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1693337}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128", "microseconds": 98572}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128", "microseconds": 95348}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128", "microseconds": 113729}, + {"group": "one_two_word", "operation": "le", "implementation": "int128", "microseconds": 95252}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128", "microseconds": 112561}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128", "microseconds": 98615}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 614494}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 221104}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 240347}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 305976}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 304259}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 303680}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 317493}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1693337}, {"group": "one_two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 115722}, - {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 108572}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1797225}, + {"group": "one_two_word", "operation": "add", "implementation": "int128", "microseconds": 108572}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1797225}, {"group": "one_two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 108863}, - {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 104455}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1848277}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128", "microseconds": 104455}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1848277}, {"group": "one_two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 197836}, - {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 112819}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2818948}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128", "microseconds": 112819}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 2818948}, {"group": "one_two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 601841}, - {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 675605}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 5323383}, + {"group": "one_two_word", "operation": "div", "implementation": "int128", "microseconds": 675605}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 5323383}, {"group": "one_two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 633730}, - {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 668714}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 5008368}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128", "microseconds": 668714}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 5008368}, {"group": "random_width", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 97415}, {"group": "random_width", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 98415}, {"group": "random_width", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 289640}, @@ -168,40 +168,40 @@ {"group": "random_width", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 290749}, {"group": "random_width", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 293934}, {"group": "random_width", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 1361518}, - {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 98375}, - {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 98496}, - {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 278763}, - {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 259587}, - {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 281881}, - {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 253539}, - {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1271189}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 533768}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 531635}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 809954}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 814279}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 813798}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 811431}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 4315263}, + {"group": "random_width", "operation": "eq", "implementation": "int128", "microseconds": 98375}, + {"group": "random_width", "operation": "ne", "implementation": "int128", "microseconds": 98496}, + {"group": "random_width", "operation": "lt", "implementation": "int128", "microseconds": 278763}, + {"group": "random_width", "operation": "le", "implementation": "int128", "microseconds": 259587}, + {"group": "random_width", "operation": "gt", "implementation": "int128", "microseconds": 281881}, + {"group": "random_width", "operation": "ge", "implementation": "int128", "microseconds": 253539}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128", "microseconds": 1271189}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 533768}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 531635}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 809954}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 814279}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 813798}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 811431}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 4315263}, {"group": "random_width", "operation": "add", "implementation": "std::_Signed128", "microseconds": 115135}, - {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 107633}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 2089612}, + {"group": "random_width", "operation": "add", "implementation": "int128", "microseconds": 107633}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 2089612}, {"group": "random_width", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 108885}, - {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 105990}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 2265849}, + {"group": "random_width", "operation": "sub", "implementation": "int128", "microseconds": 105990}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 2265849}, {"group": "random_width", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 196081}, - {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 113761}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 3024735}, + {"group": "random_width", "operation": "mul", "implementation": "int128", "microseconds": 113761}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 3024735}, {"group": "random_width", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1031262}, - {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 1241974}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 4191052}, + {"group": "random_width", "operation": "div", "implementation": "int128", "microseconds": 1241974}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 4191052}, {"group": "random_width", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1080810}, - {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 1327820}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 4139305}, + {"group": "random_width", "operation": "mod", "implementation": "int128", "microseconds": 1327820}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 4139305}, {"group": "random_width", "operation": "shl", "implementation": "std::_Signed128", "microseconds": 464726}, - {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 103932}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 2655037}, + {"group": "random_width", "operation": "shl", "implementation": "int128", "microseconds": 103932}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128", "microseconds": 2655037}, {"group": "random_width", "operation": "shr", "implementation": "std::_Signed128", "microseconds": 473398}, - {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 432674}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 1681082} + {"group": "random_width", "operation": "shr", "implementation": "int128", "microseconds": 432674}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128", "microseconds": 1681082} ] } diff --git a/doc/modules/ROOT/data/benchmarks-windows-x64/u128.json b/doc/modules/ROOT/data/benchmarks-windows-x64/u128.json index bbe2bac8..c5e1d9be 100644 --- a/doc/modules/ROOT/data/benchmarks-windows-x64/u128.json +++ b/doc/modules/ROOT/data/benchmarks-windows-x64/u128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "uint128_t", + "type": "uint128", "sign": "u128", "os": "windows", "arch": "x64", @@ -9,7 +9,7 @@ "elements": 20000000, "repetitions": 5, "baseline": "std::_Unsigned128", - "implementations": ["std::_Unsigned128", "uint128_t", "boost::mp::uint128_t"], + "implementations": ["std::_Unsigned128", "uint128", "boost::mp::uint128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 99690}, {"group": "two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 116143}, @@ -18,41 +18,41 @@ {"group": "two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 106317}, {"group": "two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 114639}, {"group": "two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 654754}, - {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 114310}, - {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 114871}, - {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 97782}, - {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 104084}, - {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 98415}, - {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 114000}, - {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 643878}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 200390}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 181371}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 214257}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 214424}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 215604}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 191635}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1218167}, + {"group": "two_word", "operation": "eq", "implementation": "uint128", "microseconds": 114310}, + {"group": "two_word", "operation": "ne", "implementation": "uint128", "microseconds": 114871}, + {"group": "two_word", "operation": "lt", "implementation": "uint128", "microseconds": 97782}, + {"group": "two_word", "operation": "le", "implementation": "uint128", "microseconds": 104084}, + {"group": "two_word", "operation": "gt", "implementation": "uint128", "microseconds": 98415}, + {"group": "two_word", "operation": "ge", "implementation": "uint128", "microseconds": 114000}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 643878}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 200390}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 181371}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 214257}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 214424}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 215604}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 191635}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1218167}, {"group": "two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 108441}, - {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 102224}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1441775}, + {"group": "two_word", "operation": "add", "implementation": "uint128", "microseconds": 102224}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1441775}, {"group": "two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 114883}, - {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 95112}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1634898}, + {"group": "two_word", "operation": "sub", "implementation": "uint128", "microseconds": 95112}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1634898}, {"group": "two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 117160}, - {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 114334}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 2957779}, + {"group": "two_word", "operation": "mul", "implementation": "uint128", "microseconds": 114334}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 2957779}, {"group": "two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1220856}, - {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1062009}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2412835}, + {"group": "two_word", "operation": "div", "implementation": "uint128", "microseconds": 1062009}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 2412835}, {"group": "two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1275215}, - {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1211307}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2383395}, + {"group": "two_word", "operation": "mod", "implementation": "uint128", "microseconds": 1211307}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 2383395}, {"group": "two_word", "operation": "div64", "implementation": "std::_Unsigned128", "microseconds": 611657}, - {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 614509}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 9023185}, + {"group": "two_word", "operation": "div64", "implementation": "uint128", "microseconds": 614509}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128", "microseconds": 9023185}, {"group": "two_word", "operation": "div32", "implementation": "std::_Unsigned128", "microseconds": 614595}, - {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 610867}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 3017187}, + {"group": "two_word", "operation": "div32", "implementation": "uint128", "microseconds": 610867}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128", "microseconds": 3017187}, {"group": "one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 97504}, {"group": "one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 114033}, {"group": "one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 117999}, @@ -60,35 +60,35 @@ {"group": "one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 121589}, {"group": "one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 123625}, {"group": "one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 695180}, - {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 124444}, - {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 141853}, - {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 126322}, - {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 119953}, - {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 111180}, - {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 109911}, - {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 734137}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 188909}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 179914}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 215960}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 213735}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 212586}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 188648}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1200219}, + {"group": "one_word", "operation": "eq", "implementation": "uint128", "microseconds": 124444}, + {"group": "one_word", "operation": "ne", "implementation": "uint128", "microseconds": 141853}, + {"group": "one_word", "operation": "lt", "implementation": "uint128", "microseconds": 126322}, + {"group": "one_word", "operation": "le", "implementation": "uint128", "microseconds": 119953}, + {"group": "one_word", "operation": "gt", "implementation": "uint128", "microseconds": 111180}, + {"group": "one_word", "operation": "ge", "implementation": "uint128", "microseconds": 109911}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 734137}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 188909}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 179914}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 215960}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 213735}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 212586}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 188648}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1200219}, {"group": "one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 107074}, - {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 100304}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1267610}, + {"group": "one_word", "operation": "add", "implementation": "uint128", "microseconds": 100304}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1267610}, {"group": "one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 115493}, - {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 94631}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1565102}, + {"group": "one_word", "operation": "sub", "implementation": "uint128", "microseconds": 94631}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1565102}, {"group": "one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 114100}, - {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 112700}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1785347}, + {"group": "one_word", "operation": "mul", "implementation": "uint128", "microseconds": 112700}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1785347}, {"group": "one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 416742}, - {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 730582}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1593038}, + {"group": "one_word", "operation": "div", "implementation": "uint128", "microseconds": 730582}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 1593038}, {"group": "one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 860796}, - {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 811574}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1598772}, + {"group": "one_word", "operation": "mod", "implementation": "uint128", "microseconds": 811574}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 1598772}, {"group": "two_one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 98028}, {"group": "two_one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 113216}, {"group": "two_one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 100272}, @@ -96,35 +96,35 @@ {"group": "two_one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 106586}, {"group": "two_one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 116835}, {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 652029}, - {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 117223}, - {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 114823}, - {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 101384}, - {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 99924}, - {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 98469}, - {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 115111}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 647378}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 164198}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 164490}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 162760}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 164844}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 165327}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 163970}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 985944}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128", "microseconds": 117223}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128", "microseconds": 114823}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128", "microseconds": 101384}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128", "microseconds": 99924}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128", "microseconds": 98469}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128", "microseconds": 115111}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 647378}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 164198}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 164490}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 162760}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 164844}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 165327}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 163970}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 985944}, {"group": "two_one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 107315}, - {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 101098}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1440567}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128", "microseconds": 101098}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1440567}, {"group": "two_one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 118363}, - {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 101239}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1566603}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128", "microseconds": 101239}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1566603}, {"group": "two_one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 113629}, - {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 115814}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 2490772}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128", "microseconds": 115814}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 2490772}, {"group": "two_one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 474242}, - {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 377992}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4892882}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128", "microseconds": 377992}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 4892882}, {"group": "two_one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 458773}, - {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 473292}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4712981}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128", "microseconds": 473292}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 4712981}, {"group": "one_two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 93991}, {"group": "one_two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 112260}, {"group": "one_two_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 96608}, @@ -132,35 +132,35 @@ {"group": "one_two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 108021}, {"group": "one_two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 116539}, {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 642780}, - {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 113310}, - {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 113050}, - {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 99388}, - {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 95552}, - {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 95532}, - {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 112019}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 629316}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 162343}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 162758}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 166459}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 167110}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 167239}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 166512}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 992864}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128", "microseconds": 113310}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128", "microseconds": 113050}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128", "microseconds": 99388}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128", "microseconds": 95552}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128", "microseconds": 95532}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128", "microseconds": 112019}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 629316}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 162343}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 162758}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 166459}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 167110}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 167239}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 166512}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 992864}, {"group": "one_two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 106720}, - {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 101810}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1447051}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128", "microseconds": 101810}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1447051}, {"group": "one_two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 115651}, - {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 96136}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1562580}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128", "microseconds": 96136}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1562580}, {"group": "one_two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 112725}, - {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 113279}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 2486513}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128", "microseconds": 113279}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 2486513}, {"group": "one_two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 472632}, - {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 380700}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4898100}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128", "microseconds": 380700}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 4898100}, {"group": "one_two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 456450}, - {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 466555}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4735558}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128", "microseconds": 466555}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 4735558}, {"group": "random_width", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 95539}, {"group": "random_width", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 113057}, {"group": "random_width", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 261262}, @@ -168,49 +168,49 @@ {"group": "random_width", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 272217}, {"group": "random_width", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 282306}, {"group": "random_width", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 1313048}, - {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 119725}, - {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 117316}, - {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 253233}, - {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 244748}, - {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 246018}, - {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 270250}, - {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1251724}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 315630}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 311524}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 337312}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 336266}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 335893}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 333129}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1970110}, + {"group": "random_width", "operation": "eq", "implementation": "uint128", "microseconds": 119725}, + {"group": "random_width", "operation": "ne", "implementation": "uint128", "microseconds": 117316}, + {"group": "random_width", "operation": "lt", "implementation": "uint128", "microseconds": 253233}, + {"group": "random_width", "operation": "le", "implementation": "uint128", "microseconds": 244748}, + {"group": "random_width", "operation": "gt", "implementation": "uint128", "microseconds": 246018}, + {"group": "random_width", "operation": "ge", "implementation": "uint128", "microseconds": 270250}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128", "microseconds": 1251724}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 315630}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 311524}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 337312}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 336266}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 335893}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 333129}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1970110}, {"group": "random_width", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 106229}, - {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 98075}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 2153287}, + {"group": "random_width", "operation": "add", "implementation": "uint128", "microseconds": 98075}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 2153287}, {"group": "random_width", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 115275}, - {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 97252}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 2318242}, + {"group": "random_width", "operation": "sub", "implementation": "uint128", "microseconds": 97252}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 2318242}, {"group": "random_width", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 115091}, - {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 112082}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 2428936}, + {"group": "random_width", "operation": "mul", "implementation": "uint128", "microseconds": 112082}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 2428936}, {"group": "random_width", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1127057}, - {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 1086078}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 3340168}, + {"group": "random_width", "operation": "div", "implementation": "uint128", "microseconds": 1086078}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 3340168}, {"group": "random_width", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1249176}, - {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 1144617}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2721519}, + {"group": "random_width", "operation": "mod", "implementation": "uint128", "microseconds": 1144617}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 2721519}, {"group": "random_width", "operation": "shl", "implementation": "std::_Unsigned128", "microseconds": 459629}, - {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 450805}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 2786841}, + {"group": "random_width", "operation": "shl", "implementation": "uint128", "microseconds": 450805}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128", "microseconds": 2786841}, {"group": "random_width", "operation": "shr", "implementation": "std::_Unsigned128", "microseconds": 448761}, - {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 487842}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 1561214}, + {"group": "random_width", "operation": "shr", "implementation": "uint128", "microseconds": 487842}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128", "microseconds": 1561214}, {"group": "random_width", "operation": "and", "implementation": "std::_Unsigned128", "microseconds": 93016}, - {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 92138}, - {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 1743660}, + {"group": "random_width", "operation": "and", "implementation": "uint128", "microseconds": 92138}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128", "microseconds": 1743660}, {"group": "random_width", "operation": "or", "implementation": "std::_Unsigned128", "microseconds": 95635}, - {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 91902}, - {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 1567903}, + {"group": "random_width", "operation": "or", "implementation": "uint128", "microseconds": 91902}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128", "microseconds": 1567903}, {"group": "random_width", "operation": "xor", "implementation": "std::_Unsigned128", "microseconds": 89233}, - {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 87982}, - {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 1588266} + {"group": "random_width", "operation": "xor", "implementation": "uint128", "microseconds": 87982}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128", "microseconds": 1588266} ] } diff --git a/doc/modules/ROOT/data/benchmarks-windows-x86/i128.json b/doc/modules/ROOT/data/benchmarks-windows-x86/i128.json index 8136423b..b4a0acbe 100644 --- a/doc/modules/ROOT/data/benchmarks-windows-x86/i128.json +++ b/doc/modules/ROOT/data/benchmarks-windows-x86/i128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "int128_t", + "type": "int128", "sign": "i128", "os": "windows", "arch": "x86", @@ -9,7 +9,7 @@ "elements": 10000000, "repetitions": 5, "baseline": "std::_Signed128", - "implementations": ["std::_Signed128", "int128_t", "boost::mp::int128_t"], + "implementations": ["std::_Signed128", "int128", "boost::mp::int128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 108143}, {"group": "two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 121480}, @@ -18,41 +18,41 @@ {"group": "two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 335263}, {"group": "two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 321083}, {"group": "two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 1542717}, - {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 114320}, - {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 114796}, - {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 306476}, - {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 309236}, - {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 306653}, - {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 298919}, - {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1451173}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 178058}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 175146}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 201981}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 206023}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 206765}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 205535}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1174190}, + {"group": "two_word", "operation": "eq", "implementation": "int128", "microseconds": 114320}, + {"group": "two_word", "operation": "ne", "implementation": "int128", "microseconds": 114796}, + {"group": "two_word", "operation": "lt", "implementation": "int128", "microseconds": 306476}, + {"group": "two_word", "operation": "le", "implementation": "int128", "microseconds": 309236}, + {"group": "two_word", "operation": "gt", "implementation": "int128", "microseconds": 306653}, + {"group": "two_word", "operation": "ge", "implementation": "int128", "microseconds": 298919}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 1451173}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 178058}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 175146}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 201981}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 206023}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 206765}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 205535}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1174190}, {"group": "two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 131534}, - {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 128545}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 895383}, + {"group": "two_word", "operation": "add", "implementation": "int128", "microseconds": 128545}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 895383}, {"group": "two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 448215}, - {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 126293}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1216226}, + {"group": "two_word", "operation": "sub", "implementation": "int128", "microseconds": 126293}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1216226}, {"group": "two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 876906}, - {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 150440}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2056075}, + {"group": "two_word", "operation": "mul", "implementation": "int128", "microseconds": 150440}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 2056075}, {"group": "two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1381423}, - {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 3119530}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2540283}, + {"group": "two_word", "operation": "div", "implementation": "int128", "microseconds": 3119530}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 2540283}, {"group": "two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1442995}, - {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 3245915}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2912618}, + {"group": "two_word", "operation": "mod", "implementation": "int128", "microseconds": 3245915}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 2912618}, {"group": "two_word", "operation": "div64", "implementation": "std::_Signed128", "microseconds": 6151545}, - {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 4890501}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 8378005}, + {"group": "two_word", "operation": "div64", "implementation": "int128", "microseconds": 4890501}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128", "microseconds": 8378005}, {"group": "two_word", "operation": "div32", "implementation": "std::_Signed128", "microseconds": 1009750}, - {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 2229358}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 2506960}, + {"group": "two_word", "operation": "div32", "implementation": "int128", "microseconds": 2229358}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128", "microseconds": 2506960}, {"group": "one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 111035}, {"group": "one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 122706}, {"group": "one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 313714}, @@ -60,35 +60,35 @@ {"group": "one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 327557}, {"group": "one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 330703}, {"group": "one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 1535024}, - {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 115297}, - {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 115006}, - {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 340399}, - {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 341749}, - {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 339001}, - {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 348986}, - {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1601097}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 182432}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 176358}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 203754}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 206787}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 207307}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 208903}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1186259}, + {"group": "one_word", "operation": "eq", "implementation": "int128", "microseconds": 115297}, + {"group": "one_word", "operation": "ne", "implementation": "int128", "microseconds": 115006}, + {"group": "one_word", "operation": "lt", "implementation": "int128", "microseconds": 340399}, + {"group": "one_word", "operation": "le", "implementation": "int128", "microseconds": 341749}, + {"group": "one_word", "operation": "gt", "implementation": "int128", "microseconds": 339001}, + {"group": "one_word", "operation": "ge", "implementation": "int128", "microseconds": 348986}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 1601097}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 182432}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 176358}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 203754}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 206787}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 207307}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 208903}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1186259}, {"group": "one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 132131}, - {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 128640}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1063235}, + {"group": "one_word", "operation": "add", "implementation": "int128", "microseconds": 128640}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1063235}, {"group": "one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 445868}, - {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 127619}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1072151}, + {"group": "one_word", "operation": "sub", "implementation": "int128", "microseconds": 127619}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1072151}, {"group": "one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 875980}, - {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 150148}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1421876}, + {"group": "one_word", "operation": "mul", "implementation": "int128", "microseconds": 150148}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1421876}, {"group": "one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 2780825}, - {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 2080868}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 3067575}, + {"group": "one_word", "operation": "div", "implementation": "int128", "microseconds": 2080868}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 3067575}, {"group": "one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1769676}, - {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 2069868}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2204244}, + {"group": "one_word", "operation": "mod", "implementation": "int128", "microseconds": 2069868}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 2204244}, {"group": "two_one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 110317}, {"group": "two_one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 122763}, {"group": "two_one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 143448}, @@ -96,35 +96,35 @@ {"group": "two_one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 146958}, {"group": "two_one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 147263}, {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 817741}, - {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 115277}, - {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 113121}, - {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 130912}, - {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 138190}, - {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 134127}, - {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 149575}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 781976}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 173523}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 173598}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 199942}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 201513}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 201332}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 201666}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1152250}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128", "microseconds": 115277}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128", "microseconds": 113121}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128", "microseconds": 130912}, + {"group": "two_one_word", "operation": "le", "implementation": "int128", "microseconds": 138190}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128", "microseconds": 134127}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128", "microseconds": 149575}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128", "microseconds": 781976}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 173523}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 173598}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 199942}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 201513}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 201332}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 201666}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1152250}, {"group": "two_one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 133021}, - {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 130113}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1135020}, + {"group": "two_one_word", "operation": "add", "implementation": "int128", "microseconds": 130113}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1135020}, {"group": "two_one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 446905}, - {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 127915}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1157655}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128", "microseconds": 127915}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1157655}, {"group": "two_one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 876507}, - {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 151060}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1753229}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128", "microseconds": 151060}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1753229}, {"group": "two_one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 4330283}, - {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 2863451}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 4399611}, + {"group": "two_one_word", "operation": "div", "implementation": "int128", "microseconds": 2863451}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 4399611}, {"group": "two_one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 3164534}, - {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 2917767}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 3890306}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128", "microseconds": 2917767}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 3890306}, {"group": "one_two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 108192}, {"group": "one_two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 121769}, {"group": "one_two_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 141535}, @@ -132,35 +132,35 @@ {"group": "one_two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 147002}, {"group": "one_two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 148116}, {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 813264}, - {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 115209}, - {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 113481}, - {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 130203}, - {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 138620}, - {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 126340}, - {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 143148}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 767531}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 173677}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 172441}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 194442}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 198482}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 198579}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 199208}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1137542}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128", "microseconds": 115209}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128", "microseconds": 113481}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128", "microseconds": 130203}, + {"group": "one_two_word", "operation": "le", "implementation": "int128", "microseconds": 138620}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128", "microseconds": 126340}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128", "microseconds": 143148}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128", "microseconds": 767531}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 173677}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 172441}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 194442}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 198482}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 198579}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 199208}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 1137542}, {"group": "one_two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 132199}, - {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 129425}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1136419}, + {"group": "one_two_word", "operation": "add", "implementation": "int128", "microseconds": 129425}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1136419}, {"group": "one_two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 448283}, - {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 125556}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1155766}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128", "microseconds": 125556}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1155766}, {"group": "one_two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 879154}, - {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 149158}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1742092}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128", "microseconds": 149158}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 1742092}, {"group": "one_two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 4358734}, - {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 2884710}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 4412100}, + {"group": "one_two_word", "operation": "div", "implementation": "int128", "microseconds": 2884710}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 4412100}, {"group": "one_two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 3185147}, - {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 2921577}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 3914892}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128", "microseconds": 2921577}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 3914892}, {"group": "random_width", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 110926}, {"group": "random_width", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 122126}, {"group": "random_width", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 472037}, @@ -168,40 +168,40 @@ {"group": "random_width", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 457672}, {"group": "random_width", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 448069}, {"group": "random_width", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 2084732}, - {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 114341}, - {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 114354}, - {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 404451}, - {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 406857}, - {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 436327}, - {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 469934}, - {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1947041}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 448101}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 436992}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 499694}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 502800}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 513811}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 496620}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2898710}, + {"group": "random_width", "operation": "eq", "implementation": "int128", "microseconds": 114341}, + {"group": "random_width", "operation": "ne", "implementation": "int128", "microseconds": 114354}, + {"group": "random_width", "operation": "lt", "implementation": "int128", "microseconds": 404451}, + {"group": "random_width", "operation": "le", "implementation": "int128", "microseconds": 406857}, + {"group": "random_width", "operation": "gt", "implementation": "int128", "microseconds": 436327}, + {"group": "random_width", "operation": "ge", "implementation": "int128", "microseconds": 469934}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128", "microseconds": 1947041}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128", "microseconds": 448101}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128", "microseconds": 436992}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128", "microseconds": 499694}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128", "microseconds": 502800}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128", "microseconds": 513811}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128", "microseconds": 496620}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128", "microseconds": 2898710}, {"group": "random_width", "operation": "add", "implementation": "std::_Signed128", "microseconds": 131344}, - {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 128063}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1325852}, + {"group": "random_width", "operation": "add", "implementation": "int128", "microseconds": 128063}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128", "microseconds": 1325852}, {"group": "random_width", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 447258}, - {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 128145}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1454691}, + {"group": "random_width", "operation": "sub", "implementation": "int128", "microseconds": 128145}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128", "microseconds": 1454691}, {"group": "random_width", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 877318}, - {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 149394}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2018981}, + {"group": "random_width", "operation": "mul", "implementation": "int128", "microseconds": 149394}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128", "microseconds": 2018981}, {"group": "random_width", "operation": "div", "implementation": "std::_Signed128", "microseconds": 3479471}, - {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 3113092}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 3948298}, + {"group": "random_width", "operation": "div", "implementation": "int128", "microseconds": 3113092}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128", "microseconds": 3948298}, {"group": "random_width", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 2683535}, - {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 3157295}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 3620409}, + {"group": "random_width", "operation": "mod", "implementation": "int128", "microseconds": 3157295}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128", "microseconds": 3620409}, {"group": "random_width", "operation": "shl", "implementation": "std::_Signed128", "microseconds": 731928}, - {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 428800}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 1634058}, + {"group": "random_width", "operation": "shl", "implementation": "int128", "microseconds": 428800}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128", "microseconds": 1634058}, {"group": "random_width", "operation": "shr", "implementation": "std::_Signed128", "microseconds": 601309}, - {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 595011}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 1144703} + {"group": "random_width", "operation": "shr", "implementation": "int128", "microseconds": 595011}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128", "microseconds": 1144703} ] } diff --git a/doc/modules/ROOT/data/benchmarks-windows-x86/u128.json b/doc/modules/ROOT/data/benchmarks-windows-x86/u128.json index 0c01ad74..c7755ea1 100644 --- a/doc/modules/ROOT/data/benchmarks-windows-x86/u128.json +++ b/doc/modules/ROOT/data/benchmarks-windows-x86/u128.json @@ -1,6 +1,6 @@ { "schema": "boost.int128.benchmarks/1", - "type": "uint128_t", + "type": "uint128", "sign": "u128", "os": "windows", "arch": "x86", @@ -9,7 +9,7 @@ "elements": 10000000, "repetitions": 5, "baseline": "std::_Unsigned128", - "implementations": ["std::_Unsigned128", "uint128_t", "boost::mp::uint128_t"], + "implementations": ["std::_Unsigned128", "uint128", "boost::mp::uint128"], "results": [ {"group": "two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 111788}, {"group": "two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 122339}, @@ -18,41 +18,41 @@ {"group": "two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 330384}, {"group": "two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 334949}, {"group": "two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 1548670}, - {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 111987}, - {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 111075}, - {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 107904}, - {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 108037}, - {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 108826}, - {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 108928}, - {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 657415}, - {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 159671}, - {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 158739}, - {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 163112}, - {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 163280}, - {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 166279}, - {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 169625}, - {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 981366}, + {"group": "two_word", "operation": "eq", "implementation": "uint128", "microseconds": 111987}, + {"group": "two_word", "operation": "ne", "implementation": "uint128", "microseconds": 111075}, + {"group": "two_word", "operation": "lt", "implementation": "uint128", "microseconds": 107904}, + {"group": "two_word", "operation": "le", "implementation": "uint128", "microseconds": 108037}, + {"group": "two_word", "operation": "gt", "implementation": "uint128", "microseconds": 108826}, + {"group": "two_word", "operation": "ge", "implementation": "uint128", "microseconds": 108928}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 657415}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 159671}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 158739}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 163112}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 163280}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 166279}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 169625}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 981366}, {"group": "two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 132260}, - {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 130457}, - {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 725440}, + {"group": "two_word", "operation": "add", "implementation": "uint128", "microseconds": 130457}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 725440}, {"group": "two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 454180}, - {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 127847}, - {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 840902}, + {"group": "two_word", "operation": "sub", "implementation": "uint128", "microseconds": 127847}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 840902}, {"group": "two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 640255}, - {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 849501}, - {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1725572}, + {"group": "two_word", "operation": "mul", "implementation": "uint128", "microseconds": 849501}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1725572}, {"group": "two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1303008}, - {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 2647866}, - {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2401610}, + {"group": "two_word", "operation": "div", "implementation": "uint128", "microseconds": 2647866}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 2401610}, {"group": "two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1407621}, - {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 2757143}, - {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2465767}, + {"group": "two_word", "operation": "mod", "implementation": "uint128", "microseconds": 2757143}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 2465767}, {"group": "two_word", "operation": "div64", "implementation": "std::_Unsigned128", "microseconds": 5939342}, - {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 4769849}, - {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 8809478}, + {"group": "two_word", "operation": "div64", "implementation": "uint128", "microseconds": 4769849}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128", "microseconds": 8809478}, {"group": "two_word", "operation": "div32", "implementation": "std::_Unsigned128", "microseconds": 907913}, - {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 2077709}, - {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 2168714}, + {"group": "two_word", "operation": "div32", "implementation": "uint128", "microseconds": 2077709}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128", "microseconds": 2168714}, {"group": "one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 109597}, {"group": "one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 122231}, {"group": "one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 330580}, @@ -60,35 +60,35 @@ {"group": "one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 329492}, {"group": "one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 326205}, {"group": "one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 1533024}, - {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 115544}, - {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 115732}, - {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 114280}, - {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 119807}, - {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 115487}, - {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 120178}, - {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 701750}, - {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 160131}, - {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 156597}, - {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 162769}, - {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 163931}, - {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 164305}, - {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 168866}, - {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 977193}, + {"group": "one_word", "operation": "eq", "implementation": "uint128", "microseconds": 115544}, + {"group": "one_word", "operation": "ne", "implementation": "uint128", "microseconds": 115732}, + {"group": "one_word", "operation": "lt", "implementation": "uint128", "microseconds": 114280}, + {"group": "one_word", "operation": "le", "implementation": "uint128", "microseconds": 119807}, + {"group": "one_word", "operation": "gt", "implementation": "uint128", "microseconds": 115487}, + {"group": "one_word", "operation": "ge", "implementation": "uint128", "microseconds": 120178}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 701750}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 160131}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 156597}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 162769}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 163931}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 164305}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 168866}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 977193}, {"group": "one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 132141}, - {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 129407}, - {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 706287}, + {"group": "one_word", "operation": "add", "implementation": "uint128", "microseconds": 129407}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 706287}, {"group": "one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 447422}, - {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 126486}, - {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1141714}, + {"group": "one_word", "operation": "sub", "implementation": "uint128", "microseconds": 126486}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1141714}, {"group": "one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 635946}, - {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 828587}, - {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1038315}, + {"group": "one_word", "operation": "mul", "implementation": "uint128", "microseconds": 828587}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1038315}, {"group": "one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 2611033}, - {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1648668}, - {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2916830}, + {"group": "one_word", "operation": "div", "implementation": "uint128", "microseconds": 1648668}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 2916830}, {"group": "one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1683172}, - {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1658140}, - {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2094871}, + {"group": "one_word", "operation": "mod", "implementation": "uint128", "microseconds": 1658140}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 2094871}, {"group": "two_one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 109352}, {"group": "two_one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 122157}, {"group": "two_one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 143315}, @@ -96,35 +96,35 @@ {"group": "two_one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 146211}, {"group": "two_one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 147384}, {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 814792}, - {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 111456}, - {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 109635}, - {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 107279}, - {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 110132}, - {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 107568}, - {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 107846}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 654429}, - {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 146795}, - {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 141890}, - {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 142986}, - {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 147852}, - {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 145872}, - {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 155021}, - {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 881108}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128", "microseconds": 111456}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128", "microseconds": 109635}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128", "microseconds": 107279}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128", "microseconds": 110132}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128", "microseconds": 107568}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128", "microseconds": 107846}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 654429}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 146795}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 141890}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 142986}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 147852}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 145872}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 155021}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 881108}, {"group": "two_one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 132415}, - {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 129679}, - {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 836745}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128", "microseconds": 129679}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 836745}, {"group": "two_one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 448486}, - {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 129784}, - {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 962373}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128", "microseconds": 129784}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 962373}, {"group": "two_one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 640016}, - {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 838259}, - {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1497013}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128", "microseconds": 838259}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1497013}, {"group": "two_one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 4237486}, - {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 2544129}, - {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4572514}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128", "microseconds": 2544129}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 4572514}, {"group": "two_one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 3120280}, - {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 2700149}, - {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4100977}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128", "microseconds": 2700149}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 4100977}, {"group": "one_two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 109990}, {"group": "one_two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 122457}, {"group": "one_two_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 146899}, @@ -132,35 +132,35 @@ {"group": "one_two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 146446}, {"group": "one_two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 147949}, {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 821440}, - {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 112212}, - {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 110783}, - {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 108143}, - {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 108439}, - {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 108024}, - {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 107744}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 655905}, - {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 145768}, - {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 141727}, - {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 143186}, - {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 147160}, - {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 148670}, - {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 154250}, - {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 881509}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128", "microseconds": 112212}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128", "microseconds": 110783}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128", "microseconds": 108143}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128", "microseconds": 108439}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128", "microseconds": 108024}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128", "microseconds": 107744}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128", "microseconds": 655905}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 145768}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 141727}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 143186}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 147160}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 148670}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 154250}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 881509}, {"group": "one_two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 132212}, - {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 129563}, - {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 833087}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128", "microseconds": 129563}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 833087}, {"group": "one_two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 445284}, - {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 128974}, - {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 954273}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128", "microseconds": 128974}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 954273}, {"group": "one_two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 635062}, - {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 831912}, - {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1419132}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128", "microseconds": 831912}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1419132}, {"group": "one_two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 4247013}, - {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 2537809}, - {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4568929}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128", "microseconds": 2537809}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 4568929}, {"group": "one_two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 3114097}, - {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 2706961}, - {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4089359}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128", "microseconds": 2706961}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 4089359}, {"group": "random_width", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 109078}, {"group": "random_width", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 121623}, {"group": "random_width", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 545990}, @@ -168,49 +168,49 @@ {"group": "random_width", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 588748}, {"group": "random_width", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 569493}, {"group": "random_width", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 2519936}, - {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 222272}, - {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 218961}, - {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 403374}, - {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 396483}, - {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 372956}, - {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 391753}, - {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 2006459}, - {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 247933}, - {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 257483}, - {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 246619}, - {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 249601}, - {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 250095}, - {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 264252}, - {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1516713}, + {"group": "random_width", "operation": "eq", "implementation": "uint128", "microseconds": 222272}, + {"group": "random_width", "operation": "ne", "implementation": "uint128", "microseconds": 218961}, + {"group": "random_width", "operation": "lt", "implementation": "uint128", "microseconds": 403374}, + {"group": "random_width", "operation": "le", "implementation": "uint128", "microseconds": 396483}, + {"group": "random_width", "operation": "gt", "implementation": "uint128", "microseconds": 372956}, + {"group": "random_width", "operation": "ge", "implementation": "uint128", "microseconds": 391753}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128", "microseconds": 2006459}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128", "microseconds": 247933}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128", "microseconds": 257483}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128", "microseconds": 246619}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128", "microseconds": 249601}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128", "microseconds": 250095}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128", "microseconds": 264252}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128", "microseconds": 1516713}, {"group": "random_width", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 132021}, - {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 129303}, - {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1184928}, + {"group": "random_width", "operation": "add", "implementation": "uint128", "microseconds": 129303}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128", "microseconds": 1184928}, {"group": "random_width", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 505196}, - {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 127036}, - {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1526177}, + {"group": "random_width", "operation": "sub", "implementation": "uint128", "microseconds": 127036}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128", "microseconds": 1526177}, {"group": "random_width", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 765417}, - {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 960622}, - {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1459692}, + {"group": "random_width", "operation": "mul", "implementation": "uint128", "microseconds": 960622}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128", "microseconds": 1459692}, {"group": "random_width", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 2510903}, - {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 2217091}, - {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2816842}, + {"group": "random_width", "operation": "div", "implementation": "uint128", "microseconds": 2217091}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128", "microseconds": 2816842}, {"group": "random_width", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1985290}, - {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 2271454}, - {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2458916}, + {"group": "random_width", "operation": "mod", "implementation": "uint128", "microseconds": 2271454}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128", "microseconds": 2458916}, {"group": "random_width", "operation": "shl", "implementation": "std::_Unsigned128", "microseconds": 733372}, - {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 424985}, - {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 1585122}, + {"group": "random_width", "operation": "shl", "implementation": "uint128", "microseconds": 424985}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128", "microseconds": 1585122}, {"group": "random_width", "operation": "shr", "implementation": "std::_Unsigned128", "microseconds": 771271}, - {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 547815}, - {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 1045069}, + {"group": "random_width", "operation": "shr", "implementation": "uint128", "microseconds": 547815}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128", "microseconds": 1045069}, {"group": "random_width", "operation": "and", "implementation": "std::_Unsigned128", "microseconds": 131113}, - {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 131871}, - {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 1503443}, + {"group": "random_width", "operation": "and", "implementation": "uint128", "microseconds": 131871}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128", "microseconds": 1503443}, {"group": "random_width", "operation": "or", "implementation": "std::_Unsigned128", "microseconds": 131561}, - {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 131184}, - {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 1208348}, + {"group": "random_width", "operation": "or", "implementation": "uint128", "microseconds": 131184}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128", "microseconds": 1208348}, {"group": "random_width", "operation": "xor", "implementation": "std::_Unsigned128", "microseconds": 130425}, - {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 130219}, - {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 1235254} + {"group": "random_width", "operation": "xor", "implementation": "uint128", "microseconds": 130219}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128", "microseconds": 1235254} ] } diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ARM32_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/ARM32_benchmarks.png index c953cca1..f6790083 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ARM32_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/ARM32_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ARM32_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/ARM32_relative_performance.png index 432ec752..0f537764 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ARM32_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/ARM32_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ARM64_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/ARM64_benchmarks.png index a318ff75..99f50d8c 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ARM64_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ARM64_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/ARM64_relative_performance.png index 72c791a1..8551f559 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ARM64_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_benchmarks.png index 614062d9..471d2f17 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_relative_performance.png index a857fea6..2948f061 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/s390x_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/s390x_benchmarks.png index ab84cf67..6a8e5e05 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/s390x_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/s390x_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/s390x_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/s390x_relative_performance.png index af231478..e7d4de6a 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/s390x_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/s390x_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/x64_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/x64_benchmarks.png index 6e4d0bff..ce24604d 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/x64_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/x64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/x64_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/x64_relative_performance.png index a7db26eb..11d00128 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/x64_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/x64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/x86_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/x86_benchmarks.png index c27df94b..4e99dccd 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/x86_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/x86_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/x86_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/x86_relative_performance.png index 62124061..293e71ba 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/x86_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/x86_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/macos/ARM64_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/macos/ARM64_benchmarks.png index 0cd9e6ea..ae9f7af1 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/macos/ARM64_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/macos/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/macos/ARM64_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/macos/ARM64_relative_performance.png index 6207b7bd..8415d3d8 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/macos/ARM64_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/macos/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/ARM64_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/windows/ARM64_benchmarks.png index a1f972a6..f0749c0d 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/ARM64_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/windows/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/ARM64_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/windows/ARM64_relative_performance.png index e8d7ba34..ce60057a 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/ARM64_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/windows/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/x64_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/windows/x64_benchmarks.png index be430dad..f32de4a4 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/x64_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/windows/x64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/x64_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/windows/x64_relative_performance.png index ae1cab2a..96a15de1 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/x64_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/windows/x64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/x86_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/windows/x86_benchmarks.png index 274251cb..a1b460a3 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/x86_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/windows/x86_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/x86_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/windows/x86_relative_performance.png index 594fa7e0..37fa9d03 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/x86_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/windows/x86_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ARM32_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/ARM32_benchmarks.png index 56fee81e..204c804a 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ARM32_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/ARM32_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ARM32_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/ARM32_relative_performance.png index 3001e0f5..5f67c666 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ARM32_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/ARM32_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ARM64_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/ARM64_benchmarks.png index e97834a8..2b3f4453 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ARM64_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ARM64_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/ARM64_relative_performance.png index 2dae8daf..4993ece5 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ARM64_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_benchmarks.png index 4f869aa3..966af15c 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_relative_performance.png index 7b81c797..dcec210b 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/s390x_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/s390x_benchmarks.png index f5f10529..ff9b9bd4 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/s390x_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/s390x_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/s390x_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/s390x_relative_performance.png index 1ee81d58..272c7c84 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/s390x_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/s390x_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/x64_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/x64_benchmarks.png index 80276cb6..5cbb7329 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/x64_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/x64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/x64_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/x64_relative_performance.png index 4a3b08a6..1ce73543 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/x64_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/x64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/x86_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/x86_benchmarks.png index 21e72888..f9630dc2 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/x86_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/x86_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/x86_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/x86_relative_performance.png index 74afa716..c7c4d3bd 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/x86_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/x86_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/macos/ARM64_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/macos/ARM64_benchmarks.png index 85b2d68c..f3752af4 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/macos/ARM64_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/macos/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/macos/ARM64_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/macos/ARM64_relative_performance.png index adf8b46c..570fd3d8 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/macos/ARM64_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/macos/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/ARM64_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/windows/ARM64_benchmarks.png index 733b8fd2..811142d8 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/ARM64_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/windows/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/ARM64_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/windows/ARM64_relative_performance.png index fcecd8b0..c295d16b 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/ARM64_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/windows/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/x64_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/windows/x64_benchmarks.png index 2ace2a53..5193f9ee 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/x64_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/windows/x64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/x64_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/windows/x64_relative_performance.png index 0b84b3b9..74a3046a 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/x64_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/windows/x64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/x86_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/windows/x86_benchmarks.png index 71f5f4e8..da869eee 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/x86_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/windows/x86_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/x86_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/windows/x86_relative_performance.png index c083bfa8..6856d6fd 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/x86_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/windows/x86_relative_performance.png differ diff --git a/doc/modules/ROOT/nav.adoc b/doc/modules/ROOT/nav.adoc index bd5758ec..8c2e2bc1 100644 --- a/doc/modules/ROOT/nav.adoc +++ b/doc/modules/ROOT/nav.adoc @@ -47,24 +47,24 @@ *** xref:api_reference.adoc#api_macro_configuration[Configuration] ** xref:api_reference.adoc#api_headers[Headers] * xref:file_structure.adoc[] -* xref:uint128_t.adoc[] -** xref:uint128_t.adoc#u128_alignment[Alignment] -** xref:uint128_t.adoc#u128_operator_behavior[Operator Behavior] -** xref:uint128_t.adoc#u128_constructors[Constructors] -** xref:uint128_t.adoc#u128_conversions[Conversion Operators] -** xref:uint128_t.adoc#u128_comparison_operators[Comparison Operators] -** xref:uint128_t.adoc#u128_bitwise_operators[Bitwise Operators] -** xref:uint128_t.adoc#u128_math_operators[Mathematical Operators] -** xref:uint128_t.adoc#u128_limits[`` Support and Values] -* xref:int128_t.adoc[] -** xref:int128_t.adoc#i128_alignment[Alignment] -** xref:int128_t.adoc#i128_operator_behavior[Operator Behavior] -** xref:int128_t.adoc#i128_constructors[Constructors] -** xref:int128_t.adoc#i128_conversions[Conversion Operators] -** xref:int128_t.adoc#i128_comparison_operators[Comparison Operators] -** xref:int128_t.adoc#i128_bitwise_operators[Bitwise Operators] -** xref:int128_t.adoc#i128_math_operators[Mathematical Operators] -** xref:int128_t.adoc#i128_limits[`` Support and Values] +* xref:uint128.adoc[] +** xref:uint128.adoc#u128_alignment[Alignment] +** xref:uint128.adoc#u128_operator_behavior[Operator Behavior] +** xref:uint128.adoc#u128_constructors[Constructors] +** xref:uint128.adoc#u128_conversions[Conversion Operators] +** xref:uint128.adoc#u128_comparison_operators[Comparison Operators] +** xref:uint128.adoc#u128_bitwise_operators[Bitwise Operators] +** xref:uint128.adoc#u128_math_operators[Mathematical Operators] +** xref:uint128.adoc#u128_limits[`` Support and Values] +* xref:int128.adoc[] +** xref:int128.adoc#i128_alignment[Alignment] +** xref:int128.adoc#i128_operator_behavior[Operator Behavior] +** xref:int128.adoc#i128_constructors[Constructors] +** xref:int128.adoc#i128_conversions[Conversion Operators] +** xref:int128.adoc#i128_comparison_operators[Comparison Operators] +** xref:int128.adoc#i128_bitwise_operators[Bitwise Operators] +** xref:int128.adoc#i128_math_operators[Mathematical Operators] +** xref:int128.adoc#i128_limits[`` Support and Values] * xref:mixed_type_ops.adoc[] * xref:literals.adoc[] * xref:bit.adoc[`` (Bitwise ops)] diff --git a/doc/modules/ROOT/pages/api_reference.adoc b/doc/modules/ROOT/pages/api_reference.adoc index 14bb4fdc..9bd7b5dd 100644 --- a/doc/modules/ROOT/pages/api_reference.adoc +++ b/doc/modules/ROOT/pages/api_reference.adoc @@ -33,10 +33,10 @@ https://www.boost.org/LICENSE_1_0.txt |=== | Type | Description -| xref:uint128_t.adoc[`uint128_t`] +| xref:uint128.adoc[`uint128`] | Unsigned 128-bit integer -| xref:int128_t.adoc[`int128_t`] +| xref:int128.adoc[`int128`] | Signed 128-bit integer |=== @@ -67,23 +67,23 @@ https://www.boost.org/LICENSE_1_0.txt |=== | Structure | Description -| https://en.cppreference.com/w/cpp/types/numeric_limits[`std::numeric_limits`] -| Numeric limits specialization for `uint128_t` +| https://en.cppreference.com/w/cpp/types/numeric_limits[`std::numeric_limits`] +| Numeric limits specialization for `uint128` -| https://en.cppreference.com/w/cpp/types/numeric_limits[`std::numeric_limits`] -| Numeric limits specialization for `int128_t` +| https://en.cppreference.com/w/cpp/types/numeric_limits[`std::numeric_limits`] +| Numeric limits specialization for `int128` -| xref:hash.adoc[`std::hash`] -| Hash specialization for `uint128_t` +| xref:hash.adoc[`std::hash`] +| Hash specialization for `uint128` -| xref:hash.adoc[`std::hash`] -| Hash specialization for `int128_t` +| xref:hash.adoc[`std::hash`] +| Hash specialization for `int128` | xref:cstdlib.adoc#div_structs[`u128div_t`] -| Result type for `div(uint128_t, uint128_t)` +| Result type for `div(uint128, uint128)` | xref:cstdlib.adoc#div_structs[`i128div_t`] -| Result type for `div(int128_t, int128_t)` +| Result type for `div(int128, int128)` | xref:numeric.adoc#div_result[`div_result`] | Result type for the `div_rem_*` functions @@ -159,7 +159,7 @@ Listed by analogous STL header. |=== | Function | Description -| xref:int128_t.adoc#i128_abs[`abs`] +| xref:int128.adoc#i128_abs[`abs`] | Absolute value |=== @@ -181,11 +181,11 @@ Listed by analogous STL header. |=== | Specialization | Description -| xref:hash.adoc[`std::hash`] -| Enables `uint128_t` as a key in unordered associative containers +| xref:hash.adoc[`std::hash`] +| Enables `uint128` as a key in unordered associative containers -| xref:hash.adoc[`std::hash`] -| Enables `int128_t` as a key in unordered associative containers +| xref:hash.adoc[`std::hash`] +| Enables `int128` as a key in unordered associative containers |=== [#api_formatting] @@ -384,13 +384,13 @@ Listed by analogous STL header. | Macro | Description | `BOOST_INT128_UINT128_MAX` -| Maximum value for `uint128_t` +| Maximum value for `uint128` | `BOOST_INT128_INT128_MAX` -| Maximum value for `int128_t` +| Maximum value for `int128` | `BOOST_INT128_INT128_MIN` -| Minimum value for `int128_t` +| Minimum value for `int128` |=== === Literals @@ -488,19 +488,19 @@ Listed by analogous STL header. | Formatting integration for pass:[C++20] `` | xref:hash.adoc[``] -| `std::hash` specializations for `int128_t` and `uint128_t` +| `std::hash` specializations for `int128` and `uint128` | `` -| The xref:uint128_t.adoc[`uint128_t`] and xref:int128_t.adoc[`int128_t`] types +| The xref:uint128.adoc[`uint128`] and xref:int128.adoc[`int128`] types | xref:stream.adoc[``] -| Iostream overloads for `int128_t` and `uint128_t` +| Iostream overloads for `int128` and `uint128` | `` -| Overloads for `std::numeric_limits` for `int128_t` and `uint128_t` +| Overloads for `std::numeric_limits` for `int128` and `uint128` | xref:literals.adoc[``] -| User-defined literals for `int128_t` and `uint128_t` +| User-defined literals for `int128` and `uint128` | xref:numeric.adoc[``] | Numeric algorithms (gcd, lcm, midpoint, integer division) diff --git a/doc/modules/ROOT/pages/bit.adoc b/doc/modules/ROOT/pages/bit.adoc index 355b6978..5d739737 100644 --- a/doc/modules/ROOT/pages/bit.adoc +++ b/doc/modules/ROOT/pages/bit.adoc @@ -13,8 +13,8 @@ https://www.boost.org/LICENSE_1_0.txt #include ---- -The following are functions analogous to those found in pass:[C++20] https://en.cppreference.com/w/cpp/header/bit[] header, but for `boost::int128::uint128_t`. -None of these functions apply to signed integral types, and thus none have overloads for `boost::int128::int128_t`. +The following are functions analogous to those found in pass:[C++20] https://en.cppreference.com/w/cpp/header/bit[] header, but for `boost::int128::uint128`. +None of these functions apply to signed integral types, and thus none have overloads for `boost::int128::int128`. All of these functions are available using pass:[C++14] like the rest of the library. [#has_single_bit] @@ -28,7 +28,7 @@ Returns `true` if `x` is a power of two; otherwise `false` namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr bool has_single_bit(uint128_t x) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool has_single_bit(uint128 x) noexcept; } // namespace int128 } // namespace boost @@ -44,7 +44,7 @@ Returns the number of consecutive `0` bits in the value `x`, starting from the m namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr int countl_zero(uint128_t x) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int countl_zero(uint128 x) noexcept; } // namespace int128 } // namespace boost @@ -60,7 +60,7 @@ Returns the number of consecutive `1` bits in the value `x`, starting from the m namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr int countl_one(uint128_t x) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int countl_one(uint128 x) noexcept; } // namespace int128 } // namespace boost @@ -77,7 +77,7 @@ If `x` is zero, returns 0 namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr int bit_width(uint128_t x) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int bit_width(uint128 x) noexcept; } // namespace int128 } // namespace boost @@ -93,7 +93,7 @@ Returns the smallest integral power of two that is not smaller than `x`. namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t bit_ceil(uint128_t x) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 bit_ceil(uint128 x) noexcept; } // namespace int128 } // namespace boost @@ -110,7 +110,7 @@ If `x` is 0 then returns 0. namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t bit_floor(uint128_t x) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 bit_floor(uint128 x) noexcept; } // namespace int128 } // namespace boost @@ -126,7 +126,7 @@ Returns the number of consecutive `0` bits in the value `x`, starting from the l namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr int countr_zero(uint128_t x) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int countr_zero(uint128 x) noexcept; } // namespace int128 } // namespace boost @@ -142,7 +142,7 @@ Returns the number of consecutive `1` bits in the value `x`, starting from the l namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr int countr_one(uint128_t x) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int countr_one(uint128 x) noexcept; } // namespace int128 } // namespace boost @@ -159,7 +159,7 @@ This operation is also known as a left circular shift. namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t rotl(uint128_t x, int s) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 rotl(uint128 x, int s) noexcept; } // namespace int128 } // namespace boost @@ -176,7 +176,7 @@ This operation is also known as a right circular shift. namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t rotr(uint128_t x, int s) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 rotr(uint128 x, int s) noexcept; } // namespace int128 } // namespace boost @@ -192,7 +192,7 @@ Returns the number of `1` bits in `x`. namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr int popcount(uint128_t x) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int popcount(uint128 x) noexcept; } // namespace int128 } // namespace boost @@ -208,7 +208,7 @@ Reverses the bytes in the given integer value `x`. namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap(uint128_t x) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 byteswap(uint128 x) noexcept; } // namespace int128 } // namespace boost diff --git a/doc/modules/ROOT/pages/charconv.adoc b/doc/modules/ROOT/pages/charconv.adoc index db00fe70..ee63991b 100644 --- a/doc/modules/ROOT/pages/charconv.adoc +++ b/doc/modules/ROOT/pages/charconv.adoc @@ -47,9 +47,9 @@ struct to_chars_result }; -BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars(char* first, char* last, int128::uint128_t value, int base = 10) noexcept; +BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars(char* first, char* last, int128::uint128 value, int base = 10) noexcept; -BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars(char* first, char* last, int128::int128_t value, int base = 10) noexcept; +BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars(char* first, char* last, int128::int128 value, int base = 10) noexcept; } // namespace charconv } // namespace boost @@ -83,15 +83,15 @@ struct from_chars_result constexpr explicit operator bool() const noexcept { return ec == std::errc{}; } }; -constexpr from_chars_result from_chars(const char* first, const char* last, int128::uint128_t& value, int base = 10) noexcept; +constexpr from_chars_result from_chars(const char* first, const char* last, int128::uint128& value, int base = 10) noexcept; // Allows both std::string and std::string_view (when available) -constexpr from_chars_result from_chars(core::string_view sv, int128::uint128_t& value, int base = 10) noexcept; +constexpr from_chars_result from_chars(core::string_view sv, int128::uint128& value, int base = 10) noexcept; -constexpr from_chars_result from_chars(const char* first, const char* last, int128::int128_t& value, int base = 10) noexcept; +constexpr from_chars_result from_chars(const char* first, const char* last, int128::int128& value, int base = 10) noexcept; // Allows both std::string and std::string_view (when available) -constexpr from_chars_result from_chars(core::string_view sv, int128::int128_t& value, int base = 10) noexcept; +constexpr from_chars_result from_chars(core::string_view sv, int128::int128& value, int base = 10) noexcept; } // namespace charconv } // namespace boost diff --git a/doc/modules/ROOT/pages/comp_to_multiprecision.adoc b/doc/modules/ROOT/pages/comp_to_multiprecision.adoc index bcd86166..2fd0254a 100644 --- a/doc/modules/ROOT/pages/comp_to_multiprecision.adoc +++ b/doc/modules/ROOT/pages/comp_to_multiprecision.adoc @@ -14,6 +14,6 @@ There are several reasons why: The module weight of this library will be 5, whereas https://pdimov.github.io/boostdep-report/develop/module-weights.html[Boost.Multiprecision is 25] - Fundamentally, the designs of the types are different. In Boost.Multiprecision, `int128` and `uint128` are incident to the arbitrary precision integer `cpp_int`, not a specifically designed type. -In this library both `int128_t` and `uint128_t` are their own classes with individually implemented operators to maximize performance. +In this library both `int128` and `uint128` are their own classes with individually implemented operators to maximize performance. - In Boost.Multiprecision all types are based on a high-level template `number` to allow interoperability with each other. -Again, both `int128_t` and `uint128_t` are their own classes, and are designed to work with and act like the built-in integer types. +Again, both `int128` and `uint128` are their own classes, and are designed to work with and act like the built-in integer types. diff --git a/doc/modules/ROOT/pages/config.adoc b/doc/modules/ROOT/pages/config.adoc index 265d46e8..fffc150f 100644 --- a/doc/modules/ROOT/pages/config.adoc +++ b/doc/modules/ROOT/pages/config.adoc @@ -111,4 +111,4 @@ They are most useful for writing code that has to adapt to what the platform pro [#host_device] - `BOOST_INT128_HOST_DEVICE`: This is defined to `pass:[__host__ __device__]` when compiling for CUDA (`pass:[__CUDACC__]` with `BOOST_INT128_ENABLE_CUDA`), to `SYCL_EXTERNAL` when compiling for SYCL (`BOOST_INT128_ENABLE_SYCL`), and to nothing otherwise. -The core type operations (constructors, conversion operators, and the comparison, bitwise, arithmetic, and shift operators) and most free functions are annotated with this macro, allowing `int128_t` and `uint128_t` to be used in CUDA and SYCL device code. Host-only integrations that depend on host facilities are not annotated: `std::hash`, the iostream operators, the `std::formatter` / pass:[{fmt}] support, and the `core::string_view` overloads of `from_chars`. Under SYCL the `operator long double` conversion is additionally unavailable because the spir64 device target has no `long double`. +The core type operations (constructors, conversion operators, and the comparison, bitwise, arithmetic, and shift operators) and most free functions are annotated with this macro, allowing `int128` and `uint128` to be used in CUDA and SYCL device code. Host-only integrations that depend on host facilities are not annotated: `std::hash`, the iostream operators, the `std::formatter` / pass:[{fmt}] support, and the `core::string_view` overloads of `from_chars`. Under SYCL the `operator long double` conversion is additionally unavailable because the spir64 device target has no `long double`. diff --git a/doc/modules/ROOT/pages/cstdlib.adoc b/doc/modules/ROOT/pages/cstdlib.adoc index ed5636cc..7cf82e57 100644 --- a/doc/modules/ROOT/pages/cstdlib.adoc +++ b/doc/modules/ROOT/pages/cstdlib.adoc @@ -27,14 +27,14 @@ namespace int128 { struct u128div_t { - uint128_t quot; - uint128_t rem; + uint128 quot; + uint128 rem; }; struct i128div_t { - int128_t quot; - int128_t rem; + int128 quot; + int128 rem; }; } // namespace int128 @@ -51,9 +51,9 @@ Using the structures defined above, the `div` function computes both quotient an namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr u128div_t div(uint128_t lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr u128div_t div(uint128 lhs, uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr i128div_t div(int128_t lhs, int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr i128div_t div(int128 lhs, int128 rhs) noexcept; } // namespace int128 } // namespace boost diff --git a/doc/modules/ROOT/pages/design.adoc b/doc/modules/ROOT/pages/design.adoc index 069f5df0..07f8cb96 100644 --- a/doc/modules/ROOT/pages/design.adoc +++ b/doc/modules/ROOT/pages/design.adoc @@ -10,7 +10,7 @@ https://www.boost.org/LICENSE_1_0.txt == Exactly 128 Bits on Every Platform -The central design goal is that `sizeof(uint128_t)` and `sizeof(int128_t)` are exactly 16 bytes on every supported platform. +The central design goal is that `sizeof(uint128)` and `sizeof(int128)` are exactly 16 bytes on every supported platform. The compiler's `pass:[__int128]` extension is only available on some 64-bit targets and is absent on MSVC, while multiprecision types typically carry an additional word of bookkeeping. By fixing the layout at two 64-bit words, the library provides a drop-in 128-bit integer whose size and alignment match a built-in type where one exists. See xref:comp_to_multiprecision.adoc[Comparison to Boost.Multiprecision] for the tradeoffs relative to a multiprecision `number`. @@ -29,19 +29,19 @@ Meeting the pass:[C++14] bar also satisfies the conceptual requirements of libra == Emulating a Built-in Integer -To behave like a built-in integer in generic code, the types provide implicit conversions to and from the built-in integer and floating-point types, and implicit conversion between `int128_t` and `uint128_t`. +To behave like a built-in integer in generic code, the types provide implicit conversions to and from the built-in integer and floating-point types, and implicit conversion between `int128` and `uint128`. The single exception is `operator bool`, which is `explicit` to match the standard library convention and to avoid unintended participation in arithmetic and overload resolution. Mixed-sign and mixed-width operations follow the usual arithmetic conversions of the language. -In particular, an operation mixing a signed and an unsigned 128-bit operand produces a `uint128_t`, identical to the value the equivalent built-in `pass:[unsigned __int128]` operation would produce, with two's-complement wrap-around. +In particular, an operation mixing a signed and an unsigned 128-bit operand produces a `uint128`, identical to the value the equivalent built-in `pass:[unsigned __int128]` operation would produce, with two's-complement wrap-around. See xref:mixed_type_ops.adoc[Mixed Type Operations] for the complete result-type rules. == Layout and Alignment Each type is a struct of two 64-bit words, `low` and `high`, whose declaration order depends on the endianness of the target so that the in-memory representation matches a native 128-bit integer. -Both words are `std::uint64_t` in both types; `int128_t` interprets the pair as two's complement and exposes `signed_high()` for the sign. -Keeping the two halves the same type is what lets a compiler treat the pair as one wide access, so loops over `int128_t` vectorize instead of being scalarized. -See xref:int128_t.adoc#i128_storage[Storage and signed_high]. +Both words are `std::uint64_t` in both types; `int128` interprets the pair as two's complement and exposes `signed_high()` for the sign. +Keeping the two halves the same type is what lets a compiler treat the pair as one wide access, so loops over `int128` vectorize instead of being scalarized. +See xref:int128.adoc#i128_storage[Storage and signed_high]. When a native 128-bit type is available the struct is over-aligned to match it, except on 32-bit x86 where the native alignment is not forced. == GPU Support diff --git a/doc/modules/ROOT/pages/examples.adoc b/doc/modules/ROOT/pages/examples.adoc index 08e186d5..371f6191 100644 --- a/doc/modules/ROOT/pages/examples.adoc +++ b/doc/modules/ROOT/pages/examples.adoc @@ -17,7 +17,7 @@ pass:[C++] has no 128-bit literal, so the first practical question about a 128-b This example covers every route: from a built-in integer, from an explicit pair of high and low 64-bit words, from the `_u128` and `_i128` user-defined literals, from the `BOOST_INT128_UINT128_C` and `BOOST_INT128_INT128_C` macros, from a string through a stream, and from floating point. The floating-point cases at the end are worth reading closely, because the conversion is total: NaN yields zero and out-of-range values saturate to the nearest limit rather than invoking undefined behavior. -.This https://github.com/cppalliance/int128/blob/develop/examples/construction.cpp[example] demonstrates the various ways to construct uint128_t and int128_t values +.This https://github.com/cppalliance/int128/blob/develop/examples/construction.cpp[example] demonstrates the various ways to construct uint128 and int128 values ==== [source, c++] ---- @@ -27,7 +27,7 @@ include::example$construction.cpp[] .Expected Output [listing] ---- -=== uint128_t Construction === +=== uint128 Construction === From builtin (42U): 42 From parts (1, 0) = 2^64: 18446744073709551616 From parts (max, max): 340282366920938463463374607431768211455 @@ -36,7 +36,7 @@ From literal 12345_U128: 12345 From BOOST_INT128_UINT128_C(max): 340282366920938463463374607431768211455 From stringstream: 12345678901234567890123456789 -=== int128_t Construction === +=== int128 Construction === From builtin (-42): -42 From parts (INT64_MIN, 0): -170141183460469231731687303715884105728 Equals numeric_limits min? true @@ -51,17 +51,17 @@ Default constructed: 0 Copy constructed: 340282366920938463463374607431768211455 === Floating-Point Construction === -uint128_t from 12345.9 (truncated): 12345 -int128_t from -12345.9 (truncated toward zero): -12345 -uint128_t from 2^100: 1267650600228229401496703205376 +uint128 from 12345.9 (truncated): 12345 +int128 from -12345.9 (truncated toward zero): -12345 +uint128 from 2^100: 1267650600228229401496703205376 === Floating-Point Edge Cases === -uint128_t from NaN: 0 -int128_t from NaN: 0 -uint128_t from -1.0 (clamped to zero): 0 -uint128_t from +infinity (saturates to UINT128_MAX): 340282366920938463463374607431768211455 -int128_t from 1e40 (saturates to INT128_MAX): 170141183460469231731687303715884105727 -int128_t from -1e40 (saturates to INT128_MIN): -170141183460469231731687303715884105728 +uint128 from NaN: 0 +int128 from NaN: 0 +uint128 from -1.0 (clamped to zero): 0 +uint128 from +infinity (saturates to UINT128_MAX): 340282366920938463463374607431768211455 +int128 from 1e40 (saturates to INT128_MAX): 170141183460469231731687303715884105727 +int128 from -1e40 (saturates to INT128_MIN): -170141183460469231731687303715884105728 ---- ==== @@ -154,13 +154,13 @@ Lower unsigned value: 36893488147419103231 === Large Values (Beyond 64-bit) === 2^64 = 18446744073709551616 2^100 = 1267650600228229401496703205376 -uint128_t max = 340282366920938463463374607431768211455 -int128_t min = -170141183460469231731687303715884105728 -int128_t max = 170141183460469231731687303715884105727 +uint128 max = 340282366920938463463374607431768211455 +int128 min = -170141183460469231731687303715884105728 +int128 max = 170141183460469231731687303715884105727 === String Conversion with std::stringstream === -uint128_t to string: "1267650600228229401496703205376" -String to uint128_t: 123456789012345678901234567890 +uint128 to string: "1267650600228229401496703205376" +String to uint128: 123456789012345678901234567890 === Round-trip Conversion === Original: 68915718020162848918556923512 @@ -174,7 +174,7 @@ Match: true == Rollover Behavior Overflow is defined for both types. -`uint128_t` wraps modulo 2^128 as any unsigned integer does, and `int128_t` wraps using two's complement rather than invoking the undefined behavior that built-in signed overflow does; both types report `is_modulo` through `std::numeric_limits`. +`uint128` wraps modulo 2^128 as any unsigned integer does, and `int128` wraps using two's complement rather than invoking the undefined behavior that built-in signed overflow does; both types report `is_modulo` through `std::numeric_limits`. This example steps over each of the four boundaries in turn. .This https://github.com/cppalliance/int128/blob/develop/examples/rollover.cpp[example] demonstrates the rollover behavior of both the unsigned and signed type @@ -187,18 +187,18 @@ include::example$rollover.cpp[] .Expected Output [listing] ---- -=== uint128_t behavior === -Max of uint128_t: 340282366920938463463374607431768211455 +=== uint128 behavior === +Max of uint128: 340282366920938463463374607431768211455 Max + 1U: 0 -Min of uint128_t: 0 +Min of uint128: 0 Min - 1U: 340282366920938463463374607431768211455 -=== int128_t behavior === -Max of int128_t: 170141183460469231731687303715884105727 +=== int128 behavior === +Max of int128: 170141183460469231731687303715884105727 Max + 1: -170141183460469231731687303715884105728 -Min of int128_t: -170141183460469231731687303715884105728 +Min of int128: -170141183460469231731687303715884105728 Min - 1: 170141183460469231731687303715884105727 ---- ==== @@ -206,7 +206,7 @@ Min - 1: 170141183460469231731687303715884105727 [#examples_bit] == Bitwise Functions () -The `` functions are provided for `uint128_t`, and every one of them is `constexpr`. +The `` functions are provided for `uint128`, and every one of them is `constexpr`. This example takes advantage of that by asserting all of its results with `static_assert`, so the whole thing is checked at compile time: if it builds, it passes. It also shows that `bit.hpp` can be included on its own, without pulling in the umbrella header. @@ -236,9 +236,9 @@ include::example$saturating_arithmetic.cpp[] [listing] ---- === Saturating Arithmetic === -uint128_t max = 340282366920938463463374607431768211455 -int128_t max = 170141183460469231731687303715884105727 -int128_t min = -170141183460469231731687303715884105728 +uint128 max = 340282366920938463463374607431768211455 +int128 max = 170141183460469231731687303715884105727 +int128 min = -170141183460469231731687303715884105728 === Saturating Addition and Subtraction === saturating_add(uint_max, uint_max) = 340282366920938463463374607431768211455 (saturates to uint_max) @@ -252,7 +252,7 @@ saturating_mul(-(int_max - 2), 5) = -170141183460469231731687303715884105728 (sa saturating_div(int_min, -1) = 170141183460469231731687303715884105727 (saturates to int_max; normally this overflows) === Saturating Casts === -saturating_cast(uint_max) = 170141183460469231731687303715884105727 (saturates to int_max) +saturating_cast(uint_max) = 170141183460469231731687303715884105727 (saturates to int_max) saturating_cast(int_max) = 9223372036854775807 (saturates to INT64_MAX) saturating_cast(uint_max) = 2147483647 (saturates to INT32_MAX) ---- @@ -390,7 +390,7 @@ ckd_mul(INT128_MAX, 2): overflow=true, wrapped=-2 ckd_mul(INT128_MIN, -1): overflow=true, wrapped=-170141183460469231731687303715884105728 === Mixed Types === -ckd_add(uint128_t{5}, int128_t{-3}): overflow=false, result=2 +ckd_add(uint128{5}, int128{-3}): overflow=false, result=2 ckd_mul(20, 20): overflow=true, wrapped=144 ---- ==== @@ -412,7 +412,7 @@ include::example$mixed_type_arithmetic.cpp[] .Expected Output [listing] ---- -=== Mixed Type Arithmetic with uint128_t === +=== Mixed Type Arithmetic with uint128 === unsigned_value = 3 unsigned_value + 1 = 4 unsigned_value - 1 = 2 @@ -421,7 +421,7 @@ unsigned_value / 3 = 1 unsigned_value % 3 = 0 unsigned_value + 5 = 8 (same as greater_unsigned_value: 8) -=== Mixed Type Arithmetic with int128_t === +=== Mixed Type Arithmetic with int128 === signed_value = -3 signed_value + 1U = -2 signed_value - 4U = -7 @@ -447,12 +447,12 @@ include::example$math_and_random.cpp[tags=**;!exclude] .Example Output (values vary per run) [listing] ---- -=== uint128_t === +=== uint128 === Mean: 22125900135088040520646253247977468 Variance: 15183108029620265677746188314852225 Median: 169775281866460752209725324063124732284 -=== int128_t === -Random int128_t: 45422201008201503618595888886744218664 +=== int128 === +Random int128: 45422201008201503618595888886744218664 ---- ==== @@ -474,10 +474,10 @@ include::example$charconv.cpp[] [listing] ---- === to_chars === -uint128_t max (decimal): 340282366920938463463374607431768211455 -int128_t min (decimal): -170141183460469231731687303715884105728 -uint128_t (hex): 0xdeadbeefcafebabe12345678 -int128_t 511 (octal): 0777 +uint128 max (decimal): 340282366920938463463374607431768211455 +int128 min (decimal): -170141183460469231731687303715884105728 +uint128 (hex): 0xdeadbeefcafebabe12345678 +int128 511 (octal): 0777 === from_chars === Parsed "340282366920938463463374607431768211455" @@ -508,10 +508,10 @@ include::example$container_hash.cpp[tags=**;!exclude] [listing] ---- === boost::hash on 128-bit types === -boost::hash matches std::hash (uint128_t): true -boost::hash matches std::hash (int128_t): true +boost::hash matches std::hash (uint128): true +boost::hash matches std::hash (int128): true -=== boost::unordered_map === +=== boost::unordered_map === Entries: 3 Label at 2^64: two to the sixty-fourth Contains 42: true @@ -521,7 +521,7 @@ Cities stored: 2 Population at (10, 20): 5000000 Same coordinate hashes equal: true -=== boost::unordered_flat_map === +=== boost::unordered_flat_map === Flat map size: 3 counts[-1] = 1 ---- @@ -532,7 +532,7 @@ counts[-1] = 1 `to_string` is the convenience route to a `std::string`, mirroring `std::to_string` for the built-in integers. This example checks that agreement directly for values inside the 64-bit range and then continues past it. -The last case is a deliberate trap: the magnitude of the most negative `int128_t` is larger than the maximum `int128_t`, so it cannot be written as a negated literal. +The last case is a deliberate trap: the magnitude of the most negative `int128` is larger than the maximum `int128`, so it cannot be written as a negated literal. The `NOTE` following the output explains what to use instead. .This https://github.com/cppalliance/int128/blob/develop/examples/to_string.cpp[example] demonstrates to_string for 128-bit integers, comparing results against std::to_string for values that fit in 64 bits @@ -545,34 +545,34 @@ include::example$to_string.cpp[] .Expected Output [listing] ---- -=== to_string with uint128_t === -uint128_t to_string(1234567890): 1234567890 +=== to_string with uint128 === +uint128 to_string(1234567890): 1234567890 std::to_string(uint64_t 1234567890): 1234567890 Match: true -uint128_t to_string(UINT64_MAX): 18446744073709551615 +uint128 to_string(UINT64_MAX): 18446744073709551615 std::to_string(UINT64_MAX): 18446744073709551615 Match: true -uint128_t max: 340282366920938463463374607431768211455 +uint128 max: 340282366920938463463374607431768211455 -=== to_string with int128_t === -int128_t to_string(-42): -42 +=== to_string with int128 === +int128 to_string(-42): -42 std::to_string(int64_t -42): -42 Match: true -int128_t to_string(INT64_MAX): 9223372036854775807 +int128 to_string(INT64_MAX): 9223372036854775807 std::to_string(INT64_MAX): 9223372036854775807 Match: true -int128_t min with string literal: 0 +int128 min with string literal: 0 -int128_t min with INT128_C macro: -170141183460469231731687303715884105728 -int128_t max: 170141183460469231731687303715884105727 +int128 min with INT128_C macro: -170141183460469231731687303715884105728 +int128 max: 170141183460469231731687303715884105727 ---- ==== -NOTE: The line `int128_t min with string literal: 0` is expected. The positive magnitude of the minimum `int128_t` value (2^127) is larger than the maximum `int128_t` value, so it cannot be written as a negated `_i128` literal. Construct it with `BOOST_INT128_INT128_C` or `(std::numeric_limits::min)()`, as the example shows. +NOTE: The line `int128 min with string literal: 0` is expected. The positive magnitude of the minimum `int128` value (2^127) is larger than the maximum `int128` value, so it cannot be written as a negated `_i128` literal. Construct it with `BOOST_INT128_INT128_C` or `(std::numeric_limits::min)()`, as the example shows. [#examples_fmt_format] == \{fmt} Library Integration @@ -639,9 +639,9 @@ Left align hex: 'ff ' Center with prefix: '****0xff****' === Large Values === -uint128_t max: 340282366920938463463374607431768211455 -uint128_t max (hex): 0xffffffffffffffffffffffffffffffff -int128_t min: -170141183460469231731687303715884105728 +uint128 max: 340282366920938463463374607431768211455 +uint128 max (hex): 0xffffffffffffffffffffffffffffffff +int128 min: -170141183460469231731687303715884105728 === Combined Format Specifiers === Hex with prefix, uppercase, padded: 0XDEADBEEFCAFEBABE12345678 @@ -740,7 +740,7 @@ All CPU and GPU computed elements match! A GPU is a natural fit for primality testing because every candidate is independent, but the arithmetic is not expressible in 64 bits. Miller-Rabin repeatedly reduces a product of two residues modulo `n`; when `n` is a 64-bit value both operands can approach `2^64`, so -the product needs a full 128 bits before it can be reduced. `uint128_t` supplies that +the product needs a full 128 bits before it can be reduced. `uint128` supplies that intermediate in device code, where `unsigned __int128` is not portably available. .This https://github.com/cppalliance/int128/blob/develop/examples/cuda_primality.cu[example] runs a deterministic Miller-Rabin test over the largest odd values representable in 64 bits, one candidate per thread, using xref:utilities.adoc#powm[`powm`] and the 128-bit product for the modular squarings. @@ -755,7 +755,7 @@ include::example$cuda_primality.cu[] ---- Full 128-bit product a * b: 159945956516994065446882290339781513595 (a * b) % n, 64-bit math: 17693923505768731003 <- the product wrapped - (a * b) % n via uint128_t: 12755662373092413040 + (a * b) % n via uint128: 12755662373092413040 [Miller-Rabin on 65536 odd candidates from 18446744073709420545 to 18446744073709551615] CUDA kernel launch with 256 blocks of 256 threads @@ -772,7 +772,7 @@ Reductions are the other common reason to reach for a wider integer on a GPU. A of 64-bit integers overflows a 64-bit accumulator, and widening to `double` only trades a wrong answer for a lossy one. Floating point also makes the result depend on the order of summation, which a parallel reduction does not control: the partitioning of the work becomes -part of the answer. Integer addition is associative, so a `uint128_t` accumulator is both +part of the answer. Integer addition is associative, so a `uint128` accumulator is both exact and independent of how the reduction is split across the device. .This https://github.com/cppalliance/int128/blob/develop/examples/sycl_accumulate.cpp[example] computes an exact dot product on the device as 1024 strided partial sums, then shows that it is bit-for-bit equal to the host result summed in either direction, while a 64-bit accumulator wraps and a `double` cannot represent even a single product. @@ -788,7 +788,7 @@ include::example$sycl_accumulate.cpp[] [Exact dot product of 1048576 pairs of 40-bit integers] SYCL device: Intel(R) ... -uint128_t accumulator, exact and 99 bits wide +uint128 accumulator, exact and 99 bits wide device, 1024 strided partials : 317117374481213326859021202374 host, ascending order : 317117374481213326859021202374 host, descending order : 317117374481213326859021202374 @@ -799,7 +799,7 @@ uint64_t accumulator, silently wrong times it wrapped past 2^64 : 17190967317 double, too few significand bits for even one product - lhs[0] * rhs[0] as uint128_t : 583389027108597783863934 (79 bits) + lhs[0] * rhs[0] as uint128 : 583389027108597783863934 (79 bits) lhs[0] * rhs[0] as double : 5.8338902710859781e+23 rounding error : 23584130 diff --git a/doc/modules/ROOT/pages/file_structure.adoc b/doc/modules/ROOT/pages/file_structure.adoc index dfd495b4..949b21df 100644 --- a/doc/modules/ROOT/pages/file_structure.adoc +++ b/doc/modules/ROOT/pages/file_structure.adoc @@ -37,10 +37,10 @@ The entire library can be consumed via ``, or by independently | C++20 `std::format` support | xref:hash.adoc[``] -| `std::hash` specializations for `int128_t` and `uint128_t` +| `std::hash` specializations for `int128` and `uint128` | xref:api_reference.adoc#api_types[``] -| Core type definitions (xref:uint128_t.adoc[`uint128_t`], xref:int128_t.adoc[`int128_t`]) +| Core type definitions (xref:uint128.adoc[`uint128`], xref:int128.adoc[`int128`]) | xref:stream.adoc[``] | Stream insertion/extraction operators diff --git a/doc/modules/ROOT/pages/hash.adoc b/doc/modules/ROOT/pages/hash.adoc index 9d06ed91..f83f660c 100644 --- a/doc/modules/ROOT/pages/hash.adoc +++ b/doc/modules/ROOT/pages/hash.adoc @@ -8,7 +8,7 @@ https://www.boost.org/LICENSE_1_0.txt = Hashing :idprefix: hash_ -The `` header provides specializations of `std::hash` for `uint128_t` and `int128_t`, allowing the library types to be used as keys in `std::unordered_map`, `std::unordered_set`, and any other container that relies on `std::hash`. +The `` header provides specializations of `std::hash` for `uint128` and `int128`, allowing the library types to be used as keys in `std::unordered_map`, `std::unordered_set`, and any other container that relies on `std::hash`. [source, c++] ---- @@ -23,15 +23,15 @@ The `` header provides specializations of `std::hash` for namespace std { template <> -struct hash +struct hash { - std::size_t operator()(boost::int128::int128_t v) const noexcept; + std::size_t operator()(boost::int128::int128 v) const noexcept; }; template <> -struct hash +struct hash { - std::size_t operator()(boost::int128::uint128_t v) const noexcept; + std::size_t operator()(boost::int128::uint128 v) const noexcept; }; } // namespace std @@ -45,7 +45,7 @@ The two finalized halves are then combined with the `boost::hash_combine` mixing == Guarantees * Two values comparing equal under `operator==` produce the same hash. -* For any non-zero `v`, `std::hash{}(v) != std::hash{}(-v)`. +* For any non-zero `v`, `std::hash{}(v) != std::hash{}(-v)`. * The mixing function is asymmetric, so `{high, low}` and `{low, high}` do not collide except by chance. [#hash_container_hash] @@ -58,9 +58,9 @@ The header also injects `hash_value` overloads into the `boost::int128` namespac namespace boost { namespace int128 { -std::size_t hash_value(uint128_t v) noexcept; +std::size_t hash_value(uint128 v) noexcept; -std::size_t hash_value(int128_t v) noexcept; +std::size_t hash_value(int128 v) noexcept; } // namespace int128 } // namespace boost @@ -82,9 +82,9 @@ See the xref:examples.adoc#examples_boost_container_hash[Boost.ContainerHash int int main() { - std::unordered_map counts {}; - counts[boost::int128::uint128_t{1, 0}] = 1; - counts[boost::int128::uint128_t{0, 1}] = 2; + std::unordered_map counts {}; + counts[boost::int128::uint128{1, 0}] = 1; + counts[boost::int128::uint128{0, 1}] = 2; return 0; } diff --git a/doc/modules/ROOT/pages/i128_benchmarks.adoc b/doc/modules/ROOT/pages/i128_benchmarks.adoc index ebcba16d..4dbdbca2 100644 --- a/doc/modules/ROOT/pages/i128_benchmarks.adoc +++ b/doc/modules/ROOT/pages/i128_benchmarks.adoc @@ -5,7 +5,7 @@ https://www.boost.org/LICENSE_1_0.txt //// [#i128_benchmarks] -= `int128_t` Benchmarks += `int128` Benchmarks :idprefix: i128_benchmarks_ == Methodology @@ -16,7 +16,7 @@ Each platform states its element count and pass count, and therefore how many op The `Comparisons` row is the total of all six relational operators (`==`, `!=`, `<`, `<=`, `>`, `>=`) over that same vector, which is why it costs roughly six arithmetic rows. On most platforms we use the builtin `\__int128` as the reference benchmark. -When this is unavailable (such as on 32-bit architectures) we use `boost::multiprecision::int128_t` (abbreviated as `boost::mp::int128_t`) as it is widely used, and known to be portable. +When this is unavailable (such as on 32-bit architectures) we use `boost::multiprecision::int128` (abbreviated as `boost::mp::int128`) as it is widely used, and known to be portable. On MSVC platforms we use as reference `std::_Signed128` from the header `<__msvc_int128.hpp>` since this is bundled with their compiler. Lastly, when available, the benchmarks are also run with `absl::int128` which is the 128-bit signed integer from the https://abseil.io[Abseil Libraries]. @@ -53,7 +53,7 @@ Measured with GCC 14.2 (pass:[C++]20): 5 passes over 20,000,000 element pairs (1 [cols="1,>1,>1,>1,>1"] |=== -| Operation | `__int128` | `int128_t` | `boost::mp::int128_t` | `absl::int128` +| Operation | `__int128` | `int128` | `boost::mp::int128` | `absl::int128` | Comparisons | 575,065 | 500,451 | 1,703,153 | 503,204 | Addition | 65,874 | 60,371 | 176,054 | 60,901 @@ -71,7 +71,7 @@ Measured with GCC 14.2 (pass:[C++]20): 5 passes over 20,000,000 element pairs (1 [cols="1,>1,>1,>1,>1"] |=== -| Operation | `__int128` | `int128_t` | `boost::mp::int128_t` | `absl::int128` +| Operation | `__int128` | `int128` | `boost::mp::int128` | `absl::int128` | Comparisons | 1,548,448 | 978,632 | 2,358,441 | 1,576,854 | Addition | 86,459 | 87,101 | 221,898 | 88,399 @@ -89,7 +89,7 @@ Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10 [cols="1,>1,>1,>1,>1"] |=== -| Operation | `__int128` | `int128_t` | `boost::mp::int128_t` | `absl::int128` +| Operation | `__int128` | `int128` | `boost::mp::int128` | `absl::int128` | Comparisons | 785,777 | 708,911 | 2,059,404 | 525,305 | Addition | 50,685 | 44,057 | 258,246 | 37,090 @@ -107,7 +107,7 @@ Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10 [cols="1,>1,>1,>1"] |=== -| Operation | `__int128` | `int128_t` | `boost::mp::int128_t` +| Operation | `__int128` | `int128` | `boost::mp::int128` | Comparisons | 428,645 | 462,487 | 1,021,098 | Addition | 24,939 | 16,225 | 118,021 @@ -121,13 +121,13 @@ image::i128_graphs/linux/ppc64le_relative_performance.png[ppc64le Relative Perfo === x86_32 -NOTE: This platform has no hardware type so we compare relative to `boost::mp::int128_t` +NOTE: This platform has no hardware type so we compare relative to `boost::mp::int128` Measured with GCC 14.2 (pass:[C++]20): 5 passes over 10,000,000 element pairs (50,000,000 operations per cell). [cols="1,>1,>1"] |=== -| Operation | `int128_t` | `boost::mp::int128_t` +| Operation | `int128` | `boost::mp::int128` | Comparisons | 1,803,323 | 2,166,376 | Addition | 159,907 | 1,198,244 @@ -141,13 +141,13 @@ image::i128_graphs/linux/x86_relative_performance.png[x86 Relative Performance, === ARM32 -NOTE: This platform has no hardware type so we compare relative to `boost::mp::int128_t` +NOTE: This platform has no hardware type so we compare relative to `boost::mp::int128` Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10,000,000 operations per cell). [cols="1,>1,>1"] |=== -| Operation | `int128_t` | `boost::mp::int128_t` +| Operation | `int128` | `boost::mp::int128` | Comparisons | 1,199,464 | 1,149,576 | Addition | 90,313 | 1,105,341 @@ -168,7 +168,7 @@ Measured with MSVC 14.51 (pass:[C++]20): 5 passes over 20,000,000 element pairs [cols="1,>1,>1,>1"] |=== -| Operation | `std::_Signed128` | `int128_t` | `boost::mp::int128_t` +| Operation | `std::_Signed128` | `int128` | `boost::mp::int128` | Comparisons | 1,361,518 | 1,271,189 | 4,315,263 | Addition | 115,135 | 107,633 | 2,089,612 @@ -186,7 +186,7 @@ Measured with MSVC 14.44 (pass:[C++]20): 5 passes over 20,000,000 element pairs [cols="1,>1,>1,>1"] |=== -| Operation | `std::_Signed128` | `int128_t` | `boost::mp::int128_t` +| Operation | `std::_Signed128` | `int128` | `boost::mp::int128` | Comparisons | 1,191,566 | 1,125,261 | 2,871,780 | Addition | 86,160 | 84,055 | 1,598,093 @@ -204,7 +204,7 @@ Measured with MSVC 14.51 (pass:[C++]20): 5 passes over 10,000,000 element pairs [cols="1,>1,>1,>1"] |=== -| Operation | `std::_Signed128` | `int128_t` | `boost::mp::int128_t` +| Operation | `std::_Signed128` | `int128` | `boost::mp::int128` | Comparisons | 2,084,732 | 1,947,041 | 2,898,710 | Addition | 131,344 | 128,063 | 1,325,852 @@ -225,7 +225,7 @@ Measured with Apple Clang 21.0 (pass:[C++]20): 5 passes over 20,000,000 element [cols="1,>1,>1,>1,>1"] |=== -| Operation | `__int128` | `int128_t` | `boost::mp::int128_t` | `absl::int128` +| Operation | `__int128` | `int128` | `boost::mp::int128` | `absl::int128` | Comparisons | 479,219 | 358,275 | 1,035,078 | 405,457 | Addition | 152,489 | 90,873 | 444,144 | 72,358 diff --git a/doc/modules/ROOT/pages/int128_t.adoc b/doc/modules/ROOT/pages/int128.adoc similarity index 64% rename from doc/modules/ROOT/pages/int128_t.adoc rename to doc/modules/ROOT/pages/int128.adoc index fc9b432c..26505b1d 100644 --- a/doc/modules/ROOT/pages/int128_t.adoc +++ b/doc/modules/ROOT/pages/int128.adoc @@ -4,13 +4,13 @@ Distributed under the Boost Software License, Version 1.0. https://www.boost.org/LICENSE_1_0.txt //// -[#int128_t] -= int128_t -:idprefix: int128_t_ +[#int128] += int128 +:idprefix: int128_ == Description -`int128_t` is a signed 128-bit integer. +`int128` is a signed 128-bit integer. [source, c++] ---- @@ -19,7 +19,7 @@ https://www.boost.org/LICENSE_1_0.txt namespace boost { namespace int128 { -struct int128_t { +struct int128 { #if BOOST_INT128_ENDIAN_LITTLE_BYTE std::uint64_t low {}; @@ -41,7 +41,7 @@ struct int128_t { The type provides: -* Constructors from all built-in integer types and `uint128_t` +* Constructors from all built-in integer types and `uint128` * Conversion operators to built-in integer and floating-point types * Full set of comparison operators (`<`, `<=`, `>`, `>=`, `==`, `!=`) * Bitwise operators (`~`, `|`, `&`, `^`, `<<`, `>>`) @@ -53,8 +53,8 @@ The type provides: == Storage and `signed_high` Both words are `std::uint64_t`, and the value is interpreted as two's complement across the pair. -The two halves deliberately have the *same* type: when they differ, a compiler's data-reference analysis cannot merge them into one wide access, and loops over `int128_t` come out with shuffles or fully scalarized. -Giving both words the same type makes the signed type generate the same code as `uint128_t`, which has always had uniform words. +The two halves deliberately have the *same* type: when they differ, a compiler's data-reference analysis cannot merge them into one wide access, and loops over `int128` come out with shuffles or fully scalarized. +Giving both words the same type makes the signed type generate the same code as `uint128`, which has always had uniform words. To read the high word as a signed quantity, use `signed_high()`: @@ -67,13 +67,13 @@ It is a pure reinterpretation of the stored bits and is `constexpr` on all platf [source, c++] ---- -const boost::int128::int128_t v {-1}; +const boost::int128::int128 v {-1}; v.high; // 0xFFFFFFFFFFFFFFFF, a std::uint64_t v.signed_high(); // -1, a std::int64_t ---- -The two-word constructor still takes its high word as `std::int64_t`, so `int128_t{-1, 0}` and `int128_t{INT64_MIN, 0}` are unchanged. +The two-word constructor still takes its high word as `std::int64_t`, so `int128{-1, 0}` and `int128{INT64_MIN, 0}` are unchanged. CAUTION: Code that reads `high` directly and depends on its signedness, such as `value.high < 0`, changes meaning: the comparison is now unsigned and always false. Replace those reads with `value.signed_high() < 0`, or simply compare the value itself (`value < 0`). @@ -84,7 +84,7 @@ If your platform has a native 128-bit signed integer, the struct is over-aligned [source, c++] ---- -struct alignas(alignof(__int128)) int128_t +struct alignas(alignof(__int128)) int128 ---- Otherwise (including 32-bit x86), the alignment is left up to the compiler to decide. @@ -92,16 +92,16 @@ Otherwise (including 32-bit x86), the alignment is left up to the compiler to de [#i128_operator_behavior] == Operator Behavior -All comparison, arithmetic, bitwise, and shift operators are defined between `int128_t` and any built-in integer type, signed or unsigned. +All comparison, arithmetic, bitwise, and shift operators are defined between `int128` and any built-in integer type, signed or unsigned. Their behavior follows the C++ usual arithmetic conversions and is value-identical to the corresponding builtin `__int128` operation. Specifically: -* For built-in unsigned types of lesser rank (`uint8_t` through `uint64_t`), `int128_t` is the common type and arithmetic / bitwise operations return `int128_t` with signed semantics. -* For `unsigned __int128` (same rank), the signed `int128_t` is converted to the unsigned counterpart, the operation is performed unsigned, and arithmetic / bitwise operations return `uint128_t` (the library's wrapper for `unsigned __int128`). -* For shift operators, the result type follows the LHS: `int128_t << T` and `int128_t >> T` always return `int128_t`, regardless of `T`. +* For built-in unsigned types of lesser rank (`uint8_t` through `uint64_t`), `int128` is the common type and arithmetic / bitwise operations return `int128` with signed semantics. +* For `unsigned __int128` (same rank), the signed `int128` is converted to the unsigned counterpart, the operation is performed unsigned, and arithmetic / bitwise operations return `uint128` (the library's wrapper for `unsigned __int128`). +* For shift operators, the result type follows the LHS: `int128 << T` and `int128 >> T` always return `int128`, regardless of `T`. * All comparison operators return `bool`, with the comparison performed on the operands after conversion to the common type. -NOTE: Division and remainder match `__int128` for every input except the two the built-in leaves undefined. Division or remainder by zero is likewise undefined behavior: the library adds no zero-divisor check, so it behaves like the built-in (a hardware trap on platforms that fault on integer division by zero) and is a hard compile-time error in a constant expression. The signed overflow `INT128_MIN / -1`, whose true quotient is not representable, is the one case the library defines rather than leaving undefined: it wraps to `INT128_MIN` (and `INT128_MIN % -1` is `0`), matching the two's-complement wrap the library applies to other overflowing signed operations such as `INT128_MIN * -1`. See xref:int128_t.adoc#i128_math_operators[Division] and Modulo below. +NOTE: Division and remainder match `__int128` for every input except the two the built-in leaves undefined. Division or remainder by zero is likewise undefined behavior: the library adds no zero-divisor check, so it behaves like the built-in (a hardware trap on platforms that fault on integer division by zero) and is a hard compile-time error in a constant expression. The signed overflow `INT128_MIN / -1`, whose true quotient is not representable, is the one case the library defines rather than leaving undefined: it wraps to `INT128_MIN` (and `INT128_MIN % -1` is `0`), matching the two's-complement wrap the library applies to other overflowing signed operations such as `INT128_MIN * -1`. See xref:int128.adoc#i128_math_operators[Division] and Modulo below. See xref:mixed_type_ops.adoc[Mixed Type Operations] for the full set of cross-type signatures and detailed result-type rules. @@ -113,41 +113,41 @@ See xref:mixed_type_ops.adoc[Mixed Type Operations] for the full set of cross-ty namespace boost { namespace int128 { -struct int128_t +struct int128 { ... // Defaulted basic construction - BOOST_INT128_HOST_DEVICE constexpr int128_t() noexcept = default; - BOOST_INT128_HOST_DEVICE constexpr int128_t(const int128_t&) noexcept = default; - BOOST_INT128_HOST_DEVICE constexpr int128_t(int128_t&&) noexcept = default; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator=(const int128_t&) noexcept = default; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator=(int128_t&&) noexcept = default; + BOOST_INT128_HOST_DEVICE constexpr int128() noexcept = default; + BOOST_INT128_HOST_DEVICE constexpr int128(const int128&) noexcept = default; + BOOST_INT128_HOST_DEVICE constexpr int128(int128&&) noexcept = default; + BOOST_INT128_HOST_DEVICE constexpr int128& operator=(const int128&) noexcept = default; + BOOST_INT128_HOST_DEVICE constexpr int128& operator=(int128&&) noexcept = default; - BOOST_INT128_HOST_DEVICE constexpr int128_t(const uint128_t& v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(const uint128& v) noexcept; // Construct from integral types - BOOST_INT128_HOST_DEVICE constexpr int128_t(const std::int64_t hi, const std::uint64_t lo) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(const std::int64_t hi, const std::uint64_t lo) noexcept; template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const SignedInteger v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(const SignedInteger v) noexcept; template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const UnsignedInteger v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(const UnsignedInteger v) noexcept; #ifdef BOOST_INT128_HAS_INT128 // Typically a typedef from __int128 - BOOST_INT128_HOST_DEVICE constexpr int128_t(const detail::builtin_i128 v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(const detail::builtin_i128 v) noexcept; // Typically a typedef unsigned __int128 - BOOST_INT128_HOST_DEVICE constexpr int128_t(const detail::builtin_u128 v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(const detail::builtin_u128 v) noexcept; #endif // BOOST_INT128_HAS_INT128 // Construct from floating-point types template - BOOST_INT128_HOST_DEVICE constexpr int128_t(Float f) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(Float f) noexcept; }; } // namespace int128 @@ -155,7 +155,7 @@ struct int128_t ---- None of the constructors are marked `explicit` in order to match the implicit conversion behavior of the built-in integer types. -Integer constructors are subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +Integer constructors are subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. The floating-point constructor truncates toward zero, matching `static_cast<__int128>(f)`. Edge cases mirror libgcc's `__fixXfti`: NaN yields zero, values `>= 2^127` saturate to `INT128_MAX`, and values `<= -2^127` saturate to `INT128_MIN`. @@ -168,7 +168,7 @@ Edge cases mirror libgcc's `__fixXfti`: NaN yields zero, values `>= 2^127` satur namespace boost { namespace int128 { -struct int128_t +struct int128 { ... @@ -200,9 +200,9 @@ struct int128_t ---- All conversion operators except `operator bool()` are implicit to match the behavior of built-in integer types. -`operator bool()` is explicit so that an `int128_t` cannot accidentally bind to a `bool` parameter; contextual conversions (`if (x)`, `!x`, etc.) still work. -Conversions to unsigned integers are subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. -Conversions to floating-point types may not be lossless depending on the value of the `int128_t` at time of conversion, +`operator bool()` is explicit so that an `int128` cannot accidentally bind to a `bool` parameter; contextual conversions (`if (x)`, `!x`, etc.) still work. +Conversions to unsigned integers are subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. +Conversions to floating-point types may not be lossless depending on the value of the `int128` at time of conversion, as the number of digits it represents can exceed the precision of the significand in floating point types. [#i128_comparison_operators] @@ -213,108 +213,108 @@ as the number of digits it represents can exceed the precision of the significan [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128 lhs, const int128 rhs) noexcept; ---- Returns if the `lhs` value is less than the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Less Than or Equal To [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128 lhs, const int128 rhs) noexcept; ---- Returns if the `lhs` value is less than or equal to the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Greater Than [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128 lhs, const int128 rhs) noexcept; ---- Returns if the `lhs` value is greater than the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Greater Than or Equal To [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128 lhs, const int128 rhs) noexcept; ---- Returns if the `lhs` value is greater than or equal to the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Equality [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128 lhs, const int128 rhs) noexcept; ---- Returns if the `lhs` value is equal to the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Inequality [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128 lhs, const int128 rhs) noexcept; ---- Returns if the `lhs` value is not equal to the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Spaceship Operator (Requires pass:[C++20]) [source, c++] ---- -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 lhs, const int128 rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Integer lhs, const int128 rhs) noexcept; ---- Returns one of the following without exception: @@ -330,7 +330,7 @@ Returns one of the following without exception: [source, c++] ---- -BOOST_INT128_HOST_DEVICE constexpr int128_t operator~(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator~(const int128 rhs) noexcept ---- Returns the bitwise negation of `rhs` without exception. @@ -340,70 +340,70 @@ Returns the bitwise negation of `rhs` without exception. [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const int128 lhs, const int128 rhs) noexcept; ---- Returns the bitwise or of `lhs` and `rhs` without exception. -This operation is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === And [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const int128 lhs, const int128 rhs) noexcept; ---- Returns the bitwise and of `lhs` and `rhs` without exception. -This operation is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Xor [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const int128 lhs, const int128 rhs) noexcept; ---- Returns the bitwise xor of `lhs` and `rhs` without exception. -This operation is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Left Shift [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator<<(const int128 lhs, const Integer rhs) noexcept; template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const int128 rhs) noexcept; template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned int operator<<(const UnsignedInteger lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr unsigned int operator<<(const UnsignedInteger lhs, const int128 rhs) noexcept; // When the compiler provides native 128-bit integers, a built-in 128-bit lhs -// shifted by an int128_t returns that built-in type. +// shifted by an int128 returns that built-in type. #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_HOST_DEVICE constexpr detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const int128_t rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const int128 rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const int128 rhs) noexcept; #endif -BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator<<(const int128 lhs, const int128 rhs) noexcept; ---- Returns the bitwise left shift of `lhs` without exception. @@ -415,30 +415,30 @@ When the count is in the range `[0, 128)` the low bits vacated by the shift are Shifting by a count that is negative or greater than or equal to `128` (the operand width in bits) is *undefined behavior*, exactly as for the built-in shift operators and the native `__int128` and `unsigned __int128` types (`[expr.shift]` in the C++ standard). No result is guaranteed, not even zero, and inside a constant expression the program is ill-formed. Delegating straight to the native shift this way keeps the in-range operation branchless and bit-for-bit compatible with the built-in types. ==== -When a built-in integer is the `lhs` and an `int128_t` is the shift amount, the return type matches the promotion behavior of the built-in shift: integer types of 16 bits or fewer promote to `int` or `unsigned int`, and, where the compiler provides them, the native 128-bit types return their own type. -This operation is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +When a built-in integer is the `lhs` and an `int128` is the shift amount, the return type matches the promotion behavior of the built-in shift: integer types of 16 bits or fewer promote to `int` or `unsigned int`, and, where the compiler provides them, the native 128-bit types return their own type. +This operation is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Right Shift [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator>>(const int128 lhs, const Integer rhs) noexcept; template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const int128 rhs) noexcept; template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned int operator>>(const UnsignedInteger lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr unsigned int operator>>(const UnsignedInteger lhs, const int128 rhs) noexcept; // When the compiler provides native 128-bit integers, a built-in 128-bit lhs -// shifted by an int128_t returns that built-in type. +// shifted by an int128 returns that built-in type. #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_HOST_DEVICE constexpr detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const int128_t rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const int128 rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const int128 rhs) noexcept; #endif -BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator>>(const int128 lhs, const int128 rhs) noexcept; ---- Returns the bitwise right shift of `lhs` without exception. @@ -450,23 +450,23 @@ When the count is in the range `[0, 128)` the shift is arithmetic: the high bits Shifting by a count that is negative or greater than or equal to `128` (the operand width in bits) is *undefined behavior*, exactly as for the built-in shift operators and the native `__int128` and `unsigned __int128` types (`[expr.shift]` in the C++ standard). No result is guaranteed, not even zero or a fully sign-extended value, and inside a constant expression the program is ill-formed. Delegating straight to the native shift this way keeps the in-range operation branchless and bit-for-bit compatible with the built-in types. ==== -When a built-in integer is the `lhs` and an `int128_t` is the shift amount, the return type matches the promotion behavior of the built-in shift: integer types of 16 bits or fewer promote to `int` or `unsigned int`, and, where the compiler provides them, the native 128-bit types return their own type. -This operation is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +When a built-in integer is the `lhs` and an `int128` is the shift amount, the return type matches the promotion behavior of the built-in shift: integer types of 16 bits or fewer promote to `int` or `unsigned int`, and, where the compiler provides them, the native 128-bit types return their own type. +This operation is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. [#i128_math_operators] == Arithmetic Operators All of the arithmetic operators use two's-complement wrap-around on overflow. -When a result is not representable in an `int128_t` it silently rolls over modulo `2^128` rather than trapping or invoking undefined behavior, matching `std::numeric_limits::is_modulo`. +When a result is not representable in an `int128` it silently rolls over modulo `2^128` rather than trapping or invoking undefined behavior, matching `std::numeric_limits::is_modulo`. For example, `BOOST_INT128_INT128_MAX + 1` wraps to `BOOST_INT128_INT128_MIN`, and `BOOST_INT128_INT128_MIN - 1` wraps to `BOOST_INT128_INT128_MAX`. === Unary Plus and Minus [source, c++] ---- -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t value) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t value) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 value) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 value) noexcept; ---- Unary `operator+` returns `value` unchanged. @@ -478,101 +478,101 @@ Negating `BOOST_INT128_INT128_MIN` wraps back to itself, matching the behavior o [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 lhs, const int128 rhs) noexcept; ---- -Returns as an `int128_t` the sum of `lhs` and `rhs`. +Returns as an `int128` the sum of `lhs` and `rhs`. If the sum is greater than `BOOST_INT128_INT128_MAX`, the operation silently performs signed rollover to `BOOST_INT128_INT128_MIN`. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Subtraction [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 lhs, const int128 rhs) noexcept; ---- -Returns as an `int128_t` the difference of `lhs` and `rhs`. +Returns as an `int128` the difference of `lhs` and `rhs`. If the difference is less than `BOOST_INT128_INT128_MIN`, the operation silently performs signed rollover to `BOOST_INT128_INT128_MAX`. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Multiplication [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const int128 lhs, const int128 rhs) noexcept; ---- -Returns as an `int128_t` the product of `lhs` and `rhs`. +Returns as an `int128` the product of `lhs` and `rhs`. If the product overflows, the operation silently performs signed rollover (wrapping from `BOOST_INT128_INT128_MAX` to `BOOST_INT128_INT128_MIN` or vice versa). -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Division [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const int128 lhs, const int128 rhs) noexcept; ---- -Returns as an `int128_t` the quotient of `lhs` and `rhs` without exception. +Returns as an `int128` the quotient of `lhs` and `rhs` without exception. The quotient truncates toward zero, and for any `rhs` other than `0` (and other than the overflow noted below) the result is identical to the built-in `__int128` division. Division by zero is undefined behavior, exactly as for `__int128`: the library adds no zero-divisor check (so the generated code matches the built-in and traps where the hardware faults on integer division by zero), and a zero divisor seen during constant evaluation is a hard compile-time error. The signed overflow `INT128_MIN / -1` is defined to wrap to `INT128_MIN` rather than being left undefined as it is for the built-in. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. === Modulo [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const int128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const Integer lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const Integer lhs, const int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const int128 lhs, const int128 rhs) noexcept; ---- -Returns as an `int128_t` the remainder of `lhs` and `rhs` without exception. +Returns as an `int128` the remainder of `lhs` and `rhs` without exception. The remainder takes the sign of the dividend `lhs`, and for any `rhs` other than `0` the result is identical to the built-in `__int128` remainder, so that `(lhs / rhs) * rhs + lhs % rhs == lhs`. Remainder by zero is undefined behavior, exactly as for `__int128`: the library adds no zero-divisor check (so the generated code matches the built-in and traps where the hardware faults on integer division by zero), and a zero divisor seen during constant evaluation is a hard compile-time error. The signed overflow `INT128_MIN % -1` is defined to be `0` rather than being left undefined as it is for the built-in. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128_t.adoc#i128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:int128.adoc#i128_operator_behavior[above]. [#i128_abs] === Absolute Value [source, c++] ---- -BOOST_INT128_HOST_DEVICE constexpr int128_t abs(int128_t value) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 abs(int128 value) noexcept; ---- -Returns the absolute value of `value` as an `int128_t`. +Returns the absolute value of `value` as an `int128`. For negative inputs the result is computed by negation, so the range of the return value is the same asymmetric range as the type itself. -The magnitude of `BOOST_INT128_INT128_MIN` is one greater than `BOOST_INT128_INT128_MAX` and is therefore not representable as a positive `int128_t`. +The magnitude of `BOOST_INT128_INT128_MIN` is one greater than `BOOST_INT128_INT128_MAX` and is therefore not representable as a positive `int128`. In that single case `abs` rolls over and returns `BOOST_INT128_INT128_MIN` unchanged, so the result remains negative. This is consistent with the two's-complement wrap-around of unary `operator-` described above. Note that calling `std::abs` on a built-in signed integer holding its minimum value is undefined behavior, whereas this overload is well-defined for every input and never traps or throws. @@ -580,7 +580,7 @@ Note that calling `std::abs` on a built-in signed integer holding its minimum va [#i128_limits] == `` Support and Values -A full specialization of `std::numeric_limits` is provided. +A full specialization of `std::numeric_limits` is provided. It is defined in xref:api_reference.adoc#api_structs[``] and is also included by the umbrella header ``. The member values match those of a built-in signed 128-bit integer. @@ -591,14 +591,14 @@ The member values match those of a built-in signed 128-bit integer. namespace std { template <> -class numeric_limits; +class numeric_limits; } // namespace std ---- === Member Functions -Each function is `static constexpr` and returns an `int128_t`. +Each function is `static constexpr` and returns an `int128`. [cols="1,2", options="header"] |=== @@ -632,7 +632,7 @@ Each function is `static constexpr` and returns an `int128_t`. | `0` |=== -NOTE: Wrap `min` and `max` in parentheses at the call site, as `(std::numeric_limits::min)()`, so the call is not intercepted by the `min`/`max` function-like macros that some platform headers define. +NOTE: Wrap `min` and `max` in parentheses at the call site, as `(std::numeric_limits::min)()`, so the call is not intercepted by the `min`/`max` function-like macros that some platform headers define. === Member Constants diff --git a/doc/modules/ROOT/pages/literals.adoc b/doc/modules/ROOT/pages/literals.adoc index 2670613c..a5f206ba 100644 --- a/doc/modules/ROOT/pages/literals.adoc +++ b/doc/modules/ROOT/pages/literals.adoc @@ -18,21 +18,21 @@ namespace boost { namespace int128 { namespace literals { -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_u128(const char* str) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_u128(const char* str) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_U128(const char* str) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_U128(const char* str) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_u128(const char* str, std::size_t len) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_u128(const char* str, std::size_t len) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_U128(const char* str, std::size_t len) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_U128(const char* str, std::size_t len) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_i128(const char* str) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_i128(const char* str) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_I128(const char* str) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_I128(const char* str) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_i128(const char* str, std::size_t len) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_i128(const char* str, std::size_t len) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_I128(const char* str, std::size_t len) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_I128(const char* str, std::size_t len) noexcept; } // namespace literals } // namespace int128 @@ -68,7 +68,7 @@ An invalid literal is rejected at compile time rather than being silently accept This includes a value that overflows the target type, a digit that is not valid for the selected base (for example `0b2` or `09`), and an empty magnitude such as `0x`. When such a literal is used in a constant expression the parse reaches `BOOST_INT128_UNREACHABLE`, which is not a constant expression and therefore is a hard compile error. -NOTE: The minimum `int128_t` value cannot be written as a negated `_i128` literal, because its positive magnitude (2^127) exceeds the maximum `int128_t` value and so fails to parse (a hard compile error in a constant expression). Use `BOOST_INT128_INT128_C(-170141183460469231731687303715884105728)`, the string form `"-170141183460469231731687303715884105728"_i128`, or `(std::numeric_limits::min)()` instead. +NOTE: The minimum `int128` value cannot be written as a negated `_i128` literal, because its positive magnitude (2^127) exceeds the maximum `int128` value and so fails to parse (a hard compile error in a constant expression). Use `BOOST_INT128_INT128_C(-170141183460469231731687303715884105728)`, the string form `"-170141183460469231731687303715884105728"_i128`, or `(std::numeric_limits::min)()` instead. See the xref:examples.adoc#examples_construction[construction examples] for usage demonstrations of both literals and macros. @@ -85,7 +85,7 @@ For values smaller than 2^64, prefer the constructor: [source, c++] ---- -constexpr uint128_t small {42U}; // direct conversion from a builtin +constexpr uint128 small {42U}; // direct conversion from a builtin const auto small_literal {42_U128}; // parses "42" and then constructs ---- diff --git a/doc/modules/ROOT/pages/mixed_type_ops.adoc b/doc/modules/ROOT/pages/mixed_type_ops.adoc index f822ac28..21be91a7 100644 --- a/doc/modules/ROOT/pages/mixed_type_ops.adoc +++ b/doc/modules/ROOT/pages/mixed_type_ops.adoc @@ -10,14 +10,14 @@ https://www.boost.org/LICENSE_1_0.txt == Conversions -Conversion between the two types is implicit: each type provides a non-explicit converting constructor from the other, so an `int128_t` converts to a `uint128_t` (and vice versa) wherever the target type is expected, as documented in the above class descriptions. +Conversion between the two types is implicit: each type provides a non-explicit converting constructor from the other, so an `int128` converts to a `uint128` (and vice versa) wherever the target type is expected, as documented in the above class descriptions. == Operator Overloads Across Types All comparison, arithmetic, bitwise, and shift operators are provided across: -* `int128_t` and `uint128_t` (cross-type), -* `int128_t` / `uint128_t` and any built-in integer type (signed or unsigned, including the compiler's 128-bit `pass:[__int128]` / `pass:[unsigned __int128]` where supported). +* `int128` and `uint128` (cross-type), +* `int128` / `uint128` and any built-in integer type (signed or unsigned, including the compiler's 128-bit `pass:[__int128]` / `pass:[unsigned __int128]` where supported). The behavior and return type of every mixed-sign overload follow the C++ usual arithmetic conversions, identical to what the equivalent built-in `pass:[__int128]` / `pass:[unsigned __int128]` operation would produce, including two's-complement wrap-around semantics. @@ -27,29 +27,29 @@ The behavior and return type of every mixed-sign overload follow the C++ usual a |=== | Operands | Common type | Result of arithmetic / bitwise -| `int128_t` and `uint128_t` (same rank, mixed sign) -| `uint128_t` -| `uint128_t` +| `int128` and `uint128` (same rank, mixed sign) +| `uint128` +| `uint128` -| `int128_t` and `pass:[unsigned __int128]` (same rank, mixed sign) -| `uint128_t` -| `uint128_t` +| `int128` and `pass:[unsigned __int128]` (same rank, mixed sign) +| `uint128` +| `uint128` -| `uint128_t` and `pass:[__int128]` (same rank, mixed sign) -| `uint128_t` -| `uint128_t` +| `uint128` and `pass:[__int128]` (same rank, mixed sign) +| `uint128` +| `uint128` -| `int128_t` and a small unsigned built-in (`uint8_t` to `uint64_t`) -| `int128_t` -| `int128_t` +| `int128` and a small unsigned built-in (`uint8_t` to `uint64_t`) +| `int128` +| `int128` -| `uint128_t` and a small signed built-in (`int8_t` to `int64_t`) -| `uint128_t` -| `uint128_t` +| `uint128` and a small signed built-in (`int8_t` to `int64_t`) +| `uint128` +| `uint128` |=== For shift operators (`pass:[<<]`, `pass:[>>]`), the result type follows the LHS type regardless of the RHS, matching the built-in shift rules. -A shift count that is negative or greater than or equal to `128` (the width of the shifted operand) is undefined behavior, exactly as for the built-in shift operators; see the xref:int128_t.adoc#i128_bitwise_operators[shift operator] reference for the precise rules. +A shift count that is negative or greater than or equal to `128` (the width of the shifted operand) is undefined behavior, exactly as for the built-in shift operators; see the xref:int128.adoc#i128_bitwise_operators[shift operator] reference for the precise rules. For comparison operators (`pass:[==]`, `pass:[!=]`, `pass:[<]`, `pass:[<=]`, `pass:[>]`, `pass:[>=]`), the return type is always `bool` and the comparison is performed on the operands after they have been converted to the common type above. @@ -64,63 +64,63 @@ namespace int128 { // Comparison Operators //===================================== -BOOST_INT128_HOST_DEVICE constexpr bool operator==(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator==(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator<(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator<(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator>(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator>(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(int128_t lhs, uint128_t rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator==(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator==(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator<(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator<(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator>(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator>(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(int128 lhs, uint128 rhs); //===================================== // Arithmetic Operators //===================================== -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(int128_t lhs, uint128_t rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(int128 lhs, uint128 rhs); //===================================== // Bitwise Operators //===================================== -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(int128_t lhs, uint128_t rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(int128 lhs, uint128 rhs); //===================================== // Shift Operators //===================================== // Result type follows the LHS. -BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(uint128_t lhs, int128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(int128_t lhs, uint128_t rhs); -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(uint128_t lhs, int128_t rhs); +BOOST_INT128_HOST_DEVICE constexpr int128 operator<<(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator<<(uint128 lhs, int128 rhs); +BOOST_INT128_HOST_DEVICE constexpr int128 operator>>(int128 lhs, uint128 rhs); +BOOST_INT128_HOST_DEVICE constexpr uint128 operator>>(uint128 lhs, int128 rhs); } // namespace int128 } // namespace boost ---- -The cross-type arithmetic and bitwise operators return the same value as `static_cast(lhs) op static_cast(rhs)`. +The cross-type arithmetic and bitwise operators return the same value as `static_cast(lhs) op static_cast(rhs)`. The comparison operators return the same value as that expression compared with the matching unsigned operator. === Operations with built-in `pass:[__int128]` / `pass:[unsigned __int128]` -When the compiler provides 128-bit built-in integer types, all of the operators above are also available between a library type and the built-in type of opposite signedness (e.g. `uint128_t op pass:[__int128]`, `pass:[unsigned __int128] op int128_t`). -The result type follows the same rules as the table above (`uint128_t` for arithmetic and bitwise; the LHS type for shifts; `bool` for comparisons), and the produced value is identical to what an all-built-in computation would yield. +When the compiler provides 128-bit built-in integer types, all of the operators above are also available between a library type and the built-in type of opposite signedness (e.g. `uint128 op pass:[__int128]`, `pass:[unsigned __int128] op int128`). +The result type follows the same rules as the table above (`uint128` for arithmetic and bitwise; the LHS type for shifts; `bool` for comparisons), and the produced value is identical to what an all-built-in computation would yield. diff --git a/doc/modules/ROOT/pages/numeric.adoc b/doc/modules/ROOT/pages/numeric.adoc index 62ce4475..916f8ed7 100644 --- a/doc/modules/ROOT/pages/numeric.adoc +++ b/doc/modules/ROOT/pages/numeric.adoc @@ -23,21 +23,21 @@ The following functions are provided for saturating arithmetic, and they *do not namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_add(uint128_t lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 saturating_add(uint128 lhs, uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_add(int128_t lhs, int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 saturating_add(int128 lhs, int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_sub(uint128_t lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 saturating_sub(uint128 lhs, uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_sub(int128_t lhs, int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 saturating_sub(int128 lhs, int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_mul(uint128_t lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 saturating_mul(uint128 lhs, uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_mul(int128_t lhs, int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 saturating_mul(int128 lhs, int128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_div(uint128_t lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 saturating_div(uint128 lhs, uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_div(int128_t lhs, int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 saturating_div(int128 lhs, int128 rhs) noexcept; } // namespace int128 } // namespace boost @@ -50,8 +50,8 @@ Division by zero is a precondition violation and therefore undefined behavior (t [#saturating_cast] == Saturating Cast -This function converts a `uint128_t` or `int128_t` to a `TargetType`, saturating rather than wrapping when the value is out of the target's range. -`TargetType` is constrained (via SFINAE) to the library's set of reduced integer types: the standard signed and unsigned integer types (excluding `bool` and plain `char`), `int128_t`, `uint128_t`, and the compiler's native 128-bit integer types where available. +This function converts a `uint128` or `int128` to a `TargetType`, saturating rather than wrapping when the value is out of the target's range. +`TargetType` is constrained (via SFINAE) to the library's set of reduced integer types: the standard signed and unsigned integer types (excluding `bool` and plain `char`), `int128`, `uint128`, and the compiler's native 128-bit integer types where available. Should the `TargetType` not be able to represent the value it is set to either `std::numeric_limits::max()` or `std::numeric_limits::min()` depending on whether the situation is overflow or underflow. [source, c++] @@ -62,10 +62,10 @@ namespace boost { namespace int128 { template -BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(uint128_t value) noexcept; +BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(uint128 value) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(int128_t value) noexcept; +BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(int128 value) noexcept; } // namespace int128 } // namespace boost @@ -83,9 +83,9 @@ Computes the greatest common divisor of the magnitudes of `a` and `b`. namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t gcd(uint128_t a, uint128_t b) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 gcd(uint128 a, uint128 b) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t gcd(int128_t a, int128_t b) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 gcd(int128 a, int128 b) noexcept; } // namespace int128 } // namespace boost @@ -100,7 +100,7 @@ Both overloads are `noexcept` and usable in a constant expression. NOTE: `std::gcd` leaves the behavior undefined when `abs(a)` or `abs(b)` is not representable in the result type; this library defines that case instead. The only such operand is `BOOST_INT128_INT128_MIN`, whose magnitude `2^127` is one greater than `BOOST_INT128_INT128_MAX`. The magnitude is still computed correctly, because the two's-complement bit pattern of `BOOST_INT128_INT128_MIN` reinterpreted as unsigned is exactly `2^127`, so the divisor returned is always arithmetically correct (for example, `gcd(BOOST_INT128_INT128_MIN, 6) == 2`). -The single exception is when the divisor is itself `2^127`, which occurs only for `gcd(BOOST_INT128_INT128_MIN, 0)` and `gcd(BOOST_INT128_INT128_MIN, BOOST_INT128_INT128_MIN)`: because `2^127` is not representable as a positive `int128_t`, it is returned as the negative value `BOOST_INT128_INT128_MIN`. +The single exception is when the divisor is itself `2^127`, which occurs only for `gcd(BOOST_INT128_INT128_MIN, 0)` and `gcd(BOOST_INT128_INT128_MIN, BOOST_INT128_INT128_MIN)`: because `2^127` is not representable as a positive `int128`, it is returned as the negative value `BOOST_INT128_INT128_MIN`. [#lcm] == Least Common Multiple (LCM) @@ -114,9 +114,9 @@ Computes the least common multiple of the magnitudes of `a` and `b`. namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(uint128_t a, uint128_t b) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 lcm(uint128 a, uint128 b) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t lcm(int128_t a, int128_t b) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 lcm(int128 a, int128 b) noexcept; } // namespace int128 } // namespace boost @@ -128,8 +128,8 @@ This matches the results of https://eel.is/c++draft/numeric.ops#lcm[`std::lcm`] Both overloads are `noexcept` and usable in a constant expression. NOTE: `std::lcm` leaves the behavior undefined when `abs(a)` or `abs(b)` is not representable in the result type, or when the least common multiple itself is not representable; this library defines those cases instead of trapping or throwing. -The result is the true least common multiple of the two magnitudes reduced modulo `2^128`, consistent with the two's-complement wrap-around of the xref:int128_t.adoc#i128_math_operators[arithmetic operators]. -For the signed overload that reduced value is then interpreted as a two's-complement `int128_t` and may therefore be negative; a `BOOST_INT128_INT128_MIN` operand contributes the magnitude `2^127`, computed correctly as described for `gcd` above. +The result is the true least common multiple of the two magnitudes reduced modulo `2^128`, consistent with the two's-complement wrap-around of the xref:int128.adoc#i128_math_operators[arithmetic operators]. +For the signed overload that reduced value is then interpreted as a two's-complement `int128` and may therefore be negative; a `BOOST_INT128_INT128_MIN` operand contributes the magnitude `2^127`, computed correctly as described for `gcd` above. [#midpoint] == Midpoint @@ -143,9 +143,9 @@ Computes the midpoint of `a` and `b`, rounding towards `a`. namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t midpoint(uint128_t a, uint128_t b) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 midpoint(uint128 a, uint128 b) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t midpoint(int128_t a, int128_t b) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 midpoint(int128 a, int128 b) noexcept; } // namespace int128 } // namespace boost @@ -163,7 +163,7 @@ They *do not* require C++26, and every one of them is `constexpr` and available === `div_result` Both halves of a division, mirroring `std::div_result` from the paper. -It is an aggregate, so `div_result{q, r}` and structured bindings both work. +It is an aggregate, so `div_result{q, r}` and structured bindings both work. Equality is always available; the ordering operators are available whenever the compiler supports `operator<=>`, and compare the quotient before the remainder. [source, c++] @@ -206,17 +206,17 @@ Each mode comes in three forms: `div_` returns the quotient, `div_rem_(uint128_t x, uint128_t y) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 div_(uint128 x, uint128 y) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t div_(int128_t x, int128_t y) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 div_(int128 x, int128 y) noexcept; -BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_(uint128_t x, uint128_t y) noexcept; +BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_(uint128 x, uint128 y) noexcept; -BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_(int128_t x, int128_t y) noexcept; +BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_(int128 x, int128 y) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t rem_euclid(uint128_t x, uint128_t y) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 rem_euclid(uint128 x, uint128 y) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t rem_euclid(int128_t x, int128_t y) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 rem_euclid(int128 x, int128 y) noexcept; } // namespace int128 } // namespace boost @@ -291,7 +291,7 @@ An exact tie is only possible when the divisor is even, so the six `ties_` modes === Semantics The remainder returned by `div_rem_` is the one that matches the quotient: `x == quotient * y + remainder` for the signed overloads. -For the unsigned overloads the same identity holds modulo 2^128^, because a quotient rounded up leaves a negative remainder that has to wrap; `div_rem_away_zero(uint128_t{7}, uint128_t{2})` therefore returns a quotient of `4` and a remainder of `BOOST_INT128_UINT128_MAX`, since `7 - 4 * 2` is `-1`. +For the unsigned overloads the same identity holds modulo 2^128^, because a quotient rounded up leaves a negative remainder that has to wrap; `div_rem_away_zero(uint128{7}, uint128{2})` therefore returns a quotient of `4` and a remainder of `BOOST_INT128_UINT128_MAX`, since `7 - 4 * 2` is `-1`. The quotient itself never overflows: rounding only moves the quotient when the division is inexact, and an inexact division has a divisor whose magnitude is at least two. The unsigned overloads exist for every mode, but a non-negative quotient collapses several of them together. @@ -299,7 +299,7 @@ The unsigned overloads exist for every mode, but a non-negative quotient collaps The full set is still provided so that generic code can name a rounding mode without also having to know the signedness of the operands. `rem_euclid` returns a value in `[0, abs(y))`, which makes it the function to reach for when wrapping a possibly negative offset into a range; `operator%` instead takes its sign from the dividend. -The signed overload is correct for `y == BOOST_INT128_INT128_MIN` even though `abs(y)` is not representable as a positive `int128_t`, because the correction is applied in unsigned arithmetic. +The signed overload is correct for `y == BOOST_INT128_INT128_MIN` even though `abs(y)` is not representable as a positive `int128`, because the correction is applied in unsigned arithmetic. `div_euclid` agrees with `div_to_neg_inf` when the divisor is positive, and with `div_to_pos_inf` when it is negative. Each `div_rem_` performs exactly one division, so it is the cheaper way to obtain both halves; computing `x / y` and `x % y` separately costs two divisions, since neither the compiler nor the library can share the work across the two operators. diff --git a/doc/modules/ROOT/pages/printer.adoc b/doc/modules/ROOT/pages/printer.adoc index beb209a3..33d96a43 100644 --- a/doc/modules/ROOT/pages/printer.adoc +++ b/doc/modules/ROOT/pages/printer.adoc @@ -8,7 +8,7 @@ https://www.boost.org/LICENSE_1_0.txt = Pretty Printers :idprefix: pretty_printers_ -Pretty printers allow debuggers to display `uint128_t` and `int128_t` values in human-readable format instead of showing the raw struct members. +Pretty printers allow debuggers to display `uint128` and `int128` values in human-readable format instead of showing the raw struct members. The library contains pretty printers for LLDB, GDB, and Visual Studio in the `extra/` folder. [#printer_lldb] @@ -23,7 +23,7 @@ command script import /path/to/int128/extra/int128_printer_lldb.py If this is successful, you should see the following message in your debugger upon startup: -`"int128_t and uint128_t pretty printers loaded successfully"` +`"int128 and uint128 pretty printers loaded successfully"` [#printer_gdb] == GDB @@ -84,31 +84,31 @@ Larger values are displayed as a synthesized hexadecimal value with a `'` digit |=== | Type | Value | Display -| `uint128_t` +| `uint128` | `42` | `42` -| `uint128_t` +| `uint128` | `2^64 + 1` | `0x0000000000000001'0000000000000001` -| `uint128_t` +| `uint128` | `uint128_max` | `0xFFFFFFFFFFFFFFFF'FFFFFFFFFFFFFFFF` -| `int128_t` +| `int128` | `42` | `42` -| `int128_t` +| `int128` | `-5` | `-5` -| `int128_t` +| `int128` | `2^64 + 1` | `0x0000000000000001'0000000000000001` -| `int128_t` +| `int128` | `int128_min` | `0x8000000000000000'0000000000000000` |=== diff --git a/doc/modules/ROOT/pages/random.adoc b/doc/modules/ROOT/pages/random.adoc index dad7f597..b1b93a2f 100644 --- a/doc/modules/ROOT/pages/random.adoc +++ b/doc/modules/ROOT/pages/random.adoc @@ -13,10 +13,10 @@ https://www.boost.org/LICENSE_1_0.txt #include ---- -Including this header specializes the traits that https://www.boost.org/doc/libs/release/libs/random/[Boost.Random] uses to reason about integer types, so that `int128_t` and `uint128_t` can be used directly with the Boost.Random engines and distributions such as `boost::random::uniform_int_distribution`. +Including this header specializes the traits that https://www.boost.org/doc/libs/release/libs/random/[Boost.Random] uses to reason about integer types, so that `int128` and `uint128` can be used directly with the Boost.Random engines and distributions such as `boost::random::uniform_int_distribution`. This header requires Boost.Random to be available. -The following specializations are provided in namespace `boost::random::traits` for both `int128_t` and `uint128_t`: +The following specializations are provided in namespace `boost::random::traits` for both `int128` and `uint128`: [cols="1,2", options="header"] |=== @@ -26,7 +26,7 @@ The following specializations are provided in namespace `boost::random::traits` | Reports both types as integral. | `is_signed` -| Reports `int128_t` as signed and `uint128_t` as unsigned. +| Reports `int128` as signed and `uint128` as unsigned. | `make_unsigned`, `make_unsigned_imp` | Provide the unsigned type mapping Boost.Random uses when generating values. diff --git a/doc/modules/ROOT/pages/release_notes.adoc b/doc/modules/ROOT/pages/release_notes.adoc index f69fb268..eb97f16a 100644 --- a/doc/modules/ROOT/pages/release_notes.adoc +++ b/doc/modules/ROOT/pages/release_notes.adoc @@ -12,14 +12,14 @@ https://www.boost.org/LICENSE_1_0.txt === New: integer division with every rounding mode -`` now provides the `div_*` family proposed for the standard library by wg21.link/p3724[P3724 (Integer division)], for both `uint128_t` and `int128_t`. +`` now provides the `div_*` family proposed for the standard library by wg21.link/p3724[P3724 (Integer division)], for both `uint128` and `int128`. `operator/` only rounds towards zero; these functions round away from zero, towards either infinity, and to nearest under each of the six tie-breaking rules, along with Euclidean division and its always non-negative remainder. [source, c++] ---- -div_to_neg_inf(int128_t{-7}, int128_t{2}); // -4, where -7 / 2 is -3 -div_ties_to_even(int128_t{-7}, int128_t{2}); // -4, breaking the tie at -3.5 -rem_euclid(int128_t{-7}, int128_t{2}); // 1, where -7 % 2 is -1 +div_to_neg_inf(int128{-7}, int128{2}); // -4, where -7 / 2 is -3 +div_ties_to_even(int128{-7}, int128{2}); // -4, breaking the tie at -3.5 +rem_euclid(int128{-7}, int128{2}); // 1, where -7 % 2 is -1 const auto res = div_rem_to_pos_inf(x, y); // res.quotient and res.remainder, one division ---- @@ -27,14 +27,14 @@ const auto res = div_rem_to_pos_inf(x, y); // res.quotient and res.remainder, Each mode also has a `div_rem_` form returning a `div_result` with both halves from a single division, and there is a standalone `rem_euclid`. See xref:numeric.adoc#int_div[Integer Division] for the full list. -=== Breaking: `int128_t::high` is now `std::uint64_t` +=== Breaking: `int128::high` is now `std::uint64_t` -`int128_t` previously stored `std::uint64_t low` and `std::int64_t high`. +`int128` previously stored `std::uint64_t low` and `std::int64_t high`. Both words are now `std::uint64_t`; the value is still interpreted as two's complement across the pair, and no bit of the representation moved. The reason is codegen. -When the two halves of the struct have different types, a compiler's data-reference analysis cannot merge them into a single wide access, so loops over `int128_t` are emitted with shuffles or scalarized outright. -Measured with GCC 14 at `-O3 -march=znver3` on `r[i] = x[i] | y[i]` over an `std::array`: +When the two halves of the struct have different types, a compiler's data-reference analysis cannot merge them into a single wide access, so loops over `int128` are emitted with shuffles or scalarized outright. +Measured with GCC 14 at `-O3 -march=znver3` on `r[i] = x[i] | y[i]` over an `std::array`: [cols="1,1,1",options="header"] |=== @@ -43,14 +43,14 @@ Measured with GCC 14 at `-O3 -march=znver3` on `r[i] = x[i] | y[i]` over an `std | `~` | 74 instructions, 10 shuffles | 20 instructions, 0 shuffles |=== -Those are now exactly the numbers `uint128_t` has always produced, since it already had uniform word types. +Those are now exactly the numbers `uint128` has always produced, since it already had uniform word types. Scalar code is unaffected or better: `a + b` drops from 20 instructions to 10, `a << n` from 17 to 12, and `a >> n` from 18 to 13. ==== What still works -* The two-word constructor is unchanged and still takes its high word as `std::int64_t`, so `int128_t{-1, 0}` and `int128_t{INT64_MIN, 0}` compile and mean exactly what they did. -* `sizeof`, `alignof`, and the in-memory byte order are unchanged. The type remains trivially copyable and standard layout, so anything that `memcpy`s an `int128_t` is unaffected. -* Every operator produces bit-identical results. Conversions to and from `uint128_t` and the native `pass:[__int128]` are unchanged. +* The two-word constructor is unchanged and still takes its high word as `std::int64_t`, so `int128{-1, 0}` and `int128{INT64_MIN, 0}` compile and mean exactly what they did. +* `sizeof`, `alignof`, and the in-memory byte order are unchanged. The type remains trivially copyable and standard layout, so anything that `memcpy`s an `int128` is unaffected. +* Every operator produces bit-identical results. Conversions to and from `uint128` and the native `pass:[__int128]` are unchanged. ==== What to change @@ -79,4 +79,4 @@ BOOST_INT128_HOST_DEVICE constexpr std::int64_t signed_high() const noexcept; It is a pure reinterpretation of the stored bits, `constexpr` everywhere, and available on device. Passing `high` to something expecting a `std::int64_t` also needs it, since the conversion is now the other direction. -See xref:int128_t.adoc#i128_storage[Storage and signed_high] for details. +See xref:int128.adoc#i128_storage[Storage and signed_high] for details. diff --git a/doc/modules/ROOT/pages/stream.adoc b/doc/modules/ROOT/pages/stream.adoc index 75ecfd49..6d05bc39 100644 --- a/doc/modules/ROOT/pages/stream.adoc +++ b/doc/modules/ROOT/pages/stream.adoc @@ -21,16 +21,16 @@ namespace boost { namespace int128 { template -std::basic_ostream& operator<<(std::basic_ostream& os, const int128_t& v); +std::basic_ostream& operator<<(std::basic_ostream& os, const int128& v); template -std::basic_istream& operator>>(std::basic_istream& is, int128_t& v); +std::basic_istream& operator>>(std::basic_istream& is, int128& v); template -std::basic_ostream& operator<<(std::basic_ostream& os, const uint128_t& v); +std::basic_ostream& operator<<(std::basic_ostream& os, const uint128& v); template -std::basic_istream& operator>>(std::basic_istream& is, uint128_t& v); +std::basic_istream& operator>>(std::basic_istream& is, uint128& v); } // namespace int128 } // namespace boost diff --git a/doc/modules/ROOT/pages/string.adoc b/doc/modules/ROOT/pages/string.adoc index 3c9ff591..9b017f10 100644 --- a/doc/modules/ROOT/pages/string.adoc +++ b/doc/modules/ROOT/pages/string.adoc @@ -22,14 +22,14 @@ The following are functions analogous to those found in `` for builtin i namespace boost { namespace int128 { -// Constrained to T being int128_t or uint128_t. +// Constrained to T being int128 or uint128. template -std::enable_if_t::value || std::is_same::value, std::string> +std::enable_if_t::value || std::is_same::value, std::string> to_string(const T& value); -// Constrained to T being int128_t or uint128_t. +// Constrained to T being int128 or uint128. template -std::enable_if_t::value || std::is_same::value, std::wstring> +std::enable_if_t::value || std::is_same::value, std::wstring> to_wstring(const T& value); } // namespace int128 diff --git a/doc/modules/ROOT/pages/u128_benchmarks.adoc b/doc/modules/ROOT/pages/u128_benchmarks.adoc index c183ec3c..734ed0c5 100644 --- a/doc/modules/ROOT/pages/u128_benchmarks.adoc +++ b/doc/modules/ROOT/pages/u128_benchmarks.adoc @@ -5,7 +5,7 @@ https://www.boost.org/LICENSE_1_0.txt //// [#u128_benchmarks] -= `uint128_t` Benchmarks += `uint128` Benchmarks :idprefix: u128_benchmarks_ == Methodology @@ -16,7 +16,7 @@ Each platform states its element count and pass count, and therefore how many op The `Comparisons` row is the total of all six relational operators (`==`, `!=`, `<`, `<=`, `>`, `>=`) over that same vector, which is why it costs roughly six arithmetic rows. On most platforms we use the builtin `unsigned \__int128` as the reference benchmark. -When this is unavailable (such as on 32-bit architectures) we use `boost::multiprecision::uint128_t` (abbreviated as `boost::mp::uint128_t`) as it is widely used, and known to be portable. +When this is unavailable (such as on 32-bit architectures) we use `boost::multiprecision::uint128` (abbreviated as `boost::mp::uint128`) as it is widely used, and known to be portable. On MSVC platforms we use as reference `std::_Unsigned128` from the header `<__msvc_int128.hpp>` since this is bundled with their compiler. Lastly, when available, the benchmarks are also run with `absl::uint128` which is the 128-bit unsigned integer from the https://abseil.io[Abseil Libraries]. @@ -53,7 +53,7 @@ Measured with GCC 14.2 (pass:[C++]20): 5 passes over 20,000,000 element pairs (1 [cols="1,>1,>1,>1,>1"] |=== -| Operation | `unsigned __int128` | `uint128_t` | `boost::mp::uint128_t` | `absl::uint128` +| Operation | `unsigned __int128` | `uint128` | `boost::mp::uint128` | `absl::uint128` | Comparisons | 538,116 | 545,110 | 1,100,158 | 504,183 | Addition | 66,230 | 60,477 | 65,991 | 60,608 @@ -71,7 +71,7 @@ Measured with GCC 14.2 (pass:[C++]20): 5 passes over 20,000,000 element pairs (1 [cols="1,>1,>1,>1,>1"] |=== -| Operation | `unsigned __int128` | `uint128_t` | `boost::mp::uint128_t` | `absl::uint128` +| Operation | `unsigned __int128` | `uint128` | `boost::mp::uint128` | `absl::uint128` | Comparisons | 1,551,148 | 954,612 | 2,090,864 | 1,559,081 | Addition | 88,531 | 87,204 | 87,303 | 87,544 @@ -89,7 +89,7 @@ Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10 [cols="1,>1,>1,>1,>1"] |=== -| Operation | `unsigned __int128` | `uint128_t` | `boost::mp::uint128_t` | `absl::uint128` +| Operation | `unsigned __int128` | `uint128` | `boost::mp::uint128` | `absl::uint128` | Comparisons | 609,693 | 539,203 | 1,218,003 | 1,178,669 | Addition | 50,814 | 44,087 | 50,939 | 50,573 @@ -107,7 +107,7 @@ Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10 [cols="1,>1,>1,>1"] |=== -| Operation | `unsigned __int128` | `uint128_t` | `boost::mp::uint128_t` +| Operation | `unsigned __int128` | `uint128` | `boost::mp::uint128` | Comparisons | 415,221 | 453,245 | 690,480 | Addition | 25,106 | 16,257 | 24,998 @@ -121,13 +121,13 @@ image::u128_graphs/linux/ppc64le_relative_performance.png[ppc64le Relative Perfo === x86_32 -NOTE: This platform has no hardware type so we compare relative to `boost::mp::uint128_t` +NOTE: This platform has no hardware type so we compare relative to `boost::mp::uint128` Measured with GCC 14.2 (pass:[C++]20): 5 passes over 10,000,000 element pairs (50,000,000 operations per cell). [cols="1,>1,>1"] |=== -| Operation | `uint128_t` | `boost::mp::uint128_t` +| Operation | `uint128` | `boost::mp::uint128` | Comparisons | 2,112,319 | 1,568,536 | Addition | 143,659 | 1,144,222 @@ -141,13 +141,13 @@ image::u128_graphs/linux/x86_relative_performance.png[x86 Relative Performance, === ARM32 -NOTE: This platform has no hardware type so we compare relative to `boost::mp::uint128_t` +NOTE: This platform has no hardware type so we compare relative to `boost::mp::uint128` Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10,000,000 operations per cell). [cols="1,>1,>1"] |=== -| Operation | `uint128_t` | `boost::mp::uint128_t` +| Operation | `uint128` | `boost::mp::uint128` | Comparisons | 1,148,095 | 738,322 | Addition | 85,164 | 970,287 @@ -168,7 +168,7 @@ Measured with MSVC 14.51 (pass:[C++]20): 5 passes over 20,000,000 element pairs [cols="1,>1,>1,>1"] |=== -| Operation | `std::_Unsigned128` | `uint128_t` | `boost::mp::uint128_t` +| Operation | `std::_Unsigned128` | `uint128` | `boost::mp::uint128` | Comparisons | 1,313,048 | 1,251,724 | 1,970,110 | Addition | 106,229 | 98,075 | 2,153,287 @@ -186,7 +186,7 @@ Measured with MSVC 14.44 (pass:[C++]20): 5 passes over 20,000,000 element pairs [cols="1,>1,>1,>1"] |=== -| Operation | `std::_Unsigned128` | `uint128_t` | `boost::mp::uint128_t` +| Operation | `std::_Unsigned128` | `uint128` | `boost::mp::uint128` | Comparisons | 1,262,216 | 753,322 | 1,757,122 | Addition | 86,038 | 84,791 | 1,535,904 @@ -204,7 +204,7 @@ Measured with MSVC 14.51 (pass:[C++]20): 5 passes over 10,000,000 element pairs [cols="1,>1,>1,>1"] |=== -| Operation | `std::_Unsigned128` | `uint128_t` | `boost::mp::uint128_t` +| Operation | `std::_Unsigned128` | `uint128` | `boost::mp::uint128` | Comparisons | 2,519,936 | 2,006,459 | 1,516,713 | Addition | 132,021 | 129,303 | 1,184,928 @@ -225,7 +225,7 @@ Measured with Apple Clang 21.0 (pass:[C++]20): 5 passes over 20,000,000 element [cols="1,>1,>1,>1,>1"] |=== -| Operation | `unsigned __int128` | `uint128_t` | `boost::mp::uint128_t` | `absl::uint128` +| Operation | `unsigned __int128` | `uint128` | `boost::mp::uint128` | `absl::uint128` | Comparisons | 363,881 | 351,327 | 403,043 | 373,414 | Addition | 67,797 | 58,792 | 64,948 | 53,003 diff --git a/doc/modules/ROOT/pages/uint128_t.adoc b/doc/modules/ROOT/pages/uint128.adoc similarity index 61% rename from doc/modules/ROOT/pages/uint128_t.adoc rename to doc/modules/ROOT/pages/uint128.adoc index 347c7d18..5f85b8f8 100644 --- a/doc/modules/ROOT/pages/uint128_t.adoc +++ b/doc/modules/ROOT/pages/uint128.adoc @@ -4,13 +4,13 @@ Distributed under the Boost Software License, Version 1.0. https://www.boost.org/LICENSE_1_0.txt //// -[#uint128_t] -= uint128_t -:idprefix: uint128_t_ +[#uint128] += uint128 +:idprefix: uint128_ == Description -`uint128_t` is an unsigned 128-bit integer. +`uint128` is an unsigned 128-bit integer. [source, c++] ---- @@ -19,7 +19,7 @@ https://www.boost.org/LICENSE_1_0.txt namespace boost { namespace int128 { -struct uint128_t { +struct uint128 { #if BOOST_INT128_ENDIAN_LITTLE_BYTE std::uint64_t low {}; @@ -39,7 +39,7 @@ struct uint128_t { The type provides: -* Constructors from all built-in integer types and `int128_t` +* Constructors from all built-in integer types and `int128` * Conversion operators to built-in integer and floating-point types * Full set of comparison operators (`<`, `<=`, `>`, `>=`, `==`, `!=`) * Bitwise operators (`~`, `|`, `&`, `^`, `<<`, `>>`) @@ -54,7 +54,7 @@ If your platform has a native 128-bit unsigned integer, the struct is over-align [source, c++] ---- -struct alignas(alignof(unsigned __int128)) uint128_t +struct alignas(alignof(unsigned __int128)) uint128 ---- Otherwise (including 32-bit x86), the alignment is left up to the compiler to decide. @@ -62,17 +62,17 @@ Otherwise (including 32-bit x86), the alignment is left up to the compiler to de [#u128_operator_behavior] == Operator Behavior -All comparison, arithmetic, bitwise, and shift operators are defined between `uint128_t` and any built-in integer type, signed or unsigned. +All comparison, arithmetic, bitwise, and shift operators are defined between `uint128` and any built-in integer type, signed or unsigned. Their behavior follows the C++ usual arithmetic conversions and is value-identical to the corresponding builtin `unsigned __int128` operation. Specifically: -* The signed operand (whether a small `intN_t` or `__int128`) is converted to `uint128_t` (sign-extended for negatives), and the operation is performed unsigned with two's-complement wrap-around semantics. Arithmetic and bitwise operations return `uint128_t`. -* For shift operators, the result type follows the LHS: `uint128_t << T` and `uint128_t >> T` always return `uint128_t`, regardless of `T`. +* The signed operand (whether a small `intN_t` or `__int128`) is converted to `uint128` (sign-extended for negatives), and the operation is performed unsigned with two's-complement wrap-around semantics. Arithmetic and bitwise operations return `uint128`. +* For shift operators, the result type follows the LHS: `uint128 << T` and `uint128 >> T` always return `uint128`, regardless of `T`. * All comparison operators return `bool`, with the comparison performed on the operands after conversion to the common type. -For example, `uint128_t{5} > -1` returns `false` because the signed `-1` converts to a value greater than `5` under unsigned 128-bit arithmetic, exactly as `(unsigned __int128){5} > -1` would. +For example, `uint128{5} > -1` returns `false` because the signed `-1` converts to a value greater than `5` under unsigned 128-bit arithmetic, exactly as `(unsigned __int128){5} > -1` would. -NOTE: The results match `unsigned __int128` for every input with a non-zero divisor. Division or remainder by zero is the one exception, and it is handled exactly as the built-in type handles it: as undefined behavior. The library performs no zero-divisor check, so a `uint128_t` divided or taken modulo by zero behaves like the built-in operation (a hardware trap on platforms that fault on integer division by zero), and in a constant expression it is a hard compile-time error just as `1u / 0u` is. See xref:uint128_t.adoc#u128_math_operators[Division] and Modulo below. +NOTE: The results match `unsigned __int128` for every input with a non-zero divisor. Division or remainder by zero is the one exception, and it is handled exactly as the built-in type handles it: as undefined behavior. The library performs no zero-divisor check, so a `uint128` divided or taken modulo by zero behaves like the built-in operation (a hardware trap on platforms that fault on integer division by zero), and in a constant expression it is a hard compile-time error just as `1u / 0u` is. See xref:uint128.adoc#u128_math_operators[Division] and Modulo below. See xref:mixed_type_ops.adoc[Mixed Type Operations] for the full set of cross-type signatures and detailed result-type rules. @@ -84,41 +84,41 @@ See xref:mixed_type_ops.adoc[Mixed Type Operations] for the full set of cross-ty namespace boost { namespace int128 { -struct uint128_t +struct uint128 { ... // Defaulted basic construction - BOOST_INT128_HOST_DEVICE constexpr uint128_t() noexcept = default; - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const uint128_t&) noexcept = default; - BOOST_INT128_HOST_DEVICE constexpr uint128_t(uint128_t&&) noexcept = default; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator=(const uint128_t&) noexcept = default; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator=(uint128_t&&) noexcept = default; + BOOST_INT128_HOST_DEVICE constexpr uint128() noexcept = default; + BOOST_INT128_HOST_DEVICE constexpr uint128(const uint128&) noexcept = default; + BOOST_INT128_HOST_DEVICE constexpr uint128(uint128&&) noexcept = default; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator=(const uint128&) noexcept = default; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator=(uint128&&) noexcept = default; - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const int128_t& v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(const int128& v) noexcept; // Construct from integral types - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const std::uint64_t hi, const std::uint64_t lo) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(const std::uint64_t hi, const std::uint64_t lo) noexcept; template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const SignedInteger v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(const SignedInteger v) noexcept; template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const UnsignedInteger v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(const UnsignedInteger v) noexcept; #ifdef BOOST_INT128_HAS_INT128 // Typically a typedef from __int128 - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const detail::builtin_i128 v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(const detail::builtin_i128 v) noexcept; // Typically a typedef unsigned __int128 - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const detail::builtin_u128 v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(const detail::builtin_u128 v) noexcept; #endif // BOOST_INT128_HAS_INT128 // Construct from floating-point types template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(Float f) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(Float f) noexcept; }; } // namespace int128 @@ -126,7 +126,7 @@ struct uint128_t ---- None of the constructors are marked `explicit` in order to match the implicit conversion behavior of the built-in integer types. -Integer constructors are subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +Integer constructors are subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. The floating-point constructor truncates toward zero, matching `static_cast(f)`. Edge cases mirror libgcc's `__fixunsXfti`: NaN and negative values yield zero, and values `>= 2^128` (including positive infinity) saturate to `UINT128_MAX`. @@ -139,7 +139,7 @@ Edge cases mirror libgcc's `__fixunsXfti`: NaN and negative values yield zero, a namespace boost { namespace int128 { -struct uint128_t +struct uint128 { ... @@ -171,9 +171,9 @@ struct uint128_t ---- All conversion operators except `operator bool()` are implicit to match the behavior of built-in integer types. -`operator bool()` is explicit so that a `uint128_t` cannot accidentally bind to a `bool` parameter; contextual conversions (`if (x)`, `!x`, etc.) still work. -Conversions to signed integers are subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. -Conversions to floating-point types may not be lossless depending on the value of the `uint128_t` at time of conversion, +`operator bool()` is explicit so that a `uint128` cannot accidentally bind to a `bool` parameter; contextual conversions (`if (x)`, `!x`, etc.) still work. +Conversions to signed integers are subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. +Conversions to floating-point types may not be lossless depending on the value of the `uint128` at time of conversion, as the number of digits it represents can exceed the precision of the significand in floating point types. [#u128_comparison_operators] @@ -184,108 +184,108 @@ as the number of digits it represents can exceed the precision of the significan [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns if the `lhs` value is less than the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Less Than or Equal To [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns if the `lhs` value is less than or equal to the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Greater Than [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns if the `lhs` value is greater than the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Greater Than or Equal To [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns if the `lhs` value is greater than or equal to the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Equality [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns if the `lhs` value is equal to the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Inequality [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns if the `lhs` value is not equal to the `rhs` value without exception. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Spaceship Operator (Requires pass:[C++20]) [source, c++] ---- -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128 lhs, const uint128 rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Integer lhs, const uint128 rhs) noexcept; ---- Returns one of the following without exception: @@ -301,7 +301,7 @@ Returns one of the following without exception: [source, c++] ---- -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator~(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator~(const uint128 rhs) noexcept ---- Returns the bitwise negation of `rhs` without exception. @@ -311,70 +311,70 @@ Returns the bitwise negation of `rhs` without exception. [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns the bitwise or of `lhs` and `rhs` without exception. -This operation is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === And [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns the bitwise and of `lhs` and `rhs` without exception. -This operation is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Xor [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns the bitwise xor of `lhs` and `rhs` without exception. -This operation is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Left Shift [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator<<(const uint128 lhs, const Integer rhs) noexcept; template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const uint128 rhs) noexcept; template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned int operator<<(const UnsignedInteger lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr unsigned int operator<<(const UnsignedInteger lhs, const uint128 rhs) noexcept; // When the compiler provides native 128-bit integers, a built-in 128-bit lhs -// shifted by a uint128_t returns that built-in type. +// shifted by a uint128 returns that built-in type. #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_HOST_DEVICE constexpr detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const uint128 rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const uint128 rhs) noexcept; #endif -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator<<(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns the bitwise left shift of `lhs` without exception. @@ -386,30 +386,30 @@ When the count is in the range `[0, 128)` the low bits vacated by the shift are Shifting by a count that is negative or greater than or equal to `128` (the operand width in bits) is *undefined behavior*, exactly as for the built-in shift operators and the native `__int128` and `unsigned __int128` types (`[expr.shift]` in the C++ standard). No result is guaranteed, not even zero, and inside a constant expression the program is ill-formed. Delegating straight to the native shift this way keeps the in-range operation branchless and bit-for-bit compatible with the built-in types. ==== -When a built-in integer is the `lhs` and a `uint128_t` is the shift amount, the return type matches the promotion behavior of the built-in shift: integer types of 16 bits or fewer promote to `int` or `unsigned int`, and, where the compiler provides them, the native 128-bit types return their own type. -This operation is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +When a built-in integer is the `lhs` and a `uint128` is the shift amount, the return type matches the promotion behavior of the built-in shift: integer types of 16 bits or fewer promote to `int` or `unsigned int`, and, where the compiler provides them, the native 128-bit types return their own type. +This operation is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Right Shift [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator>>(const uint128 lhs, const Integer rhs) noexcept; template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const uint128 rhs) noexcept; template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned int operator>>(const UnsignedInteger lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr unsigned int operator>>(const UnsignedInteger lhs, const uint128 rhs) noexcept; // When the compiler provides native 128-bit integers, a built-in 128-bit lhs -// shifted by a uint128_t returns that built-in type. +// shifted by a uint128 returns that built-in type. #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_HOST_DEVICE constexpr detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const uint128 rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const uint128 rhs) noexcept; #endif -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator>>(const uint128 lhs, const uint128 rhs) noexcept; ---- Returns the bitwise right shift of `lhs` without exception. @@ -421,8 +421,8 @@ When the count is in the range `[0, 128)` the shift is logical: the high bits va Shifting by a count that is negative or greater than or equal to `128` (the operand width in bits) is *undefined behavior*, exactly as for the built-in shift operators and the native `__int128` and `unsigned __int128` types (`[expr.shift]` in the C++ standard). No result is guaranteed, not even zero, and inside a constant expression the program is ill-formed. Delegating straight to the native shift this way keeps the in-range operation branchless and bit-for-bit compatible with the built-in types. ==== -When a built-in integer is the `lhs` and a `uint128_t` is the shift amount, the return type matches the promotion behavior of the built-in shift: integer types of 16 bits or fewer promote to `int` or `unsigned int`, and, where the compiler provides them, the native 128-bit types return their own type. -This operation is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +When a built-in integer is the `lhs` and a `uint128` is the shift amount, the return type matches the promotion behavior of the built-in shift: integer types of 16 bits or fewer promote to `int` or `unsigned int`, and, where the compiler provides them, the native 128-bit types return their own type. +This operation is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. [#u128_math_operators] @@ -432,8 +432,8 @@ This operation is subject to mixed sign limitations discussed xref:uint128_t.ado [source, c++] ---- -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t value) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t value) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 value) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 value) noexcept; ---- Unary `operator+` returns `value` unchanged. @@ -444,92 +444,92 @@ Unary `operator-` returns the two's-complement negation of `value` (equivalent t [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 lhs, const uint128 rhs) noexcept; ---- -Returns as a `uint128_t` the sum of `lhs` and `rhs`. -If the sum is greater than is representable by a `uint128_t`, the operation silently performs unsigned rollover in the direction of 0. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +Returns as a `uint128` the sum of `lhs` and `rhs`. +If the sum is greater than is representable by a `uint128`, the operation silently performs unsigned rollover in the direction of 0. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Subtraction [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 lhs, const uint128 rhs) noexcept; ---- -Returns as a `uint128_t` the difference of `lhs` and `rhs`. -If the difference is less than is representable by a `uint128_t`, the operation silently performs unsigned rollover in the direction of `BOOST_INT128_UINT128_MAX`. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +Returns as a `uint128` the difference of `lhs` and `rhs`. +If the difference is less than is representable by a `uint128`, the operation silently performs unsigned rollover in the direction of `BOOST_INT128_UINT128_MAX`. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Multiplication [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const uint128 lhs, const uint128 rhs) noexcept; ---- -Returns as a `uint128_t` the product of `lhs` and `rhs`. -If the product is greater than is representable by a `uint128_t`, the operation silently performs unsigned rollover in the direction of 0. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +Returns as a `uint128` the product of `lhs` and `rhs`. +If the product is greater than is representable by a `uint128`, the operation silently performs unsigned rollover in the direction of 0. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Division [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const uint128 lhs, const uint128 rhs) noexcept; ---- -Returns as a `uint128_t` the quotient of `lhs` and `rhs` without exception. +Returns as a `uint128` the quotient of `lhs` and `rhs` without exception. For any non-zero `rhs` the result is identical to the built-in `unsigned __int128` division. Division by zero is undefined behavior, exactly as for `unsigned __int128`: the library adds no zero-divisor check (so the generated code matches the built-in and traps where the hardware faults on integer division by zero), and a zero divisor seen during constant evaluation is a hard compile-time error. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. === Modulo [source, c++] ---- template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, const Integer rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const uint128 lhs, const Integer rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const Integer lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const Integer lhs, const uint128 rhs) noexcept; -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, const uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const uint128 lhs, const uint128 rhs) noexcept; ---- -Returns as a `uint128_t` the remainder of `lhs` and `rhs` without exception. +Returns as a `uint128` the remainder of `lhs` and `rhs` without exception. For any non-zero `rhs` the result is identical to the built-in `unsigned __int128` remainder. Remainder by zero is undefined behavior, exactly as for `unsigned __int128`: the library adds no zero-divisor check (so the generated code matches the built-in and traps where the hardware faults on integer division by zero), and a zero divisor seen during constant evaluation is a hard compile-time error. -This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128_t.adoc#u128_operator_behavior[above]. +This operation is only defined for integers and is subject to mixed sign limitations discussed xref:uint128.adoc#u128_operator_behavior[above]. [#u128_limits] == `` Support and Values -A full specialization of `std::numeric_limits` is provided. +A full specialization of `std::numeric_limits` is provided. It is defined in xref:api_reference.adoc#api_structs[``] and is also included by the umbrella header ``. The member values match those of a built-in unsigned 128-bit integer. @@ -540,14 +540,14 @@ The member values match those of a built-in unsigned 128-bit integer. namespace std { template <> -class numeric_limits; +class numeric_limits; } // namespace std ---- === Member Functions -Each function is `static constexpr` and returns a `uint128_t`. +Each function is `static constexpr` and returns a `uint128`. [cols="1,2", options="header"] |=== @@ -581,7 +581,7 @@ Each function is `static constexpr` and returns a `uint128_t`. | `0` |=== -NOTE: Wrap `min` and `max` in parentheses at the call site, as `(std::numeric_limits::min)()`, so the call is not intercepted by the `min`/`max` function-like macros that some platform headers define. +NOTE: Wrap `min` and `max` in parentheses at the call site, as `(std::numeric_limits::min)()`, so the call is not intercepted by the `min`/`max` function-like macros that some platform headers define. === Member Constants diff --git a/doc/modules/ROOT/pages/utilities.adoc b/doc/modules/ROOT/pages/utilities.adoc index 4250f169..fea899ed 100644 --- a/doc/modules/ROOT/pages/utilities.adoc +++ b/doc/modules/ROOT/pages/utilities.adoc @@ -9,7 +9,7 @@ https://www.boost.org/LICENSE_1_0.txt :idprefix: utilities_ The `` header collects helpers that operate on the library types directly and would not fit naturally into the analogous STL-style headers. -The functions are tuned specifically for `uint128_t` and `int128_t` rather than being template generalizations, which allows the library to dispatch to a fast path based on the shape of the modulus. +The functions are tuned specifically for `uint128` and `int128` rather than being template generalizations, which allows the library to dispatch to a fast path based on the shape of the modulus. [source, c++] ---- @@ -31,16 +31,16 @@ The naive expression `pow(base, exp) % m` is unusable for 128-bit inputs because namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t powm(uint128_t base, uint128_t exp, uint128_t m) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 powm(uint128 base, uint128 exp, uint128 m) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t powm(int128_t base, int128_t exp, int128_t m) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 powm(int128 base, int128 exp, int128 m) noexcept; } // namespace int128 } // namespace boost ---- The signed overload returns the non-negative residue in the range `[0, m)`, matching the convention used by `pow(a, b, m)` in Python and most arbitrary-precision libraries. -Negative bases are reduced before exponentiation; `(std::numeric_limits::min)()` is handled correctly even though its magnitude is not representable in `int128_t`. +Negative bases are reduced before exponentiation; `(std::numeric_limits::min)()` is handled correctly even though its magnitude is not representable in `int128`. === Special Cases @@ -76,9 +76,9 @@ Unlike `powm` there is no modulus: the result is the true power reduced modulo ` namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t ipow(uint128_t base, std::uint64_t exp) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 ipow(uint128 base, std::uint64_t exp) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t ipow(int128_t base, std::uint64_t exp) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 ipow(int128 base, std::uint64_t exp) noexcept; } // namespace int128 } // namespace boost @@ -114,9 +114,9 @@ The computation runs entirely in integer arithmetic using Newton's method, so it namespace boost { namespace int128 { -BOOST_INT128_HOST_DEVICE constexpr uint128_t isqrt(uint128_t n) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 isqrt(uint128 n) noexcept; -BOOST_INT128_HOST_DEVICE constexpr int128_t isqrt(int128_t n) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 isqrt(int128 n) noexcept; } // namespace int128 } // namespace boost @@ -167,7 +167,7 @@ The three type parameters are independent: the result type and the two operand t The operation always uses the exact mathematical value of each operand, so a negative signed value added to an unsigned value, or a product that needs up to 256 bits internally, is evaluated correctly. Following the C23 rules, `T1`, `T2`, and `T3` may be any integer type other than `bool`, plain `char`, an enumerated type, or a bit-precise (`_BitInt`) type. -In addition to the standard and extended integer types, the library's `uint128_t` and `int128_t` are accepted. +In addition to the standard and extended integer types, the library's `uint128` and `int128` are accepted. The following example exercises all three operations, including the wrap-around, the `INT128_MIN * -1` case, and the mixed-type behavior described above. @@ -195,7 +195,7 @@ ckd_mul(INT128_MAX, 2): overflow=true, wrapped=-2 ckd_mul(INT128_MIN, -1): overflow=true, wrapped=-170141183460469231731687303715884105728 === Mixed Types === -ckd_add(uint128_t{5}, int128_t{-3}): overflow=false, result=2 +ckd_add(uint128{5}, int128{-3}): overflow=false, result=2 ckd_mul(20, 20): overflow=true, wrapped=144 ---- ==== @@ -207,10 +207,10 @@ ckd_mul(20, 20): overflow=true, wrapped=144 They are available in C++14 and later. Unlike the built-in relational operators, which follow the usual arithmetic conversions, these functions compare the true mathematical values of their operands regardless of signedness. -When a `uint128_t` is compared with an `int128_t`, the operators convert the signed operand to unsigned, so `int128_t{-1} < uint128_t{0}` is reported as `false` and `(std::numeric_limits::max)() == int128_t{-1}` as `true`. +When a `uint128` is compared with an `int128`, the operators convert the signed operand to unsigned, so `int128{-1} < uint128{0}` is reported as `false` and `(std::numeric_limits::max)() == int128{-1}` as `true`. The `cmp_*` functions report the mathematically correct answer in both cases. -Throughout this section a *128-bit type* is `int128_t`, `uint128_t`, or a builtin 128-bit type where the platform provides one (`+__int128+` and its unsigned counterpart, or `std::_Signed128` and `std::_Unsigned128` on MSVC). +Throughout this section a *128-bit type* is `int128`, `uint128`, or a builtin 128-bit type where the platform provides one (`+__int128+` and its unsigned counterpart, or `std::_Signed128` and `std::_Unsigned128` on MSVC). [source, c++] ---- @@ -242,7 +242,7 @@ BOOST_INT128_HOST_DEVICE constexpr bool cmp_greater_equal(T a, U b) noexcept; `cmp_equal(a, b)` returns `true` when `a` and `b` are mathematically equal, and `cmp_less(a, b)` returns `true` when `a` is mathematically less than `b`. The remaining four functions are defined in terms of these two exactly as in the standard: `cmp_not_equal` is `!cmp_equal(a, b)`, `cmp_greater(a, b)` is `cmp_less(b, a)`, `cmp_less_equal(a, b)` is `!cmp_less(b, a)`, and `cmp_greater_equal(a, b)` is `!cmp_less(a, b)`. -Every operand pair in which at least one operand is a 128-bit type is supported, including a `uint128_t` (or an unsigned builtin 128-bit value) against a signed `int128_t` (or a signed builtin one). +Every operand pair in which at least one operand is a 128-bit type is supported, including a `uint128` (or an unsigned builtin 128-bit value) against a signed `int128` (or a signed builtin one). Following the standard, a `bool`, a character type (`char`, `wchar_t`, `char8_t`, `char16_t`, `char32_t`), or `std::byte` is not a permitted operand, and such a call is ill-formed. [#in_range] @@ -264,7 +264,7 @@ BOOST_INT128_HOST_DEVICE constexpr bool in_range(Integer t) noexcept; ---- The target type `R` and the type of `t` may each be a builtin integer or a 128-bit type; at least one of them is a 128-bit type (use `std::in_range` when neither is). -For example, `in_range(int128_t{-1})` is `false` because a negative value is not representable in an unsigned type, and `in_range((std::numeric_limits::max)())` is `false` because the value is too large. +For example, `in_range(int128{-1})` is `false` because a negative value is not representable in an unsigned type, and `in_range((std::numeric_limits::max)())` is `false` because the value is too large. .This https://github.com/cppalliance/int128/blob/develop/examples/integer_comparison.cpp[example] demonstrates signedness-safe comparison and range checking with the library 128-bit types ==== @@ -277,19 +277,19 @@ include::example$integer_comparison.cpp[] [listing] ---- === Signedness-safe comparison === -UINT128_MAX == int128_t{-1} (operator): true -cmp_equal(UINT128_MAX, int128_t{-1}): false -int128_t{-1} < uint128_t{0} (operator): false -cmp_less(int128_t{-1}, uint128_t{0}): true +UINT128_MAX == int128{-1} (operator): true +cmp_equal(UINT128_MAX, int128{-1}): false +int128{-1} < uint128{0} (operator): false +cmp_less(int128{-1}, uint128{0}): true === Mixed with builtin integers === -cmp_less(int128_t{-5}, 0u): true -cmp_equal(uint128_t{42}, 42): true +cmp_less(int128{-5}, 0u): true +cmp_equal(uint128{42}, 42): true === in_range === -in_range(int128_t{200}): false -in_range(int128_t{-1}): false +in_range(int128{200}): false +in_range(int128{-1}): false in_range(UINT128_MAX): false -in_range(UINT128_MAX): false +in_range(UINT128_MAX): false ---- ==== diff --git a/doc/render_benchmarks.py b/doc/render_benchmarks.py index 4d9f8ce8..3766651c 100644 --- a/doc/render_benchmarks.py +++ b/doc/render_benchmarks.py @@ -84,8 +84,8 @@ # Fallback when a data set names a baseline that it did not measure; first match wins. BASELINE_PRIORITY = { - 'u128': ['unsigned __int128', 'std::_Unsigned128', 'boost::mp::uint128_t'], - 'i128': ['__int128', 'std::_Signed128', 'boost::mp::int128_t'], + 'u128': ['unsigned __int128', 'std::_Unsigned128', 'boost::mp::uint128'], + 'i128': ['__int128', 'std::_Signed128', 'boost::mp::int128'], } diff --git a/examples/basic_arithmetic.cpp b/examples/basic_arithmetic.cpp index 76888dca..704781de 100644 --- a/examples/basic_arithmetic.cpp +++ b/examples/basic_arithmetic.cpp @@ -12,12 +12,12 @@ int main() // They can be between values of the same type, or the same signedness by default. // See `mixed_type_arithmetic.cpp` for operations with different signedness. - using boost::int128::int128_t; - using boost::int128::uint128_t; + using boost::int128::int128; + using boost::int128::uint128; // Basic arithmetic with signed 128-bit integers - int128_t x {1000000000000LL}; // 1 trillion - int128_t y {999999999999LL}; // Just under 1 trillion + int128 x {1000000000000LL}; // 1 trillion + int128 y {999999999999LL}; // Just under 1 trillion std::cout << "=== Signed 128-bit Arithmetic ===" << std::endl; std::cout << "x = " << x << std::endl; @@ -44,14 +44,14 @@ int main() std::cout << "x != y: " << (x != y) << std::endl; // Negative values and absolute value - int128_t negative {-42}; + int128 negative {-42}; std::cout << "\nNegative values:" << std::endl; std::cout << "negative = " << negative << std::endl; std::cout << "abs(negative) = " << boost::int128::abs(negative) << std::endl; // Compound assignment operators std::cout << "\nCompound assignment operators:" << std::endl; - int128_t z {100}; + int128 z {100}; std::cout << "z = " << z << std::endl; z += 50; @@ -71,14 +71,14 @@ int main() // Unsigned 128-bit arithmetic - useful for very large positive values std::cout << "\n=== Unsigned 128-bit Arithmetic ===" << std::endl; - uint128_t large {UINT64_C(0x1), UINT64_C(0x0)}; // 2^64 + uint128 large {UINT64_C(0x1), UINT64_C(0x0)}; // 2^64 std::cout << "large (2^64) = " << large << std::endl; std::cout << "large * 2 = " << (large * 2U) << std::endl; std::cout << "large + large = " << (large + large) << std::endl; // Increment and decrement std::cout << "\nIncrement and Decrement:" << std::endl; - int128_t counter {10}; + int128 counter {10}; std::cout << "counter = " << counter << std::endl; std::cout << "++counter = " << ++counter << std::endl; std::cout << "counter++ = " << counter++ << std::endl; diff --git a/examples/bit.cpp b/examples/bit.cpp index b025ca23..34d3cc88 100644 --- a/examples/bit.cpp +++ b/examples/bit.cpp @@ -36,9 +36,9 @@ int main() // end::exclude[] int main() { - // The functions from bit are only available for uint128_t + // The functions from bit are only available for uint128 - constexpr boost::int128::uint128_t x {1U}; + constexpr boost::int128::uint128 x {1U}; // All the functions are constexpr @@ -66,13 +66,13 @@ int main() // Swap the bytes // Create a value with distinct byte pattern - constexpr boost::int128::uint128_t original{ + constexpr boost::int128::uint128 original{ 0x0123456789ABCDEFULL, 0xFEDCBA9876543210ULL }; // Expected result after byteswap - constexpr boost::int128::uint128_t expected{ + constexpr boost::int128::uint128 expected{ 0x1032547698BADCFEULL, 0xEFCDAB8967452301ULL }; diff --git a/examples/charconv.cpp b/examples/charconv.cpp index 0af5f1f1..e499e768 100644 --- a/examples/charconv.cpp +++ b/examples/charconv.cpp @@ -12,8 +12,8 @@ int main() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; char buffer[64]; @@ -21,42 +21,42 @@ int main() std::cout << "=== to_chars ===" << std::endl; // Unsigned 128-bit to decimal string - constexpr uint128_t max_u128 {std::numeric_limits::max()}; + constexpr uint128 max_u128 {std::numeric_limits::max()}; auto result {boost::charconv::to_chars(buffer, buffer + sizeof(buffer), max_u128)}; *result.ptr = '\0'; - std::cout << "uint128_t max (decimal): " << buffer << std::endl; + std::cout << "uint128 max (decimal): " << buffer << std::endl; // Signed 128-bit to decimal string - constexpr int128_t min_i128 {std::numeric_limits::min()}; + constexpr int128 min_i128 {std::numeric_limits::min()}; result = boost::charconv::to_chars(buffer, buffer + sizeof(buffer), min_i128); *result.ptr = '\0'; - std::cout << "int128_t min (decimal): " << buffer << std::endl; + std::cout << "int128 min (decimal): " << buffer << std::endl; // Hexadecimal output (base 16) - uint128_t hex_value {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE12345678)}; + uint128 hex_value {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE12345678)}; result = boost::charconv::to_chars(buffer, buffer + sizeof(buffer), hex_value, 16); *result.ptr = '\0'; - std::cout << "uint128_t (hex): 0x" << buffer << std::endl; + std::cout << "uint128 (hex): 0x" << buffer << std::endl; // Octal output (base 8) - result = boost::charconv::to_chars(buffer, buffer + sizeof(buffer), int128_t{511}, 8); + result = boost::charconv::to_chars(buffer, buffer + sizeof(buffer), int128{511}, 8); *result.ptr = '\0'; - std::cout << "int128_t 511 (octal): 0" << buffer << std::endl; + std::cout << "int128 511 (octal): 0" << buffer << std::endl; // === from_chars: Parse character strings to integers === std::cout << "\n=== from_chars ===" << std::endl; - // Parse decimal string to uint128_t + // Parse decimal string to uint128 const char* decimal_str {"340282366920938463463374607431768211455"}; - uint128_t parsed_unsigned; + uint128 parsed_unsigned; boost::charconv::from_chars(decimal_str, decimal_str + std::strlen(decimal_str), parsed_unsigned); std::cout << "Parsed \"" << decimal_str << "\"" << std::endl; std::cout << " Result: " << parsed_unsigned << std::endl; std::cout << " Equals max? " << std::boolalpha << (parsed_unsigned == max_u128) << std::endl; - // Parse negative decimal string to int128_t + // Parse negative decimal string to int128 const char* negative_str {"-170141183460469231731687303715884105728"}; - int128_t parsed_signed; + int128 parsed_signed; boost::charconv::from_chars(negative_str, negative_str + std::strlen(negative_str), parsed_signed); std::cout << "Parsed \"" << negative_str << "\"" << std::endl; std::cout << " Result: " << parsed_signed << std::endl; @@ -64,7 +64,7 @@ int main() // Parse hexadecimal string (base 16) const char* hex_str {"DEADBEEFCAFEBABE12345678"}; - uint128_t parsed_hex; + uint128 parsed_hex; boost::charconv::from_chars(hex_str, hex_str + std::strlen(hex_str), parsed_hex, 16); std::cout << "Parsed hex \"" << hex_str << "\"" << std::endl; std::cout << " Result: " << parsed_hex << std::endl; diff --git a/examples/checked_arithmetic.cpp b/examples/checked_arithmetic.cpp index 55db9834..c2c98d62 100644 --- a/examples/checked_arithmetic.cpp +++ b/examples/checked_arithmetic.cpp @@ -17,8 +17,8 @@ int main() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; using boost::int128::ckd_add; using boost::int128::ckd_sub; using boost::int128::ckd_mul; @@ -29,41 +29,41 @@ int main() // operation is evaluated as if both operands had infinite range, the result // is written to *result wrapped to that type's width, and the function // returns true when the exact result did not fit. - constexpr auto u_max {std::numeric_limits::max()}; - constexpr auto i_max {std::numeric_limits::max()}; - constexpr auto i_min {std::numeric_limits::min()}; + constexpr auto u_max {std::numeric_limits::max()}; + constexpr auto i_max {std::numeric_limits::max()}; + constexpr auto i_min {std::numeric_limits::min()}; // A result that fits returns false and holds the exact value. std::cout << "=== Results That Fit ===" << std::endl; - int128_t r {}; - bool overflow {ckd_add(&r, int128_t{20}, int128_t{22})}; + int128 r {}; + bool overflow {ckd_add(&r, int128{20}, int128{22})}; std::cout << "ckd_add(20, 22): overflow=" << overflow << ", result=" << r << std::endl; // Addition that exceeds the type wraps modulo 2^128 and reports overflow. std::cout << "\n=== Addition Overflow ===" << std::endl; - uint128_t u {}; - overflow = ckd_add(&u, u_max, uint128_t{1}); + uint128 u {}; + overflow = ckd_add(&u, u_max, uint128{1}); std::cout << "ckd_add(UINT128_MAX, 1): overflow=" << overflow << ", wrapped=" << u << std::endl; // Subtracting below zero in an unsigned type wraps to the top of the range. std::cout << "\n=== Subtraction Underflow ===" << std::endl; - overflow = ckd_sub(&u, uint128_t{0}, uint128_t{1}); + overflow = ckd_sub(&u, uint128{0}, uint128{1}); std::cout << "ckd_sub(0, 1): overflow=" << overflow << ", wrapped=" << u << std::endl; // Multiplication detects overflow that operator* would silently roll over, // including INT128_MIN * -1, whose true result is not representable. std::cout << "\n=== Multiplication Overflow ===" << std::endl; - overflow = ckd_mul(&r, i_max, int128_t{2}); + overflow = ckd_mul(&r, i_max, int128{2}); std::cout << "ckd_mul(INT128_MAX, 2): overflow=" << overflow << ", wrapped=" << r << std::endl; - overflow = ckd_mul(&r, i_min, int128_t{-1}); + overflow = ckd_mul(&r, i_min, int128{-1}); std::cout << "ckd_mul(INT128_MIN, -1): overflow=" << overflow << ", wrapped=" << r << std::endl; // The result type and the two operand types are independent: they may differ // in width and signedness, and the exact mathematical value is always used. std::cout << "\n=== Mixed Types ===" << std::endl; std::int64_t narrow {}; - overflow = ckd_add(&narrow, uint128_t{5}, int128_t{-3}); - std::cout << "ckd_add(uint128_t{5}, int128_t{-3}): overflow=" << overflow + overflow = ckd_add(&narrow, uint128{5}, int128{-3}); + std::cout << "ckd_add(uint128{5}, int128{-3}): overflow=" << overflow << ", result=" << narrow << std::endl; // Narrow targets make the wrap-around easy to see (400 modulo 256 is 144). diff --git a/examples/construction.cpp b/examples/construction.cpp index fc92ec1b..97b5a62b 100644 --- a/examples/construction.cpp +++ b/examples/construction.cpp @@ -11,23 +11,23 @@ int main() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; - std::cout << "=== uint128_t Construction ===" << std::endl; + std::cout << "=== uint128 Construction ===" << std::endl; // 1) From a builtin integer type - constexpr uint128_t from_builtin {42U}; + constexpr uint128 from_builtin {42U}; std::cout << "From builtin (42U): " << from_builtin << std::endl; // 2) From high and low 64-bit values (high, low) - constexpr uint128_t from_parts {UINT64_C(0x1), UINT64_C(0x0)}; // 2^64 + constexpr uint128 from_parts {UINT64_C(0x1), UINT64_C(0x0)}; // 2^64 std::cout << "From parts (1, 0) = 2^64: " << from_parts << std::endl; - constexpr uint128_t max_value {UINT64_C(0xFFFFFFFFFFFFFFFF), UINT64_C(0xFFFFFFFFFFFFFFFF)}; + constexpr uint128 max_value {UINT64_C(0xFFFFFFFFFFFFFFFF), UINT64_C(0xFFFFFFFFFFFFFFFF)}; std::cout << "From parts (max, max): " << max_value << std::endl; std::cout << " Equals numeric_limits max? " << std::boolalpha - << (max_value == std::numeric_limits::max()) << std::endl; + << (max_value == std::numeric_limits::max()) << std::endl; // 3) From user-defined literals. // The library provides only string-form UDLs @@ -44,22 +44,22 @@ int main() // 5) From input stream std::stringstream ss; ss.str("12345678901234567890123456789"); - uint128_t from_stream; + uint128 from_stream; ss >> from_stream; std::cout << "From stringstream: " << from_stream << std::endl; - std::cout << "\n=== int128_t Construction ===" << std::endl; + std::cout << "\n=== int128 Construction ===" << std::endl; // Signed from builtin - constexpr int128_t signed_builtin {-42}; + constexpr int128 signed_builtin {-42}; std::cout << "From builtin (-42): " << signed_builtin << std::endl; // Signed from parts. Both words are stored unsigned, but the constructor takes // the high word signed; read it back with signed_high(). - constexpr int128_t min_value {INT64_MIN, 0}; + constexpr int128 min_value {INT64_MIN, 0}; std::cout << "From parts (INT64_MIN, 0): " << min_value << std::endl; std::cout << " Equals numeric_limits min? " - << (min_value == std::numeric_limits::min()) << std::endl; + << (min_value == std::numeric_limits::min()) << std::endl; // Signed literals. Values that fit in unsigned long long can be written // directly; the leading minus is parsed as a unary operator on the @@ -84,52 +84,52 @@ int main() std::cout << "\n=== Default and Copy Construction ===" << std::endl; // Default construction (zero-initialized) - constexpr uint128_t default_constructed {}; + constexpr uint128 default_constructed {}; std::cout << "Default constructed: " << default_constructed << std::endl; // Copy construction - const uint128_t copied {from_macro}; + const uint128 copied {from_macro}; std::cout << "Copy constructed: " << copied << std::endl; std::cout << "\n=== Floating-Point Construction ===" << std::endl; // Floating-point construction truncates toward zero, matching the behavior of // a static_cast from a floating-point type to a built-in integer. - constexpr uint128_t from_double {12345.9}; - std::cout << "uint128_t from 12345.9 (truncated): " << from_double << std::endl; + constexpr uint128 from_double {12345.9}; + std::cout << "uint128 from 12345.9 (truncated): " << from_double << std::endl; - constexpr int128_t from_negative_double {-12345.9}; - std::cout << "int128_t from -12345.9 (truncated toward zero): " << from_negative_double << std::endl; + constexpr int128 from_negative_double {-12345.9}; + std::cout << "int128 from -12345.9 (truncated toward zero): " << from_negative_double << std::endl; // Values that exceed the 64-bit range are routed through the full 128-bit decomposition. const double two_to_the_100 {1.2676506002282294e30}; // 2^100 - const uint128_t large_from_double {two_to_the_100}; - std::cout << "uint128_t from 2^100: " << large_from_double << std::endl; + const uint128 large_from_double {two_to_the_100}; + std::cout << "uint128 from 2^100: " << large_from_double << std::endl; std::cout << "\n=== Floating-Point Edge Cases ===" << std::endl; // NaN yields zero for both signed and unsigned (mirrors libgcc's __fix(uns)Xfti). const double nan_value {std::numeric_limits::quiet_NaN()}; - const uint128_t unsigned_from_nan {nan_value}; - const int128_t signed_from_nan {nan_value}; - std::cout << "uint128_t from NaN: " << unsigned_from_nan << std::endl; - std::cout << "int128_t from NaN: " << signed_from_nan << std::endl; + const uint128 unsigned_from_nan {nan_value}; + const int128 signed_from_nan {nan_value}; + std::cout << "uint128 from NaN: " << unsigned_from_nan << std::endl; + std::cout << "int128 from NaN: " << signed_from_nan << std::endl; - // Negative values are clamped to zero when constructing uint128_t. - const uint128_t unsigned_from_negative {-1.0}; - std::cout << "uint128_t from -1.0 (clamped to zero): " << unsigned_from_negative << std::endl; + // Negative values are clamped to zero when constructing uint128. + const uint128 unsigned_from_negative {-1.0}; + std::cout << "uint128 from -1.0 (clamped to zero): " << unsigned_from_negative << std::endl; // Positive overflow saturates: anything >= 2^128 (including +infinity) becomes UINT128_MAX. const double infinity {std::numeric_limits::infinity()}; - const uint128_t saturated_unsigned {infinity}; - std::cout << "uint128_t from +infinity (saturates to UINT128_MAX): " << saturated_unsigned << std::endl; + const uint128 saturated_unsigned {infinity}; + std::cout << "uint128 from +infinity (saturates to UINT128_MAX): " << saturated_unsigned << std::endl; - // For int128_t, values >= 2^127 saturate to INT128_MAX and values <= -2^127 saturate to INT128_MIN. + // For int128, values >= 2^127 saturate to INT128_MAX and values <= -2^127 saturate to INT128_MIN. const double huge {1e40}; // Well beyond 2^127 (~ 1.7e38) - const int128_t saturated_positive {huge}; - const int128_t saturated_negative {-huge}; - std::cout << "int128_t from 1e40 (saturates to INT128_MAX): " << saturated_positive << std::endl; - std::cout << "int128_t from -1e40 (saturates to INT128_MIN): " << saturated_negative << std::endl; + const int128 saturated_positive {huge}; + const int128 saturated_negative {-huge}; + std::cout << "int128 from 1e40 (saturates to INT128_MAX): " << saturated_positive << std::endl; + std::cout << "int128 from -1e40 (saturates to INT128_MIN): " << saturated_negative << std::endl; return 0; } \ No newline at end of file diff --git a/examples/container_hash.cpp b/examples/container_hash.cpp index e299bef5..1abea565 100644 --- a/examples/container_hash.cpp +++ b/examples/container_hash.cpp @@ -34,16 +34,16 @@ #include #include -using boost::int128::uint128_t; -using boost::int128::int128_t; +using boost::int128::uint128; +using boost::int128::int128; // A user-defined composite key that holds 128-bit fields. Providing a hash_value // overload in the type's own namespace lets Boost.ContainerHash find it via ADL, // and boost::hash_combine reuses the int128 hashes supplied by hash.hpp. struct point { - int128_t x; - int128_t y; + int128 x; + int128 y; }; bool operator==(const point& lhs, const point& rhs) @@ -65,30 +65,30 @@ int main() // boost::hash dispatches to the hash_value overloads from hash.hpp, which // delegate to std::hash, so the two functors always agree. - const uint128_t big {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE12345678)}; - const int128_t neg {-123456789012345678LL}; + const uint128 big {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE12345678)}; + const int128 neg {-123456789012345678LL}; - std::cout << "boost::hash matches std::hash (uint128_t): " - << std::boolalpha << (boost::hash{}(big) == std::hash{}(big)) << std::endl; - std::cout << "boost::hash matches std::hash (int128_t): " - << (boost::hash{}(neg) == std::hash{}(neg)) << std::endl; + std::cout << "boost::hash matches std::hash (uint128): " + << std::boolalpha << (boost::hash{}(big) == std::hash{}(big)) << std::endl; + std::cout << "boost::hash matches std::hash (int128): " + << (boost::hash{}(neg) == std::hash{}(neg)) << std::endl; - std::cout << "\n=== boost::unordered_map ===" << std::endl; + std::cout << "\n=== boost::unordered_map ===" << std::endl; - // boost::unordered_map defaults to boost::hash, so uint128_t keys need + // boost::unordered_map defaults to boost::hash, so uint128 keys need // no explicit hasher. - boost::unordered_map labels {}; - labels[uint128_t{1, 0}] = "two to the sixty-fourth"; // 2^64 - labels[uint128_t{UINT64_C(0x8000000000000000), 0}] = "two to the one hundred twenty-seventh"; // 2^127 - labels[uint128_t{42}] = "forty-two"; + boost::unordered_map labels {}; + labels[uint128{1, 0}] = "two to the sixty-fourth"; // 2^64 + labels[uint128{UINT64_C(0x8000000000000000), 0}] = "two to the one hundred twenty-seventh"; // 2^127 + labels[uint128{42}] = "forty-two"; std::cout << "Entries: " << labels.size() << std::endl; - std::cout << "Label at 2^64: " << labels[uint128_t{1, 0}] << std::endl; - std::cout << "Contains 42: " << (labels.find(uint128_t{42}) != labels.end()) << std::endl; + std::cout << "Label at 2^64: " << labels[uint128{1, 0}] << std::endl; + std::cout << "Contains 42: " << (labels.find(uint128{42}) != labels.end()) << std::endl; std::cout << "\n=== hash_combine for a composite key ===" << std::endl; - // The point hasher combines two int128_t fields; boost::hash finds it + // The point hasher combines two int128 fields; boost::hash finds it // via ADL, letting point be used as a key directly. boost::unordered_map populations {}; populations[point{10, 20}] = 5000000; @@ -99,16 +99,16 @@ int main() std::cout << "Same coordinate hashes equal: " << (boost::hash{}(point{10, 20}) == boost::hash{}(point{10, 20})) << std::endl; - std::cout << "\n=== boost::unordered_flat_map ===" << std::endl; + std::cout << "\n=== boost::unordered_flat_map ===" << std::endl; // The modern flat container also defaults to boost::hash. - boost::unordered_flat_map counts {}; - counts[int128_t{-1}] = 1; - counts[int128_t{0}] = 2; - counts[int128_t{1}] = 3; + boost::unordered_flat_map counts {}; + counts[int128{-1}] = 1; + counts[int128{0}] = 2; + counts[int128{1}] = 3; std::cout << "Flat map size: " << counts.size() << std::endl; - std::cout << "counts[-1] = " << counts[int128_t{-1}] << std::endl; + std::cout << "counts[-1] = " << counts[int128{-1}] << std::endl; return 0; } diff --git a/examples/cstdlib.cpp b/examples/cstdlib.cpp index 601a20c9..4f33551a 100644 --- a/examples/cstdlib.cpp +++ b/examples/cstdlib.cpp @@ -9,8 +9,8 @@ int main() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; std::cout << "=== div() Function ===" << std::endl; std::cout << "Returns both quotient and remainder in a single operation" << std::endl; @@ -18,8 +18,8 @@ int main() // Unsigned division std::cout << "\n--- Unsigned Division ---" << std::endl; - constexpr uint128_t dividend {1000000000000000000ULL}; - constexpr uint128_t divisor {7}; + constexpr uint128 dividend {1000000000000000000ULL}; + constexpr uint128 divisor {7}; auto uresult {boost::int128::div(dividend, divisor)}; std::cout << dividend << " / " << divisor << " = " << uresult.quot @@ -32,8 +32,8 @@ int main() // Large value division std::cout << "\n--- Large Value Division ---" << std::endl; - constexpr uint128_t large_dividend {uint128_t{1} << 100}; // 2^100 - constexpr uint128_t large_divisor {uint128_t{1} << 50}; // 2^50 + constexpr uint128 large_dividend {uint128{1} << 100}; // 2^100 + constexpr uint128 large_divisor {uint128{1} << 50}; // 2^50 auto large_result {boost::int128::div(large_dividend, large_divisor)}; std::cout << "2^100 / 2^50 = " << large_result.quot @@ -42,8 +42,8 @@ int main() // Signed division std::cout << "\n--- Signed Division ---" << std::endl; - constexpr int128_t signed_dividend {-100}; - constexpr int128_t signed_divisor {7}; + constexpr int128 signed_dividend {-100}; + constexpr int128 signed_divisor {7}; auto sresult {boost::int128::div(signed_dividend, signed_divisor)}; std::cout << signed_dividend << " / " << signed_divisor << " = " << sresult.quot @@ -52,10 +52,10 @@ int main() // Different sign combinations std::cout << "\n--- Sign Combinations ---" << std::endl; - constexpr int128_t pos {17}; - constexpr int128_t neg {-17}; - constexpr int128_t div_pos {5}; - constexpr int128_t div_neg {-5}; + constexpr int128 pos {17}; + constexpr int128 neg {-17}; + constexpr int128 div_pos {5}; + constexpr int128 div_neg {-5}; auto pp {boost::int128::div(pos, div_pos)}; auto pn {boost::int128::div(pos, div_neg)}; @@ -70,7 +70,7 @@ int main() // Edge case: dividend smaller than divisor std::cout << "\n--- Edge Cases ---" << std::endl; - auto small_div {boost::int128::div(uint128_t{3}, uint128_t{10})}; + auto small_div {boost::int128::div(uint128{3}, uint128{10})}; std::cout << "3 / 10 = " << small_div.quot << " remainder " << small_div.rem << std::endl; return 0; diff --git a/examples/cuda.cu b/examples/cuda.cu index b8eeb61c..80271e54 100644 --- a/examples/cuda.cu +++ b/examples/cuda.cu @@ -14,7 +14,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; // Calculates the GCD of 2 values on device __global__ void cuda_gcd(const test_type* in1, const test_type* in2, test_type* out, int numElements) diff --git a/examples/cuda_primality.cu b/examples/cuda_primality.cu index 5a6cdb71..4e261af9 100644 --- a/examples/cuda_primality.cu +++ b/examples/cuda_primality.cu @@ -7,7 +7,7 @@ // // Every step of the test reduces a product of two residues modulo n. For a // 64-bit n both operands can approach 2^64, so the product needs a full 128 -// bits before it can be reduced. uint128_t supplies that intermediate in +// bits before it can be reduced. uint128 supplies that intermediate in // device code, where unsigned __int128 is not portably available. #include @@ -19,7 +19,7 @@ #include -using boost::int128::uint128_t; +using boost::int128::uint128; // Number of bases that make Miller-Rabin deterministic for every 64-bit n constexpr int num_bases {12}; @@ -28,7 +28,7 @@ constexpr int num_bases {12}; // first so that no high-order bits are discarded before the reduction. __host__ __device__ std::uint64_t mulmod(const std::uint64_t a, const std::uint64_t b, const std::uint64_t n) noexcept { - return static_cast((uint128_t{a} * uint128_t{b}) % uint128_t{n}); + return static_cast((uint128{a} * uint128{b}) % uint128{n}); } // Deterministic Miller-Rabin. Exact for the whole 64-bit range. @@ -65,8 +65,8 @@ __host__ __device__ bool is_prime(const std::uint64_t n) noexcept for (int i {0}; i < num_bases; ++i) { - // powm keeps every intermediate in a uint128_t, so a^d mod n is exact - auto x {static_cast(boost::int128::powm(uint128_t{bases[i]}, uint128_t{d}, uint128_t{n}))}; + // powm keeps every intermediate in a uint128, so a^d mod n is exact + auto x {static_cast(boost::int128::powm(uint128{bases[i]}, uint128{d}, uint128{n}))}; if (x == 1U || x == n - 1U) { @@ -136,9 +136,9 @@ int main() const std::uint64_t b {14029467366897019727ULL}; const std::uint64_t n {18446744073709551557ULL}; - std::cout << "Full 128-bit product a * b: " << uint128_t{a} * uint128_t{b} << std::endl; + std::cout << "Full 128-bit product a * b: " << uint128{a} * uint128{b} << std::endl; std::cout << " (a * b) % n, 64-bit math: " << (a * b) % n << " <- the product wrapped" << std::endl; - std::cout << " (a * b) % n via uint128_t: " << mulmod(a, b, n) << std::endl; + std::cout << " (a * b) % n via uint128: " << mulmod(a, b, n) << std::endl; std::cout << std::endl; // Test the largest odd values that fit in 64 bits diff --git a/examples/fmt_format.cpp b/examples/fmt_format.cpp index d953f803..d020e8c4 100644 --- a/examples/fmt_format.cpp +++ b/examples/fmt_format.cpp @@ -23,13 +23,13 @@ int main() { - using boost::int128::int128_t; - using boost::int128::uint128_t; + using boost::int128::int128; + using boost::int128::uint128; std::cout << "=== Basic Formatting ===" << std::endl; - constexpr uint128_t unsigned_value {0xDEADBEEF, 0xCAFEBABE12345678}; - constexpr int128_t signed_value {-123456789012345678}; + constexpr uint128 unsigned_value {0xDEADBEEF, 0xCAFEBABE12345678}; + constexpr int128 signed_value {-123456789012345678}; // Default decimal formatting std::cout << fmt::format("Default (decimal): {}", unsigned_value) << std::endl; @@ -38,7 +38,7 @@ int main() std::cout << "\n=== Base Specifiers ===" << std::endl; // Different bases: binary, octal, decimal, hex - constexpr uint128_t value {255}; + constexpr uint128 value {255}; std::cout << fmt::format("Binary: {:b}", value) << std::endl; std::cout << fmt::format("Octal: {:o}", value) << std::endl; std::cout << fmt::format("Decimal: {:d}", value) << std::endl; @@ -55,8 +55,8 @@ int main() std::cout << "\n=== Sign Options ===" << std::endl; - constexpr int128_t positive {42}; - constexpr int128_t negative {-42}; + constexpr int128 positive {42}; + constexpr int128 negative {-42}; // Sign specifiers: + (always show), - (default), space (space for positive) std::cout << fmt::format("Plus sign: {:+} and {:+}", positive, negative) << std::endl; @@ -101,12 +101,12 @@ int main() std::cout << "\n=== Large Values ===" << std::endl; // Demonstrate with values beyond 64-bit range - constexpr auto uint_max {std::numeric_limits::max()}; - constexpr auto int_min {std::numeric_limits::min()}; + constexpr auto uint_max {std::numeric_limits::max()}; + constexpr auto int_min {std::numeric_limits::min()}; - std::cout << fmt::format("uint128_t max: {}", uint_max) << std::endl; - std::cout << fmt::format("uint128_t max (hex): {:#x}", uint_max) << std::endl; - std::cout << fmt::format("int128_t min: {}", int_min) << std::endl; + std::cout << fmt::format("uint128 max: {}", uint_max) << std::endl; + std::cout << fmt::format("uint128 max (hex): {:#x}", uint_max) << std::endl; + std::cout << fmt::format("int128 min: {}", int_min) << std::endl; std::cout << "\n=== Combined Format Specifiers ===" << std::endl; diff --git a/examples/hello_world.cpp b/examples/hello_world.cpp index 94122d48..95940650 100644 --- a/examples/hello_world.cpp +++ b/examples/hello_world.cpp @@ -9,8 +9,8 @@ int main() { // 2^64 is one past the largest value a 64-bit integer can hold - const boost::int128::uint128_t x {boost::int128::uint128_t{1} << 64U}; - const boost::int128::uint128_t y {42}; + const boost::int128::uint128 x {boost::int128::uint128{1} << 64U}; + const boost::int128::uint128 y {42}; std::cout << x << " + " << y << " = " << x + y << std::endl; diff --git a/examples/integer_comparison.cpp b/examples/integer_comparison.cpp index 0c390f98..ce21bb3f 100644 --- a/examples/integer_comparison.cpp +++ b/examples/integer_comparison.cpp @@ -17,38 +17,38 @@ int main() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; using boost::int128::cmp_equal; using boost::int128::cmp_less; using boost::int128::in_range; std::cout << std::boolalpha; - constexpr auto u_max {(std::numeric_limits::max)()}; + constexpr auto u_max {(std::numeric_limits::max)()}; // The built-in relational operators follow the usual arithmetic conversions, - // so comparing a uint128_t with a negative int128_t converts the negative + // so comparing a uint128 with a negative int128 converts the negative // value to a huge unsigned one and gives the wrong answer. The cmp_* family // compares the true mathematical values instead. std::cout << "=== Signedness-safe comparison ===" << std::endl; - std::cout << "UINT128_MAX == int128_t{-1} (operator): " << (u_max == int128_t{-1}) << std::endl; - std::cout << "cmp_equal(UINT128_MAX, int128_t{-1}): " << cmp_equal(u_max, int128_t{-1}) << std::endl; - std::cout << "int128_t{-1} < uint128_t{0} (operator): " << (int128_t{-1} < uint128_t{0}) << std::endl; - std::cout << "cmp_less(int128_t{-1}, uint128_t{0}): " << cmp_less(int128_t{-1}, uint128_t{0}) << std::endl; + std::cout << "UINT128_MAX == int128{-1} (operator): " << (u_max == int128{-1}) << std::endl; + std::cout << "cmp_equal(UINT128_MAX, int128{-1}): " << cmp_equal(u_max, int128{-1}) << std::endl; + std::cout << "int128{-1} < uint128{0} (operator): " << (int128{-1} < uint128{0}) << std::endl; + std::cout << "cmp_less(int128{-1}, uint128{0}): " << cmp_less(int128{-1}, uint128{0}) << std::endl; // Either operand may be a builtin integer of any width and signedness. std::cout << "\n=== Mixed with builtin integers ===" << std::endl; - std::cout << "cmp_less(int128_t{-5}, 0u): " << cmp_less(int128_t{-5}, 0U) << std::endl; - std::cout << "cmp_equal(uint128_t{42}, 42): " << cmp_equal(uint128_t{42}, 42) << std::endl; + std::cout << "cmp_less(int128{-5}, 0u): " << cmp_less(int128{-5}, 0U) << std::endl; + std::cout << "cmp_equal(uint128{42}, 42): " << cmp_equal(uint128{42}, 42) << std::endl; // in_range(v) reports whether v is representable in the target type R. // R and the type of v may each be a builtin integer or a 128-bit type. std::cout << "\n=== in_range ===" << std::endl; - std::cout << "in_range(int128_t{200}): " << in_range(int128_t{200}) << std::endl; - std::cout << "in_range(int128_t{-1}): " << in_range(int128_t{-1}) << std::endl; + std::cout << "in_range(int128{200}): " << in_range(int128{200}) << std::endl; + std::cout << "in_range(int128{-1}): " << in_range(int128{-1}) << std::endl; std::cout << "in_range(UINT128_MAX): " << in_range(u_max) << std::endl; - std::cout << "in_range(UINT128_MAX): " << in_range(u_max) << std::endl; + std::cout << "in_range(UINT128_MAX): " << in_range(u_max) << std::endl; return 0; } diff --git a/examples/integer_division.cpp b/examples/integer_division.cpp index 137d7d40..88c139a9 100644 --- a/examples/integer_division.cpp +++ b/examples/integer_division.cpp @@ -19,14 +19,14 @@ int main() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; std::cout << "=== Every rounding mode on -12 / 5 ===" << std::endl; // The exact quotient is -2.4, so the nearest integer is -2 and no mode ties - constexpr int128_t x {-12}; - constexpr int128_t y {5}; + constexpr int128 x {-12}; + constexpr int128 y {5}; std::cout << "div_to_zero = " << boost::int128::div_to_zero(x, y) << std::endl; std::cout << "div_away_zero = " << boost::int128::div_away_zero(x, y) << std::endl; @@ -38,8 +38,8 @@ int main() std::cout << "\n=== Tie breaking on -7 / 2 ===" << std::endl; // The exact quotient is -3.5, so every tie-breaking rule picks a different side - constexpr int128_t tie_x {-7}; - constexpr int128_t tie_y {2}; + constexpr int128 tie_x {-7}; + constexpr int128 tie_y {2}; std::cout << "div_ties_to_zero = " << boost::int128::div_ties_to_zero(tie_x, tie_y) << std::endl; std::cout << "div_ties_away_zero = " << boost::int128::div_ties_away_zero(tie_x, tie_y) << std::endl; @@ -66,8 +66,8 @@ int main() // operator% takes its sign from the dividend, which makes it a poor fit for // wrapping an offset into a range. rem_euclid always lands in [0, abs(y)). - constexpr int128_t modulus {7}; - for (int128_t offset {-9}; offset <= -6; ++offset) + constexpr int128 modulus {7}; + for (int128 offset {-9}; offset <= -6; ++offset) { std::cout << offset << " % 7 = " << (offset % modulus) << ", rem_euclid(" << offset << ", 7) = " << boost::int128::rem_euclid(offset, modulus) << std::endl; @@ -78,8 +78,8 @@ int main() // Counting fixed size blocks needed to cover a length is the classic use for // rounding towards positive infinity. The usual (length + block - 1) / block // overflows here, while div_to_pos_inf does not. - constexpr auto length {(std::numeric_limits::max)()}; - constexpr uint128_t block {1000}; + constexpr auto length {(std::numeric_limits::max)()}; + constexpr uint128 block {1000}; std::cout << "length = " << length << std::endl; std::cout << "div_to_pos_inf(length, 1000) = " << boost::int128::div_to_pos_inf(length, block) << std::endl; @@ -90,8 +90,8 @@ int main() // Rounding half to even keeps a long running sum from drifting upwards, which is // what operator/ plus a manual half-adjustment would do - constexpr int128_t scale {1000}; - const int128_t samples[] {int128_t{1500}, int128_t{2500}, int128_t{3500}, int128_t{-1500}}; + constexpr int128 scale {1000}; + const int128 samples[] {int128{1500}, int128{2500}, int128{3500}, int128{-1500}}; for (const auto sample : samples) { diff --git a/examples/math_and_random.cpp b/examples/math_and_random.cpp index 7fd2b069..4d0f4b4a 100644 --- a/examples/math_and_random.cpp +++ b/examples/math_and_random.cpp @@ -27,14 +27,14 @@ int main() { - std::cout << "=== uint128_t ===" << '\n'; + std::cout << "=== uint128 ===" << '\n'; // Setup our rng and distribution std::mt19937_64 rng {42}; - boost::random::uniform_int_distribution dist {0, (std::numeric_limits::max)()}; + boost::random::uniform_int_distribution dist {0, (std::numeric_limits::max)()}; - // Create a dataset for ourselves of random uint128_ts using our dist and rng from above - std::array data_set; + // Create a dataset for ourselves of random uint128s using our dist and rng from above + std::array data_set; for (auto& value : data_set) { value = dist(rng); @@ -45,12 +45,12 @@ int main() std::cout << "Variance: " << boost::math::statistics::variance(data_set) << '\n'; std::cout << " Median: " << boost::math::statistics::median(data_set) << '\n'; - std::cout << "=== int128_t ===" << '\n'; + std::cout << "=== int128 ===" << '\n'; - // We can also generate random signed integers using int128_t - boost::random::uniform_int_distribution signed_dist {std::numeric_limits::min(), std::numeric_limits::max()}; + // We can also generate random signed integers using int128 + boost::random::uniform_int_distribution signed_dist {std::numeric_limits::min(), std::numeric_limits::max()}; - std::cout << "Random int128_t: " << signed_dist(rng) << std::endl; + std::cout << "Random int128: " << signed_dist(rng) << std::endl; return 0; } diff --git a/examples/mixed_type_arithmetic.cpp b/examples/mixed_type_arithmetic.cpp index c06429aa..a6e34ff2 100644 --- a/examples/mixed_type_arithmetic.cpp +++ b/examples/mixed_type_arithmetic.cpp @@ -7,14 +7,14 @@ int main() { - // Mixed-sign comparisons and arithmetic between int128_t, uint128_t, and + // Mixed-sign comparisons and arithmetic between int128, uint128, and // built-in integer types of opposite signedness follow the C++ usual // arithmetic conversions, identical to the built-in __int128 / // unsigned __int128 types. - std::cout << "=== Mixed Type Arithmetic with uint128_t ===" << std::endl; + std::cout << "=== Mixed Type Arithmetic with uint128 ===" << std::endl; - constexpr boost::int128::uint128_t unsigned_value {3}; + constexpr boost::int128::uint128 unsigned_value {3}; std::cout << "unsigned_value = " << unsigned_value << std::endl; constexpr auto greater_unsigned_value {unsigned_value + 5}; @@ -27,9 +27,9 @@ int main() std::cout << "unsigned_value + 5 = " << (unsigned_value + 5) << " (same as greater_unsigned_value: " << greater_unsigned_value << ")" << std::endl; - std::cout << "\n=== Mixed Type Arithmetic with int128_t ===" << std::endl; + std::cout << "\n=== Mixed Type Arithmetic with int128 ===" << std::endl; - constexpr boost::int128::int128_t signed_value {-3}; + constexpr boost::int128::int128 signed_value {-3}; std::cout << "signed_value = " << signed_value << std::endl; std::cout << "signed_value + 1U = " << (signed_value + 1U) << std::endl; diff --git a/examples/numeric_algorithms.cpp b/examples/numeric_algorithms.cpp index e1e7dfd5..0e6922fd 100644 --- a/examples/numeric_algorithms.cpp +++ b/examples/numeric_algorithms.cpp @@ -9,43 +9,43 @@ int main() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; std::cout << "=== Greatest Common Divisor (gcd) ===" << std::endl; // Basic gcd - constexpr uint128_t a {48}; - constexpr uint128_t b {18}; + constexpr uint128 a {48}; + constexpr uint128 b {18}; std::cout << "gcd(" << a << ", " << b << ") = " << boost::int128::gcd(a, b) << std::endl; // gcd with larger values - constexpr uint128_t large_a {123456789012345678ULL}; - constexpr uint128_t large_b {987654321098765432ULL}; + constexpr uint128 large_a {123456789012345678ULL}; + constexpr uint128 large_b {987654321098765432ULL}; std::cout << "gcd(" << large_a << ", " << large_b << ") = " << boost::int128::gcd(large_a, large_b) << std::endl; // gcd with 128-bit values - constexpr uint128_t huge_a {uint128_t{1} << 100}; - constexpr uint128_t huge_b {uint128_t{1} << 80}; + constexpr uint128 huge_a {uint128{1} << 100}; + constexpr uint128 huge_b {uint128{1} << 80}; std::cout << "gcd(2^100, 2^80) = " << boost::int128::gcd(huge_a, huge_b) << " (= 2^80)" << std::endl; // Signed gcd (always returns positive) - constexpr int128_t neg_a {-48}; - constexpr int128_t neg_b {18}; + constexpr int128 neg_a {-48}; + constexpr int128 neg_b {18}; std::cout << "gcd(" << neg_a << ", " << neg_b << ") = " << boost::int128::gcd(neg_a, neg_b) << " (always positive)" << std::endl; std::cout << "\n=== Least Common Multiple (lcm) ===" << std::endl; // Basic lcm - constexpr uint128_t x {12}; - constexpr uint128_t y {18}; + constexpr uint128 x {12}; + constexpr uint128 y {18}; std::cout << "lcm(" << x << ", " << y << ") = " << boost::int128::lcm(x, y) << std::endl; // lcm with coprime numbers - constexpr uint128_t p {7}; - constexpr uint128_t q {11}; + constexpr uint128 p {7}; + constexpr uint128 q {11}; std::cout << "lcm(" << p << ", " << q << ") = " << boost::int128::lcm(p, q) << " (coprime: lcm = p * q)" << std::endl; @@ -60,14 +60,14 @@ int main() std::cout << "\n=== Midpoint ===" << std::endl; // Unsigned midpoint - constexpr uint128_t low {10}; - constexpr uint128_t high {20}; + constexpr uint128 low {10}; + constexpr uint128 high {20}; std::cout << "midpoint(" << low << ", " << high << ") = " << boost::int128::midpoint(low, high) << std::endl; // Midpoint with odd sum (rounds toward first argument) - constexpr uint128_t odd_low {10}; - constexpr uint128_t odd_high {21}; + constexpr uint128 odd_low {10}; + constexpr uint128 odd_high {21}; std::cout << "midpoint(" << odd_low << ", " << odd_high << ") = " << boost::int128::midpoint(odd_low, odd_high) << " (rounds toward first arg)" << std::endl; std::cout << "midpoint(" << odd_high << ", " << odd_low << ") = " @@ -75,7 +75,7 @@ int main() // Midpoint avoids overflow (unlike (a+b)/2) std::cout << "\n--- Overflow-safe midpoint ---" << std::endl; - constexpr auto uint_max {std::numeric_limits::max()}; + constexpr auto uint_max {std::numeric_limits::max()}; constexpr auto uint_max_minus_10 {uint_max - 10U}; std::cout << "midpoint(uint128_max, uint128_max - 10) = " << boost::int128::midpoint(uint_max, uint_max_minus_10) << std::endl; @@ -83,13 +83,13 @@ int main() // Signed midpoint std::cout << "\n--- Signed midpoint ---" << std::endl; - constexpr int128_t neg {-100}; - constexpr int128_t pos {100}; + constexpr int128 neg {-100}; + constexpr int128 pos {100}; std::cout << "midpoint(" << neg << ", " << pos << ") = " << boost::int128::midpoint(neg, pos) << std::endl; - constexpr int128_t neg2 {-100}; - constexpr int128_t neg3 {-50}; + constexpr int128 neg2 {-100}; + constexpr int128 neg3 {-50}; std::cout << "midpoint(" << neg2 << ", " << neg3 << ") = " << boost::int128::midpoint(neg2, neg3) << std::endl; diff --git a/examples/rollover.cpp b/examples/rollover.cpp index 115f39bb..a0324228 100644 --- a/examples/rollover.cpp +++ b/examples/rollover.cpp @@ -11,28 +11,28 @@ int main() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; - constexpr uint128_t max_unsigned_value {std::numeric_limits::max()}; - constexpr uint128_t min_unsigned_value {std::numeric_limits::min()}; + constexpr uint128 max_unsigned_value {std::numeric_limits::max()}; + constexpr uint128 min_unsigned_value {std::numeric_limits::min()}; - std::cout << "=== uint128_t behavior ===" << std::endl; + std::cout << "=== uint128 behavior ===" << std::endl; - std::cout << "Max of uint128_t: " << max_unsigned_value << '\n' + std::cout << "Max of uint128: " << max_unsigned_value << '\n' << "Max + 1U: " << max_unsigned_value + 1U << "\n\n"; - std::cout << "Min of uint128_t: " << min_unsigned_value << '\n' + std::cout << "Min of uint128: " << min_unsigned_value << '\n' << "Min - 1U: " << min_unsigned_value - 1U << "\n\n"; - constexpr int128_t max_signed_value {std::numeric_limits::max()}; - constexpr int128_t min_signed_value {std::numeric_limits::min()}; + constexpr int128 max_signed_value {std::numeric_limits::max()}; + constexpr int128 min_signed_value {std::numeric_limits::min()}; - std::cout << "=== int128_t behavior ===" << std::endl; + std::cout << "=== int128 behavior ===" << std::endl; - std::cout << "Max of int128_t: " << max_signed_value << '\n' + std::cout << "Max of int128: " << max_signed_value << '\n' << "Max + 1: " << max_signed_value + 1 << "\n"; - std::cout << "\nMin of int128_t: " << min_signed_value << '\n' + std::cout << "\nMin of int128: " << min_signed_value << '\n' << "Min - 1: " << min_signed_value - 1 << '\n' << std::endl; } diff --git a/examples/saturating_arithmetic.cpp b/examples/saturating_arithmetic.cpp index cb1960fc..ef886bf4 100644 --- a/examples/saturating_arithmetic.cpp +++ b/examples/saturating_arithmetic.cpp @@ -18,26 +18,26 @@ int main() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; // std::numeric_limits is overloaded for both types - constexpr auto uint_max {std::numeric_limits::max()}; - static_assert(std::is_same::value, "Types should match"); + constexpr auto uint_max {std::numeric_limits::max()}; + static_assert(std::is_same::value, "Types should match"); - constexpr auto int_max {std::numeric_limits::max()}; - constexpr auto int_min {std::numeric_limits::min()}; + constexpr auto int_max {std::numeric_limits::max()}; + constexpr auto int_min {std::numeric_limits::min()}; std::cout << "=== Saturating Arithmetic ===" << std::endl; - std::cout << "uint128_t max = " << uint_max << std::endl; - std::cout << "int128_t max = " << int_max << std::endl; - std::cout << "int128_t min = " << int_min << std::endl; + std::cout << "uint128 max = " << uint_max << std::endl; + std::cout << "int128 max = " << int_max << std::endl; + std::cout << "int128 min = " << int_min << std::endl; // Saturating arithmetic returns max on overflow, or min on underflow rather than rolling over std::cout << "\n=== Saturating Addition and Subtraction ===" << std::endl; std::cout << "saturating_add(uint_max, uint_max) = " << boost::int128::saturating_add(uint_max, uint_max) << " (saturates to uint_max)" << std::endl; - std::cout << "saturating_sub(0, uint_max) = " << boost::int128::saturating_sub(uint128_t{0}, uint_max) + std::cout << "saturating_sub(0, uint_max) = " << boost::int128::saturating_sub(uint128{0}, uint_max) << " (saturates to 0, not underflow)" << std::endl; // This is especially useful for signed types since rollover is undefined @@ -54,7 +54,7 @@ int main() // saturating_cast allows types to be safely converted without rollover behavior std::cout << "\n=== Saturating Casts ===" << std::endl; - std::cout << "saturating_cast(uint_max) = " << boost::int128::saturating_cast(uint_max) + std::cout << "saturating_cast(uint_max) = " << boost::int128::saturating_cast(uint_max) << " (saturates to int_max)" << std::endl; // You can also cast to builtin types diff --git a/examples/stream.cpp b/examples/stream.cpp index 12e2961e..354b8696 100644 --- a/examples/stream.cpp +++ b/examples/stream.cpp @@ -9,17 +9,17 @@ int main() { - using boost::int128::int128_t; - using boost::int128::uint128_t; + using boost::int128::int128; + using boost::int128::uint128; std::cout << "=== Basic Streaming ===" << std::endl; // Both types allow streaming as one would expect from a regular builtin-type - constexpr int128_t signed_value {-42}; + constexpr int128 signed_value {-42}; std::cout << "Signed value: " << signed_value << std::endl; // We can also use to change the output format - constexpr uint128_t unsigned_value {0x1, UINT64_MAX}; + constexpr uint128 unsigned_value {0x1, UINT64_MAX}; std::cout << "Unsigned value (dec): " << unsigned_value << '\n' << "Unsigned value (hex): " << std::hex << unsigned_value << '\n' << "Unsigned value (oct): " << std::oct << unsigned_value << std::endl; @@ -34,47 +34,47 @@ int main() std::cout << "\n=== Large Values (Beyond 64-bit) ===" << std::endl; // 2^64 = 18446744073709551616 (first value that doesn't fit in uint64_t) - constexpr uint128_t two_to_64 {1, 0}; + constexpr uint128 two_to_64 {1, 0}; std::cout << "2^64 = " << two_to_64 << std::endl; // 2^100 = a very large number - constexpr uint128_t two_to_100 {uint128_t{1} << 100}; + constexpr uint128 two_to_100 {uint128{1} << 100}; std::cout << "2^100 = " << two_to_100 << std::endl; - // Maximum uint128_t value - constexpr auto uint_max {std::numeric_limits::max()}; - std::cout << "uint128_t max = " << uint_max << std::endl; + // Maximum uint128 value + constexpr auto uint_max {std::numeric_limits::max()}; + std::cout << "uint128 max = " << uint_max << std::endl; - // Minimum and maximum int128_t values - constexpr auto int_min {std::numeric_limits::min()}; - constexpr auto int_max {std::numeric_limits::max()}; - std::cout << "int128_t min = " << int_min << std::endl; - std::cout << "int128_t max = " << int_max << std::endl; + // Minimum and maximum int128 values + constexpr auto int_min {std::numeric_limits::min()}; + constexpr auto int_max {std::numeric_limits::max()}; + std::cout << "int128 min = " << int_min << std::endl; + std::cout << "int128 max = " << int_max << std::endl; // String conversion using stringstream std::cout << "\n=== String Conversion with std::stringstream ===" << std::endl; - // Convert uint128_t to string + // Convert uint128 to string std::ostringstream oss; oss << two_to_100; auto str {oss.str()}; - std::cout << "uint128_t to string: \"" << str << "\"" << std::endl; + std::cout << "uint128 to string: \"" << str << "\"" << std::endl; - // Convert string to uint128_t + // Convert string to uint128 std::istringstream iss {"123456789012345678901234567890"}; - uint128_t parsed_value {}; + uint128 parsed_value {}; iss >> parsed_value; - std::cout << "String to uint128_t: " << parsed_value << std::endl; + std::cout << "String to uint128: " << parsed_value << std::endl; // Round-trip: value -> string -> value std::cout << "\n=== Round-trip Conversion ===" << std::endl; - constexpr uint128_t original {0xDEADBEEF, 0xCAFEBABE12345678}; + constexpr uint128 original {0xDEADBEEF, 0xCAFEBABE12345678}; std::ostringstream oss2; oss2 << original; auto original_str {oss2.str()}; std::istringstream iss2 {original_str}; - uint128_t round_tripped {}; + uint128 round_tripped {}; iss2 >> round_tripped; std::cout << "Original: " << original << std::endl; diff --git a/examples/sycl.cpp b/examples/sycl.cpp index 5b6f5a58..b15ad5cc 100644 --- a/examples/sycl.cpp +++ b/examples/sycl.cpp @@ -12,7 +12,7 @@ #include #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; // Calculates the GCD of two values on the SYCL device and verifies against the host int main() diff --git a/examples/sycl_accumulate.cpp b/examples/sycl_accumulate.cpp index b8714560..5488f62c 100644 --- a/examples/sycl_accumulate.cpp +++ b/examples/sycl_accumulate.cpp @@ -10,7 +10,7 @@ // worse on a GPU than on a CPU: a parallel reduction visits the elements in // whatever order the hardware schedules, and floating-point addition is not // associative, so the answer changes from run to run and from device to -// device. A uint128_t accumulator is wide enough to be exact here, and +// device. A uint128 accumulator is wide enough to be exact here, and // integer addition is associative, so the device result is bit-for-bit equal // to the host result no matter how the work is partitioned. @@ -22,7 +22,7 @@ #include #include -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { @@ -37,7 +37,7 @@ int main() // Shared (USM) allocations are readable from both the host and the device std::uint64_t* lhs {sycl::malloc_shared(numElements, q)}; std::uint64_t* rhs {sycl::malloc_shared(numElements, q)}; - uint128_t* partials {sycl::malloc_shared(numPartials, q)}; + uint128* partials {sycl::malloc_shared(numPartials, q)}; std::mt19937_64 rng {42}; for (int i {0}; i < numElements; ++i) @@ -53,33 +53,33 @@ int main() { const int p {static_cast(idx[0])}; - uint128_t acc {0}; + uint128 acc {0}; for (int i {p}; i < numElements; i += numPartials) { - acc += uint128_t{lhs[i]} * uint128_t{rhs[i]}; + acc += uint128{lhs[i]} * uint128{rhs[i]}; } partials[p] = acc; }); }).wait(); - uint128_t device_total {0}; + uint128 device_total {0}; for (int i {0}; i < numPartials; ++i) { device_total += partials[i]; } // The same sum on the host, walking the data in both directions - uint128_t host_ascending {0}; + uint128 host_ascending {0}; for (int i {0}; i < numElements; ++i) { - host_ascending += uint128_t{lhs[i]} * uint128_t{rhs[i]}; + host_ascending += uint128{lhs[i]} * uint128{rhs[i]}; } - uint128_t host_descending {0}; + uint128 host_descending {0}; for (int i {numElements - 1}; i >= 0; --i) { - host_descending += uint128_t{lhs[i]} * uint128_t{rhs[i]}; + host_descending += uint128{lhs[i]} * uint128{rhs[i]}; } // What the same reduction produces with a 64-bit accumulator @@ -90,7 +90,7 @@ int main() } std::cout << std::endl; - std::cout << "uint128_t accumulator, exact and " << boost::int128::bit_width(host_ascending) << " bits wide" << std::endl; + std::cout << "uint128 accumulator, exact and " << boost::int128::bit_width(host_ascending) << " bits wide" << std::endl; std::cout << " device, " << numPartials << " strided partials : " << device_total << std::endl; std::cout << " host, ascending order : " << host_ascending << std::endl; std::cout << " host, descending order : " << host_descending << std::endl; @@ -103,16 +103,16 @@ int main() // Widening to double is not a fix either: a single product already needs // more significand bits than double has. - const uint128_t exact_product {uint128_t{lhs[0]} * uint128_t{rhs[0]}}; + const uint128 exact_product {uint128{lhs[0]} * uint128{rhs[0]}}; const double rounded_product {static_cast(lhs[0]) * static_cast(rhs[0])}; - const uint128_t rounded_as_integer {rounded_product}; - const uint128_t rounding_error {rounded_as_integer > exact_product ? + const uint128 rounded_as_integer {rounded_product}; + const uint128 rounding_error {rounded_as_integer > exact_product ? rounded_as_integer - exact_product : exact_product - rounded_as_integer}; std::cout << std::endl; std::cout << "double, too few significand bits for even one product" << std::endl; - std::cout << " lhs[0] * rhs[0] as uint128_t : " << exact_product + std::cout << " lhs[0] * rhs[0] as uint128 : " << exact_product << " (" << boost::int128::bit_width(exact_product) << " bits)" << std::endl; std::cout << " lhs[0] * rhs[0] as double : " << std::setprecision(17) << rounded_product << std::endl; std::cout << " rounding error : " << rounding_error << std::endl; diff --git a/examples/to_string.cpp b/examples/to_string.cpp index 68bb4637..525d2750 100644 --- a/examples/to_string.cpp +++ b/examples/to_string.cpp @@ -11,46 +11,46 @@ int main() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; using boost::int128::to_string; using namespace boost::int128::literals; - std::cout << "=== to_string with uint128_t ===" << std::endl; + std::cout << "=== to_string with uint128 ===" << std::endl; // Compare against std::to_string for values that fit in 64 bits - constexpr uint128_t u_small {UINT64_C(1234567890)}; + constexpr uint128 u_small {UINT64_C(1234567890)}; const auto u_small_str {to_string(u_small)}; const auto u_small_std {std::to_string(std::uint64_t{1234567890})}; - std::cout << "uint128_t to_string(1234567890): " << u_small_str << std::endl; + std::cout << "uint128 to_string(1234567890): " << u_small_str << std::endl; std::cout << "std::to_string(uint64_t 1234567890): " << u_small_std << std::endl; std::cout << "Match: " << std::boolalpha << (u_small_str == u_small_std) << std::endl; - constexpr uint128_t u_max64 {UINT64_MAX}; + constexpr uint128 u_max64 {UINT64_MAX}; const auto u_max64_str {to_string(u_max64)}; const auto u_max64_std {std::to_string(UINT64_MAX)}; - std::cout << "\nuint128_t to_string(UINT64_MAX): " << u_max64_str << std::endl; + std::cout << "\nuint128 to_string(UINT64_MAX): " << u_max64_str << std::endl; std::cout << "std::to_string(UINT64_MAX): " << u_max64_std << std::endl; std::cout << "Match: " << (u_max64_str == u_max64_std) << std::endl; // Values beyond 64-bit range const auto large_unsigned {340282366920938463463374607431768211455_U128}; - std::cout << "\nuint128_t max: " << to_string(large_unsigned) << std::endl; + std::cout << "\nuint128 max: " << to_string(large_unsigned) << std::endl; - std::cout << "\n=== to_string with int128_t ===" << std::endl; + std::cout << "\n=== to_string with int128 ===" << std::endl; // Compare against std::to_string for values that fit in 64 bits - constexpr int128_t s_negative {-42}; + constexpr int128 s_negative {-42}; const auto s_neg_str {to_string(s_negative)}; const auto s_neg_std {std::to_string(std::int64_t{-42})}; - std::cout << "int128_t to_string(-42): " << s_neg_str << std::endl; + std::cout << "int128 to_string(-42): " << s_neg_str << std::endl; std::cout << "std::to_string(int64_t -42): " << s_neg_std << std::endl; std::cout << "Match: " << (s_neg_str == s_neg_std) << std::endl; - constexpr int128_t s_large {INT64_MAX}; + constexpr int128 s_large {INT64_MAX}; const auto s_large_str {to_string(s_large)}; const auto s_large_std {std::to_string(INT64_MAX)}; - std::cout << "\nint128_t to_string(INT64_MAX): " << s_large_str << std::endl; + std::cout << "\nint128 to_string(INT64_MAX): " << s_large_str << std::endl; std::cout << "std::to_string(INT64_MAX): " << s_large_std << std::endl; std::cout << "Match: " << (s_large_str == s_large_std) << std::endl; @@ -59,13 +59,13 @@ int main() // literal, so the positive magnitude 2^127 is read first and rejected as out of // range. A string literal keeps the sign with the digits, so it parses cleanly. const auto large_negative {"-170141183460469231731687303715884105728"_i128}; - std::cout << "\nint128_t min with string literal: " << to_string(large_negative) << std::endl; + std::cout << "\nint128 min with string literal: " << to_string(large_negative) << std::endl; const auto large_negative_c {BOOST_INT128_INT128_C(-170141183460469231731687303715884105728)}; - std::cout << "\nint128_t min with INT128_C macro: " << to_string(large_negative_c) << std::endl; + std::cout << "\nint128 min with INT128_C macro: " << to_string(large_negative_c) << std::endl; - const auto large_positive {std::numeric_limits::max()}; - std::cout << "int128_t max: " << to_string(large_positive) << std::endl; + const auto large_positive {std::numeric_limits::max()}; + std::cout << "int128 max: " << to_string(large_positive) << std::endl; return 0; } diff --git a/extra/int128.natvis b/extra/int128.natvis index 9d3ecbae..af480930 100644 --- a/extra/int128.natvis +++ b/extra/int128.natvis @@ -4,7 +4,7 @@ Distributed under the Boost Software License, Version 1.0. https://www.boost.org/LICENSE_1_0.txt - NATVIS visualizer for boost::int128::uint128_t and boost::int128::int128_t. + NATVIS visualizer for boost::int128::uint128 and boost::int128::int128. Place this file alongside your project or in: %USERPROFILE%\Documents\Visual Studio \Visualizers\ @@ -15,8 +15,8 @@ --> - - + + {low,d} 0x{high,nvohb}{low,nvohb} @@ -25,10 +25,10 @@ - - + {low,u} -{~low + 1,u} 0x{high,nvohb}{low,nvohb} diff --git a/extra/int128_printer_gdb.py b/extra/int128_printer_gdb.py index 49b5e923..1c07183d 100644 --- a/extra/int128_printer_gdb.py +++ b/extra/int128_printer_gdb.py @@ -3,10 +3,10 @@ # https://www.boost.org/LICENSE_1_0.txt # # Struct definitions: -# struct uint128_t { std::uint64_t low; std::uint64_t high; }; -# struct int128_t { std::uint64_t low; std::uint64_t high; }; +# struct uint128 { std::uint64_t low; std::uint64_t high; }; +# struct int128 { std::uint64_t low; std::uint64_t high; }; # -# Both words of both types are unsigned; int128_t reads the pair as two's +# Both words of both types are unsigned; int128 reads the pair as two's # complement. On big endian machines the word order is reversed. # # Usage: source int128_printer.py @@ -16,7 +16,7 @@ import re class Uint128Printer: - """Pretty printer for uint128_t type""" + """Pretty printer for uint128 type""" def __init__(self, val): self.val = val @@ -29,7 +29,7 @@ def to_string(self): value = (high << 64) | low return f"{value:,}" except Exception as e: - return f"" + return f"" def children(self): yield "low", self.val["low"] @@ -40,7 +40,7 @@ def display_hint(self): class Int128Printer: - """Pretty printer for int128_t type""" + """Pretty printer for int128 type""" def __init__(self, val): self.val = val @@ -58,7 +58,7 @@ def to_string(self): value = (high << 64) + low return f"{value:,}" except Exception as e: - return f"" + return f"" def children(self): yield "low", self.val["low"] @@ -68,7 +68,7 @@ def display_hint(self): return None -def lookup_int128_type(val): +def lookup_int128ype(val): """ Lookup function to detect if a type should use our pretty printers. Returns the appropriate printer or None. @@ -87,12 +87,12 @@ def lookup_int128_type(val): type_name = str(type_obj) - # Patterns to match uint128_t and int128_t types + # Patterns to match uint128 and int128 types uint128_pattern = re.compile( - r"^(boost::int128::uint128_t|(\w+::)*uint128_t|uint128_t)$" + r"^(boost::int128::uint128|(\w+::)*uint128|uint128)$" ) int128_pattern = re.compile( - r"^(boost::int128::int128_t|(\w+::)*int128_t|int128_t)$" + r"^(boost::int128::int128|(\w+::)*int128|int128)$" ) if uint128_pattern.match(type_name): @@ -108,9 +108,9 @@ def register_int128_printers(objfile=None): if objfile is None: objfile = gdb - objfile.pretty_printers.append(lookup_int128_type) + objfile.pretty_printers.append(lookup_int128ype) # Auto-register when the script is sourced register_int128_printers() -print("int128_t and uint128_t pretty printers loaded successfully") +print("int128 and uint128 pretty printers loaded successfully") diff --git a/extra/int128_printer_lldb.py b/extra/int128_printer_lldb.py index a3f9a824..86fd1241 100644 --- a/extra/int128_printer_lldb.py +++ b/extra/int128_printer_lldb.py @@ -3,17 +3,17 @@ # https://www.boost.org/LICENSE_1_0.txt # # Struct definitions: -# struct uint128_t { std::uint64_t low; std::uint64_t high; }; -# struct int128_t { std::uint64_t low; std::uint64_t high; }; +# struct uint128 { std::uint64_t low; std::uint64_t high; }; +# struct int128 { std::uint64_t low; std::uint64_t high; }; # -# Both words of both types are unsigned; int128_t reads the pair as two's +# Both words of both types are unsigned; int128 reads the pair as two's # complement. On big endian machines the word order is reversed. import lldb def uint128_summary(valobj, internal_dict): """ - Custom summary for uint128_t type (unsigned). + Custom summary for uint128 type (unsigned). Displays as decimal (base 10). """ try: @@ -24,11 +24,11 @@ def uint128_summary(valobj, internal_dict): value = (high << 64) | low return f"{value:,}" except Exception as e: - return f"" + return f"" def int128_summary(valobj, internal_dict): """ - Custom summary for int128_t type (signed). + Custom summary for int128 type (signed). Displays as decimal (base 10). """ try: @@ -44,11 +44,11 @@ def int128_summary(valobj, internal_dict): return f"{value:,}" except Exception as e: - return f"" + return f"" def __lldb_init_module(debugger, internal_dict): - uint128_pattern = r"^(const )?(boost::int128::uint128_t|(\w+::)*uint128_t)( &| \*)?$" - int128_pattern = r"^(const )?(boost::int128::int128_t|(\w+::)*int128_t)( &| \*)?$" + uint128_pattern = r"^(const )?(boost::int128::uint128|(\w+::)*uint128)( &| \*)?$" + int128_pattern = r"^(const )?(boost::int128::int128|(\w+::)*int128)( &| \*)?$" debugger.HandleCommand( f'type summary add -x "{uint128_pattern}" -e -F int128_printer_lldb.uint128_summary' @@ -64,7 +64,7 @@ def __lldb_init_module(debugger, internal_dict): f'type synthetic add -x "{int128_pattern}" -l int128_printer_lldb.Int128SyntheticProvider' ) - print("int128_t and uint128_t pretty printers loaded successfully") + print("int128 and uint128 pretty printers loaded successfully") class Uint128SyntheticProvider: def __init__(self, valobj, internal_dict): diff --git a/extra/int128_printer_msvc.cpp b/extra/int128_printer_msvc.cpp index daf0c316..e482c9c6 100644 --- a/extra/int128_printer_msvc.cpp +++ b/extra/int128_printer_msvc.cpp @@ -171,22 +171,22 @@ extern "C" __declspec(dllexport) HRESULT __stdcall formatter_s128_hex(DWORD cons __declspec(dllexport) HRESULT __stdcall formatter_u128_dec(DWORD const address, DEBUGHELPER_t* const helper, int const base, BOOL const unicode, char* const result, size_t const maximum, DWORD const reserved) { - return formatter_128(address, helper, base, unicode, result, maximum, reserved); + return formatter_128(address, helper, base, unicode, result, maximum, reserved); } __declspec(dllexport) HRESULT __stdcall formatter_u128_hex(DWORD const address, DEBUGHELPER_t* const helper, int const base, BOOL const unicode, char* const result, size_t const maximum, DWORD const reserved) { - return formatter_128(address, helper, base, unicode, result, maximum, reserved); + return formatter_128(address, helper, base, unicode, result, maximum, reserved); } __declspec(dllexport) HRESULT __stdcall formatter_s128_dec(DWORD const address, DEBUGHELPER_t* const helper, int const base, BOOL const unicode, char* const result, size_t const maximum, DWORD const reserved) { - return formatter_128(address, helper, base, unicode, result, maximum, reserved); + return formatter_128(address, helper, base, unicode, result, maximum, reserved); } __declspec(dllexport) HRESULT __stdcall formatter_s128_hex(DWORD const address, DEBUGHELPER_t* const helper, int const base, BOOL const unicode, char* const result, size_t const maximum, DWORD const reserved) { - return formatter_128(address, helper, base, unicode, result, maximum, reserved); + return formatter_128(address, helper, base, unicode, result, maximum, reserved); } BOOL APIENTRY DllMain(HMODULE const hmodule, DWORD const reason, LPVOID const reserved) diff --git a/extra/int128_printer_msvc.natvis b/extra/int128_printer_msvc.natvis index 2fe32f4a..a0286842 100644 --- a/extra/int128_printer_msvc.natvis +++ b/extra/int128_printer_msvc.natvis @@ -1,11 +1,11 @@ - + - + diff --git a/extra/single_include/boost/int128.hpp b/extra/single_include/boost/int128.hpp index d966e8e3..fe7c1915 100644 --- a/extra/single_include/boost/int128.hpp +++ b/extra/single_include/boost/int128.hpp @@ -40,13 +40,13 @@ #define BOOST_INT128_DETAIL_CONFIG_HPP // A handful of detail-namespace entities are exercised directly by the module -// test suite. BOOST_INT128_TEST_EXPORT exports them only when the module is built +// test suite. BOOST_int128EST_EXPORT exports them only when the module is built // for testing (BOOST_INT128_EXPORT_TESTING), so the normal module API stays limited // to the public interface. It expands to nothing in ordinary (header) builds. #if defined(BOOST_INT128_BUILD_MODULE) && defined(BOOST_INT128_EXPORT_TESTING) -# define BOOST_INT128_TEST_EXPORT export +# define BOOST_int128EST_EXPORT export #else -# define BOOST_INT128_TEST_EXPORT +# define BOOST_int128EST_EXPORT #endif // The SYCL device target (spir64) has no native 128-bit integer, so force the portable @@ -77,13 +77,13 @@ namespace detail { // Avoids pedantic warnings #ifdef __GNUC__ -BOOST_INT128_TEST_EXPORT __extension__ using builtin_i128 = __int128 ; -BOOST_INT128_TEST_EXPORT __extension__ using builtin_u128 = unsigned __int128 ; +BOOST_int128EST_EXPORT __extension__ using builtin_i128 = __int128 ; +BOOST_int128EST_EXPORT __extension__ using builtin_u128 = unsigned __int128 ; #else -BOOST_INT128_TEST_EXPORT using builtin_i128 = __int128 ; -BOOST_INT128_TEST_EXPORT using builtin_u128 = unsigned __int128; +BOOST_int128EST_EXPORT using builtin_i128 = __int128 ; +BOOST_int128EST_EXPORT using builtin_u128 = unsigned __int128; #endif @@ -114,8 +114,8 @@ namespace detail { // See the note above: skip the re-declaration in a module consumer. #if !defined(BOOST_INT128_BUILD_MODULE) || defined(BOOST_INT128_INTERFACE_UNIT) -BOOST_INT128_TEST_EXPORT using builtin_i128 = std::_Signed128; -BOOST_INT128_TEST_EXPORT using builtin_u128 = std::_Unsigned128; +BOOST_int128EST_EXPORT using builtin_i128 = std::_Signed128; +BOOST_int128EST_EXPORT using builtin_u128 = std::_Unsigned128; #endif @@ -327,22 +327,22 @@ BOOST_INT128_TEST_EXPORT using builtin_u128 = std::_Unsigned128; #ifdef BOOST_INT128_DISABLE_EXCEPTIONS -# define BOOST_INT128_THROW_EXCEPTION(expr) +# define BOOST_int128HROW_EXCEPTION(expr) #else # ifdef _MSC_VER # ifdef _CPPUNWIND -# define BOOST_INT128_THROW_EXCEPTION(expr) throw expr; +# define BOOST_int128HROW_EXCEPTION(expr) throw expr; # else -# define BOOST_INT128_THROW_EXCEPTION(expr) +# define BOOST_int128HROW_EXCEPTION(expr) # define BOOST_INT128_DISABLE_EXCEPTIONS # endif # else # ifdef __EXCEPTIONS -# define BOOST_INT128_THROW_EXCEPTION(expr) throw expr; +# define BOOST_int128HROW_EXCEPTION(expr) throw expr; # else -# define BOOST_INT128_THROW_EXCEPTION(expr) +# define BOOST_int128HROW_EXCEPTION(expr) # define BOOST_INT128_DISABLE_EXCEPTIONS # endif #endif @@ -384,8 +384,8 @@ BOOST_INT128_TEST_EXPORT using builtin_u128 = std::_Unsigned128; namespace boost { namespace int128 { -BOOST_INT128_EXPORT struct uint128_t; -BOOST_INT128_EXPORT struct int128_t; +BOOST_INT128_EXPORT struct uint128; +BOOST_INT128_EXPORT struct int128; } // namespace int128 } // namespace boost @@ -551,7 +551,7 @@ namespace detail { // The whole impl namespace is exported when building the module for testing so // the low-level bit helpers can be exercised directly; it is an ordinary // namespace in every other build. -BOOST_INT128_TEST_EXPORT namespace impl { +BOOST_int128EST_EXPORT namespace impl { #if !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) @@ -785,7 +785,7 @@ struct ctor_high_word }; template <> -struct ctor_high_word +struct ctor_high_word { using type = std::int64_t; }; @@ -1557,7 +1557,7 @@ struct #if (defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128)) && !defined(_M_IX86) alignas(alignof(detail::builtin_i128)) #endif -int128_t +int128 { #if BOOST_INT128_ENDIAN_LITTLE_BYTE std::uint64_t low {}; @@ -1579,47 +1579,47 @@ int128_t #endif // Defaulted basic construction - constexpr int128_t() noexcept = default; - constexpr int128_t(const int128_t&) noexcept = default; - constexpr int128_t(int128_t&&) noexcept = default; - constexpr int128_t& operator=(const int128_t&) noexcept = default; - constexpr int128_t& operator=(int128_t&&) noexcept = default; + constexpr int128() noexcept = default; + constexpr int128(const int128&) noexcept = default; + constexpr int128(int128&&) noexcept = default; + constexpr int128& operator=(const int128&) noexcept = default; + constexpr int128& operator=(int128&&) noexcept = default; // Requires a conversion file to be implemented - BOOST_INT128_HOST_DEVICE constexpr int128_t(const uint128_t& v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(const uint128& v) noexcept; // Construct from integral types #if BOOST_INT128_ENDIAN_LITTLE_BYTE - BOOST_INT128_HOST_DEVICE constexpr int128_t(const std::int64_t hi, const std::uint64_t lo) noexcept : low{lo}, high{static_cast(hi)} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const std::int64_t hi, const std::uint64_t lo) noexcept : low{lo}, high{static_cast(hi)} {} template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const SignedInteger v) noexcept : low {static_cast(v)}, high {v < 0 ? ~UINT64_C(0) : UINT64_C(0)} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const SignedInteger v) noexcept : low {static_cast(v)}, high {v < 0 ? ~UINT64_C(0) : UINT64_C(0)} {} template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const UnsignedInteger v) noexcept : low {static_cast(v)}, high {} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const UnsignedInteger v) noexcept : low {static_cast(v)}, high {} {} #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_i128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_u128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128(const detail::builtin_i128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128(const detail::builtin_u128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} #endif // BOOST_INT128_HAS_INT128 #else // Big endian - BOOST_INT128_HOST_DEVICE constexpr int128_t(const std::int64_t hi, const std::uint64_t lo) noexcept : high{static_cast(hi)}, low{lo} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const std::int64_t hi, const std::uint64_t lo) noexcept : high{static_cast(hi)}, low{lo} {} template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const SignedInteger v) noexcept : high{v < 0 ? ~UINT64_C(0) : UINT64_C(0)}, low{static_cast(v)} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const SignedInteger v) noexcept : high{v < 0 ? ~UINT64_C(0) : UINT64_C(0)}, low{static_cast(v)} {} template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const UnsignedInteger v) noexcept : high {}, low {static_cast(v)} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const UnsignedInteger v) noexcept : high {}, low {static_cast(v)} {} #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_i128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_u128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128(const detail::builtin_i128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128(const detail::builtin_u128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} #endif // BOOST_INT128_HAS_INT128 @@ -1627,7 +1627,7 @@ int128_t // Construct from floating-point types template - BOOST_INT128_HOST_DEVICE constexpr int128_t(Float f) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(Float f) noexcept; // The high word read as a signed value. // Every operation whose meaning depends on the sign of the value goes through @@ -1665,150 +1665,150 @@ int128_t // Compound Or template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator|=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator|=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator|=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator|=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator|=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator|=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound And template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator&=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator&=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator&=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator&=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator&=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator&=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound XOR template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator^=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator^=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator^=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator^=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator^=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator^=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Left Shift template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator<<=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator<<=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator<<=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator<<=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator<<=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator<<=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Right Shift template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator>>=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator>>=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator>>=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator>>=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator>>=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator>>=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Prefix and postfix increment - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator++() noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t operator++(int) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator++() noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128 operator++(int) noexcept; // Prefix and postfix decrment - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator--() noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t operator--(int) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator--() noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128 operator--(int) noexcept; // Compound Addition template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator+=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator+=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator+=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator+=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator+=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator+=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Subtraction template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator-=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator-=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator-=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator-=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator-=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator-=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Multiplication template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator*=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator*=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator*=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator*=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator*=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator*=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Division template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator/=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator/=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator/=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator/=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator/=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator/=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Modulo template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator%=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator%=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator%=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator%=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator%=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator%=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 }; namespace detail { -// Builds an int128_t from the raw two's complement words +// Builds an int128 from the raw two's complement words // Enables vectorization -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t from_bits(const std::uint64_t hi, const std::uint64_t lo) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 from_bits(const std::uint64_t hi, const std::uint64_t lo) noexcept { - int128_t result {}; + int128 result {}; result.high = hi; result.low = lo; return result; @@ -1820,7 +1820,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t from_bits( // Absolute Value function //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t abs(int128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 abs(int128 value) noexcept { if (value.signed_high() < 0) { @@ -1840,7 +1840,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t abs(int128_t val // converts the unsigned magnitude and applies the sign; see detail/float_conversion.hpp // for why the raw words can not be composed directly for negative values -BOOST_INT128_HOST_DEVICE constexpr int128_t::operator float() const noexcept +BOOST_INT128_HOST_DEVICE constexpr int128::operator float() const noexcept { #if defined(BOOST_INT128_HAS_INT128) && !defined(BOOST_INT128_HAS_GPU_SUPPORT) @@ -1853,7 +1853,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t::operator float() const noexcept #endif } -BOOST_INT128_HOST_DEVICE constexpr int128_t::operator double() const noexcept +BOOST_INT128_HOST_DEVICE constexpr int128::operator double() const noexcept { #if defined(BOOST_INT128_HAS_INT128) && !defined(BOOST_INT128_HAS_GPU_SUPPORT) @@ -1868,7 +1868,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t::operator double() const noexcept #if !defined(BOOST_INT128_HAS_GPU_SUPPORT) -constexpr int128_t::operator long double() const noexcept +constexpr int128::operator long double() const noexcept { #if defined(BOOST_INT128_HAS_INT128) @@ -1892,7 +1892,7 @@ constexpr int128_t::operator long double() const noexcept // f >= 2^127 -> INT128_MAX; // f < -2^127 -> INT128_MIN. template -BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(Float f) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128::int128(Float f) noexcept { constexpr Float two_32 {static_cast(UINT64_C(1) << 32)}; constexpr Float two_64 {two_32 * two_32}; @@ -1943,29 +1943,29 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(Float f) noexcept // Unary Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 value) noexcept { return value; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 value) noexcept { // Spelled with the constructor rather than from_bits: clang folds the low word // of the low == 0 arm away here, and loses that if the members are written. - return (value.low == 0) ? int128_t{static_cast(UINT64_C(0) - value.high), 0} : - int128_t{static_cast(~value.high), ~value.low + 1}; + return (value.low == 0) ? int128{static_cast(UINT64_C(0) - value.high), 0} : + int128{static_cast(~value.high), ~value.low + 1}; } //===================================== // Equality Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const bool rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128 lhs, const bool rhs) noexcept { return lhs.high == 0 && lhs.low == static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const bool lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const bool lhs, const int128 rhs) noexcept { return rhs.high == 0 && rhs.low == static_cast(lhs); } @@ -1980,7 +1980,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const boo # pragma GCC diagnostic ignored "-Wsign-compare" #endif -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128 lhs, const int128 rhs) noexcept { // x64 and ARM64 like the values in opposite directions @@ -1996,39 +1996,39 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128 lhs, const SignedInteger rhs) noexcept { return lhs.high == (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) && lhs.low == static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const SignedInteger lhs, const int128 rhs) noexcept { return rhs.high == (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) && rhs.low == static_cast(lhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high == 0 && lhs.low == static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.high == 0 && rhs.low == static_cast(lhs); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs == static_cast(rhs); + return lhs == static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) == rhs; + return static_cast(lhs) == rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -2037,7 +2037,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Inequality Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128 lhs, const int128 rhs) noexcept { // x64 and ARM64 like the values in opposite directions @@ -2069,50 +2069,50 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const bool rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128 lhs, const bool rhs) noexcept { return lhs.high != 0 || lhs.low != static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const bool lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const bool lhs, const int128 rhs) noexcept { return rhs.high != 0 || rhs.low != static_cast(lhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128 lhs, const SignedInteger rhs) noexcept { return lhs.high != (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) || lhs.low != static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const SignedInteger lhs, const int128 rhs) noexcept { return rhs.high != (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) || rhs.low != static_cast(lhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high != 0 || lhs.low != static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.high != 0 || rhs.low != static_cast(lhs); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs != static_cast(rhs); + return lhs != static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) != rhs; + return static_cast(lhs) != rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -2121,7 +2121,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Less than Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128 lhs, const int128 rhs) noexcept { // On ARM macs only with the clang compiler is casting to __int128 uniformly better (and seemingly cost free) #if defined(__aarch64__) && defined(__APPLE__) && defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -2153,23 +2153,23 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int1 } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.signed_high() < 0 || (lhs.high == 0 && lhs.low < static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.signed_high() > 0 || (rhs.high == 0 && static_cast(lhs) < rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128 lhs, const SignedInteger rhs) noexcept { if (lhs.signed_high() < 0) { - return rhs >= 0 ? true : lhs < static_cast(rhs); + return rhs >= 0 ? true : lhs < static_cast(rhs); } if (lhs.signed_high() > 0 || rhs < 0) @@ -2181,11 +2181,11 @@ BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const Sign } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const int128 rhs) noexcept { if (rhs.signed_high() < 0) { - return lhs >= 0 ? false : static_cast(lhs) < rhs; + return lhs >= 0 ? false : static_cast(lhs) < rhs; } // rhs is positive @@ -2199,14 +2199,14 @@ BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs < static_cast(rhs); + return lhs < static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) < rhs; + return static_cast(lhs) < rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -2215,7 +2215,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Greater than Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128 lhs, const int128 rhs) noexcept { // On ARM macs only with the clang compiler is casting to __int128 uniformly better (and seemingly cost free) #if defined(__aarch64__) && defined(__APPLE__) && defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -2247,39 +2247,39 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int1 } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128 lhs, const SignedInteger rhs) noexcept { return !(lhs < rhs) && !(lhs == rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const SignedInteger lhs, const int128 rhs) noexcept { return !(lhs < rhs) && !(lhs == rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.signed_high() > 0 || (lhs.high == 0 && lhs.low > static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.signed_high() < 0 || (rhs.high == 0 && static_cast(lhs) > rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs > static_cast(rhs); + return lhs > static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) > rhs; + return static_cast(lhs) > rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -2288,7 +2288,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Less Equal Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128 lhs, const int128 rhs) noexcept { // On ARM macs only with the clang compiler is casting to __int128 uniformly better (and seemingly cost free) #if defined(__aarch64__) && defined(__APPLE__) && defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -2320,39 +2320,39 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128 lhs, const SignedInteger rhs) noexcept { return !(lhs > rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const SignedInteger lhs, const int128 rhs) noexcept { return !(lhs > rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.signed_high() < 0 || (lhs.high == 0 && lhs.low <= static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.signed_high() > 0 || (rhs.high == 0 && static_cast(lhs) <= rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs <= static_cast(rhs); + return lhs <= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) <= rhs; + return static_cast(lhs) <= rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -2361,7 +2361,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Greater Equal Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128 lhs, const int128 rhs) noexcept { // On ARM macs only with the clang compiler is casting to __int128 uniformly better (and seemingly cost free) #if defined(__aarch64__) && defined(__APPLE__) && defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -2393,39 +2393,39 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128 lhs, const SignedInteger rhs) noexcept { return !(lhs < rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const SignedInteger lhs, const int128 rhs) noexcept { return !(lhs < rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.signed_high() > 0 || (lhs.high == 0 && lhs.low >= static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.signed_high() < 0 || (rhs.high == 0 && static_cast(lhs) >= rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs >= static_cast(rhs); + return lhs >= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) >= rhs; + return static_cast(lhs) >= rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -2436,7 +2436,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool #ifdef BOOST_INT128_HAS_SPACESHIP_OPERATOR -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 lhs, const int128 rhs) noexcept { if (lhs < rhs) { @@ -2453,7 +2453,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering oper } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 lhs, const SignedInteger rhs) noexcept { if (lhs < rhs) { @@ -2470,7 +2470,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const SignedInteger lhs, const int128 rhs) noexcept { if (lhs < rhs) { @@ -2487,7 +2487,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Signed } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 lhs, const UnsignedInteger rhs) noexcept { if (lhs < rhs) { @@ -2504,7 +2504,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const UnsignedInteger lhs, const int128 rhs) noexcept { if (lhs < rhs) { @@ -2526,7 +2526,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Unsign // Not Operator //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator~(const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator~(const int128 rhs) noexcept { return detail::from_bits(~rhs.high, ~rhs.low); } @@ -2535,45 +2535,45 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator~(const // Or Operator //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const int128 lhs, const int128 rhs) noexcept { return detail::from_bits(lhs.high | rhs.high, lhs.low | rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const int128 lhs, const SignedInteger rhs) noexcept { return detail::from_bits(lhs.high | (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low | static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const SignedInteger lhs, const int128 rhs) noexcept { return detail::from_bits(rhs.high | (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), static_cast(lhs) | rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const int128 lhs, const UnsignedInteger rhs) noexcept { return detail::from_bits(lhs.high, lhs.low | static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const UnsignedInteger lhs, const int128 rhs) noexcept { return detail::from_bits(rhs.high, static_cast(lhs) | rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator|(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator|(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs | static_cast(rhs); + return lhs | static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator|(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator|(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) | rhs; + return static_cast(lhs) | rhs; } @@ -2584,13 +2584,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int1 //===================================== template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator|=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator|=(const Integer rhs) noexcept { - *this = static_cast(*this | rhs); + *this = static_cast(*this | rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator|=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator|=(const int128 rhs) noexcept { *this = *this | rhs; return *this; @@ -2599,9 +2599,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator|=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator|=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator|=(const Integer rhs) noexcept { - *this = static_cast(*this | rhs); + *this = static_cast(*this | rhs); return *this; } @@ -2611,45 +2611,45 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator|=(const Integer rhs // And Operator //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const int128 lhs, const int128 rhs) noexcept { return detail::from_bits(lhs.high & rhs.high, lhs.low & rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const int128 lhs, const SignedInteger rhs) noexcept { return detail::from_bits(lhs.high & (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low & static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const SignedInteger lhs, const int128 rhs) noexcept { return detail::from_bits(rhs.high & (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), static_cast(lhs) & rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const int128 lhs, const UnsignedInteger rhs) noexcept { return {0, lhs.low & static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const UnsignedInteger lhs, const int128 rhs) noexcept { return {0, static_cast(lhs) & rhs.low}; } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator&(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator&(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs & static_cast(rhs); + return lhs & static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator&(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator&(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) & rhs; + return static_cast(lhs) & rhs; } @@ -2658,9 +2658,9 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int1 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator&=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator&=(const Integer rhs) noexcept { - *this = static_cast(*this & rhs); + *this = static_cast(*this & rhs); return *this; } @@ -2671,13 +2671,13 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator&=(const Integer rhs //===================================== template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator&=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator&=(const Integer rhs) noexcept { - *this = static_cast(*this & rhs); + *this = static_cast(*this & rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator&=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator&=(const int128 rhs) noexcept { *this = *this & rhs; return *this; @@ -2687,45 +2687,45 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator&=(const int128_t // XOR Operator //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const int128 lhs, const int128 rhs) noexcept { return detail::from_bits(lhs.high ^ rhs.high, lhs.low ^ rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const int128 lhs, const SignedInteger rhs) noexcept { return detail::from_bits(lhs.high ^ (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low ^ static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const SignedInteger lhs, const int128 rhs) noexcept { return detail::from_bits(rhs.high ^ (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), static_cast(lhs) ^ rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const int128 lhs, const UnsignedInteger rhs) noexcept { return detail::from_bits(lhs.high, lhs.low ^ static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const UnsignedInteger lhs, const int128 rhs) noexcept { return detail::from_bits(rhs.high, static_cast(lhs) ^ rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator^(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator^(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs ^ static_cast(rhs); + return lhs ^ static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator^(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator^(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) ^ rhs; + return static_cast(lhs) ^ rhs; } @@ -2736,13 +2736,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int1 //===================================== template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator^=(Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator^=(Integer rhs) noexcept { - *this = static_cast(*this ^ rhs); + *this = static_cast(*this ^ rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator^=(int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator^=(int128 rhs) noexcept { *this = *this ^ rhs; return *this; @@ -2751,9 +2751,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator^=(int128_t rhs) #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator^=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator^=(const Integer rhs) noexcept { - *this = static_cast(*this ^ rhs); + *this = static_cast(*this ^ rhs); return *this; } @@ -2766,7 +2766,7 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator^=(const Integer rhs namespace detail { template -BOOST_INT128_HOST_DEVICE constexpr int128_t default_ls_impl(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 default_ls_impl(const int128 lhs, const Integer rhs) noexcept { static_assert(std::is_integral::value, "Only builtin types allowed"); @@ -2796,7 +2796,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t default_ls_impl(const int128_t lhs, } template -BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE int128 intrinsic_ls_impl(const int128 lhs, const Integer rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators; delegate @@ -2815,8 +2815,8 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const In std::memcpy(&value, &lhs, sizeof(builtin_u128)); const auto res {value << rhs}; - int128_t return_value; - std::memcpy(&return_value, &res, sizeof(int128_t)); + int128 return_value; + std::memcpy(&return_value, &res, sizeof(int128)); return return_value; #if defined(__GNUC__) && __GNUC__ >= 8 @@ -2825,7 +2825,7 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const In # else - return int128_t{static_cast(lhs) << rhs}; + return int128{static_cast(lhs) << rhs}; # endif @@ -2837,7 +2837,7 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const In } else { - int128_t res; + int128 res; res.high = __shiftleft128(lhs.low, lhs.high, static_cast(rhs)); res.low = lhs.low << rhs; @@ -2872,7 +2872,7 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const In } // namespace detail BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator<<(const int128 lhs, const Integer rhs) noexcept { #ifndef BOOST_INT128_NO_CONSTEVAL_DETECTION @@ -2892,7 +2892,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const #endif } -BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator<<(const int128 lhs, const int128 rhs) noexcept { // Out-of-range counts (negative, >= 128, or with the high word set) are // undefined, matching the built-in operators; forward to the scalar overload. @@ -2901,13 +2901,13 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs << static_cast(rhs.low); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs << static_cast(rhs.low); @@ -2916,14 +2916,14 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR deta #endif BOOST_INT128_EXPORT template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) << rhs.low; } BOOST_INT128_EXPORT template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned operator<<(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr unsigned operator<<(const UnsignedInteger lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) << rhs.low; @@ -2935,13 +2935,13 @@ BOOST_INT128_HOST_DEVICE constexpr unsigned operator<<(const UnsignedInteger lhs #endif // _MSC_VER template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator<<=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator<<=(const Integer rhs) noexcept { - *this = static_cast(*this << rhs); + *this = static_cast(*this << rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator<<=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator<<=(const int128 rhs) noexcept { *this = *this << rhs; return *this; @@ -2950,9 +2950,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator<<=(const int128_ #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator<<=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator<<=(const Integer rhs) noexcept { - *this = static_cast(*this << rhs); + *this = static_cast(*this << rhs); return *this; } @@ -2969,7 +2969,7 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator<<=(const Integer rh namespace detail { template -BOOST_INT128_HOST_DEVICE constexpr int128_t default_rs_impl(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 default_rs_impl(const int128 lhs, const Integer rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators. In a @@ -2994,7 +2994,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t default_rs_impl(const int128_t lhs, } template -BOOST_INT128_HOST_DEVICE int128_t intrinsic_rs_impl(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE int128 intrinsic_rs_impl(const int128 lhs, const Integer rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators; delegate @@ -3012,8 +3012,8 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_rs_impl(const int128_t lhs, const In std::memcpy(&value, &lhs, sizeof(builtin_i128)); const auto res {value >> rhs}; - int128_t return_value; - std::memcpy(&return_value, &res, sizeof(int128_t)); + int128 return_value; + std::memcpy(&return_value, &res, sizeof(int128)); return return_value; #if defined(__GNUC__) && __GNUC__ >= 8 @@ -3035,7 +3035,7 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_rs_impl(const int128_t lhs, const In } else { - int128_t res; + int128 res; res.low = __shiftright128(lhs.low, lhs.high, static_cast(rhs)); res.high = static_cast(lhs.signed_high() >> rhs); @@ -3068,7 +3068,7 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_rs_impl(const int128_t lhs, const In } // namespace detail BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator>>(const int128 lhs, const Integer rhs) noexcept { #ifndef BOOST_INT128_NO_CONSTEVAL_DETECTION @@ -3088,7 +3088,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const int128_t lhs, const #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator>>(const int128 lhs, const int128 rhs) noexcept { // Out-of-range counts (negative, >= 128, or with the high word set) are // undefined, matching the built-in operators; forward to the scalar overload. @@ -3097,13 +3097,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs >> static_cast(rhs.low); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs >> static_cast(rhs.low); @@ -3112,14 +3112,14 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR deta #endif BOOST_INT128_EXPORT template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) >> rhs.low; } BOOST_INT128_EXPORT template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned operator>>(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr unsigned operator>>(const UnsignedInteger lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) >> rhs.low; @@ -3131,13 +3131,13 @@ BOOST_INT128_HOST_DEVICE constexpr unsigned operator>>(const UnsignedInteger lhs #endif // _MSC_VER template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator>>=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator>>=(const Integer rhs) noexcept { - *this = static_cast(*this >> rhs); + *this = static_cast(*this >> rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator>>=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator>>=(const int128 rhs) noexcept { *this = *this >> rhs; return *this; @@ -3146,9 +3146,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator>>=(const int128_ #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator>>=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator>>=(const Integer rhs) noexcept { - *this = static_cast(*this >> rhs); + *this = static_cast(*this >> rhs); return *this; } @@ -3162,7 +3162,7 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator>>=(const Integer rh // Increment Operators //===================================== -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator++() noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator++() noexcept { if (++low == UINT64_C(0)) { @@ -3172,7 +3172,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator++() noexcept return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t int128_t::operator++(int) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 int128::operator++(int) noexcept { const auto temp {*this}; ++(*this); @@ -3183,7 +3183,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t int128_t::operator++(int) noexcept // Decrement Operators //===================================== -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator--() noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator--() noexcept { if (low-- == UINT64_C(0)) { @@ -3193,7 +3193,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator--() noexcept return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t int128_t::operator--(int) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 int128::operator--(int) noexcept { const auto temp {*this}; --(*this); @@ -3206,7 +3206,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t int128_t::operator--(int) noexcept namespace detail { -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t library_add(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 library_add(const int128 lhs, const int128 rhs) noexcept { const auto new_low {lhs.low + rhs.low}; const auto new_high {lhs.high + @@ -3216,12 +3216,12 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t library_ad return detail::from_bits(new_high, new_low); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_add(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_add(const int128 lhs, const int128 rhs) noexcept { #if (defined(__x86_64__) || (defined(__aarch64__) && !defined(__APPLE__))) && !defined(_WIN32) && defined(BOOST_INT128_HAS_INT128) // Compute in the unsigned domain so that overflow wraps modulo 2^128 - return int128_t{static_cast(lhs) + static_cast(rhs)}; + return int128{static_cast(lhs) + static_cast(rhs)}; #elif defined(BOOST_INT128_HAS_BUILTIN_ADD_OVERFLOW) @@ -3240,7 +3240,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_ad } else { - int128_t result {}; + int128 result {}; const auto carry {BOOST_INT128_ADD_CARRY(0, lhs.low, rhs.low, &result.low)}; BOOST_INT128_ADD_CARRY(carry, lhs.high, rhs.high, &result.high); @@ -3255,7 +3255,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_ad } template -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_add(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_add(const int128 lhs, const Integer rhs) noexcept { const auto new_low {lhs.low + rhs}; const auto new_high {lhs.high + static_cast(new_low < lhs.low)}; @@ -3263,7 +3263,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_ad return detail::from_bits(new_high, new_low); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t library_sub(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 library_sub(const int128 lhs, const int128 rhs) noexcept { const auto new_low {lhs.low - rhs.low}; const auto new_high {lhs.high - rhs.high - static_cast(lhs.low < rhs.low)}; @@ -3271,7 +3271,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t library_su return detail::from_bits(new_high, new_low); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_sub(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_sub(const int128 lhs, const int128 rhs) noexcept { #if defined(BOOST_INT128_HAS_BUILTIN_SUB_OVERFLOW) && (!defined(__aarch64__) || defined(__APPLE__) || !defined(BOOST_INT128_HAS_INT128)) && !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) @@ -3284,7 +3284,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_su #elif defined(__aarch64__) && !defined(__APPLE__) // Unsigned wrap for consistent two's-complement semantics - return int128_t{static_cast(lhs) - static_cast(rhs)}; + return int128{static_cast(lhs) - static_cast(rhs)}; #elif defined(_M_AMD64) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -3294,7 +3294,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_su } else { - int128_t result {}; + int128 result {}; const auto borrow {BOOST_INT128_SUB_BORROW(0, lhs.low, rhs.low, &result.low)}; BOOST_INT128_SUB_BORROW(borrow, lhs.high, rhs.high, &result.high); @@ -3309,7 +3309,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_su } template -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_sub(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_sub(const int128 lhs, const Integer rhs) noexcept { const auto new_low {lhs.low - rhs}; const auto new_high {lhs.high - static_cast(new_low > lhs.low)}; @@ -3322,14 +3322,14 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_su // doing addition via subtraction is >10% faster in the benchmarks #if defined(__s390__) || defined(__s390x__) -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 lhs, const int128 rhs) noexcept { return detail::default_sub(lhs, -rhs); } #else -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 lhs, const int128 rhs) noexcept { return detail::default_add(lhs, rhs); } @@ -3337,13 +3337,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 lhs, const UnsignedInteger rhs) noexcept { return detail::default_add(lhs, rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const UnsignedInteger lhs, const int128 rhs) noexcept { return detail::default_add(rhs, lhs); } @@ -3354,7 +3354,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const UnsignedInteger lhs, #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 lhs, const SignedInteger rhs) noexcept { // Negate in the unsigned domain so INT64_MIN does not overflow (UBSAN) return rhs < 0 ? detail::default_sub(lhs, -static_cast(rhs)) : @@ -3362,7 +3362,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const SignedInteger lhs, const int128 rhs) noexcept { return lhs < 0 ? detail::default_sub(rhs, -static_cast(lhs)) : detail::default_add(rhs, static_cast(lhs)); @@ -3375,26 +3375,26 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const SignedInteger lhs, c #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator+(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator+(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return detail::default_add(lhs, static_cast(rhs)); + return detail::default_add(lhs, static_cast(rhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator+(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator+(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return detail::default_add(rhs, static_cast(lhs)); + return detail::default_add(rhs, static_cast(lhs)); } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator+=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator+=(const Integer rhs) noexcept { - *this = static_cast(*this + rhs); + *this = static_cast(*this + rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator+=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator+=(const int128 rhs) noexcept { *this = *this + rhs; return *this; @@ -3403,9 +3403,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator+=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator+=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator+=(const Integer rhs) noexcept { - *this = static_cast(*this + rhs); + *this = static_cast(*this + rhs); return *this; } @@ -3415,58 +3415,58 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator+=(const Integer rhs // Subtraction Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 lhs, const int128 rhs) noexcept { return detail::default_sub(lhs, rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 lhs, const UnsignedInteger rhs) noexcept { return detail::default_sub(lhs, rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const UnsignedInteger lhs, const int128 rhs) noexcept { return detail::default_add(-rhs, lhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 lhs, const SignedInteger rhs) noexcept { - return detail::default_sub(lhs, static_cast(rhs)); + return detail::default_sub(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const SignedInteger lhs, const int128 rhs) noexcept { - return detail::default_sub(static_cast(lhs), rhs); + return detail::default_sub(static_cast(lhs), rhs); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator-(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator-(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs - static_cast(rhs); + return lhs - static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator-(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator-(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) - rhs; + return static_cast(lhs) - rhs; } #endif template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator-=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator-=(const Integer rhs) noexcept { - *this = static_cast(*this - rhs); + *this = static_cast(*this - rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator-=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator-=(const int128 rhs) noexcept { *this = *this - rhs; return *this; @@ -3475,9 +3475,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator-=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator-=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator-=(const Integer rhs) noexcept { - *this = static_cast(*this - rhs); + *this = static_cast(*this - rhs); return *this; } @@ -3489,29 +3489,29 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator-=(const Integer rhs namespace detail { -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mul(const int128_t lhs, const std::uint64_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_mul(const int128 lhs, const std::uint64_t rhs) noexcept { #if defined(BOOST_INT128_HAS_INT128) && !defined(__s390__) && !defined(__s390x__) - return int128_t{static_cast(lhs) * static_cast(rhs)}; + return int128{static_cast(lhs) * static_cast(rhs)}; #else - return low_word_mul(lhs, rhs); + return low_word_mul(lhs, rhs); #endif } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mul(const int128_t lhs, const std::uint32_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_mul(const int128 lhs, const std::uint32_t rhs) noexcept { return default_mul(lhs, static_cast(rhs)); } #if defined(_M_AMD64) && !defined(__GNUC__) -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE int128_t msvc_amd64_mul(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE int128 msvc_amd64_mul(const int128 lhs, const int128 rhs) noexcept { - int128_t result {}; + int128 result {}; result.low = _umul128(lhs.low, rhs.low, &result.high); result.high += lhs.low * rhs.high; result.high += lhs.high * rhs.low; @@ -3521,7 +3521,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE int128_t msvc_amd64_mul(const #endif -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mul(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_mul(const int128 lhs, const int128 rhs) noexcept { #if ((defined(__aarch64__) && defined(__APPLE__)) || defined(__x86_64__) || defined(__PPC__) || defined(__powerpc__)) && defined(__GNUC__) && !defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -3529,7 +3529,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mu if (BOOST_INT128_IS_CONSTANT_EVALUATED(lhs)) { - return low_word_mul(lhs, rhs); + return low_word_mul(lhs, rhs); } else { @@ -3543,7 +3543,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mu std::memcpy(&new_rhs, &rhs, sizeof(detail::builtin_u128)); const auto res {new_lhs * new_rhs}; - int128_t library_res {}; + int128 library_res {}; std::memcpy(&library_res, &res, sizeof(detail::builtin_u128)); @@ -3555,23 +3555,23 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mu # elif defined(BOOST_INT128_HAS_INT128) // Unsigned wrap for consistent two's-complement semantics - return int128_t{static_cast(lhs) * static_cast(rhs)}; + return int128{static_cast(lhs) * static_cast(rhs)}; # else - return low_word_mul(lhs, rhs); + return low_word_mul(lhs, rhs); # endif #elif defined(__aarch64__) && defined(BOOST_INT128_HAS_INT128) - return int128_t{static_cast(lhs) * static_cast(rhs)}; + return int128{static_cast(lhs) * static_cast(rhs)}; #elif defined(_M_AMD64) && !defined(__GNUC__) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) if (BOOST_INT128_IS_CONSTANT_EVALUATED(rhs)) { - return low_word_mul(lhs, rhs); // LCOV_EXCL_LINE + return low_word_mul(lhs, rhs); // LCOV_EXCL_LINE } else { @@ -3581,31 +3581,31 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mu #elif defined(BOOST_INT128_HAS_INT128) && !defined(__s390__) && !defined(__s390x__) // Multiply in the unsigned domain to avoid signed-overflow UB, then reinterpret the bits. - return int128_t{static_cast(lhs) * static_cast(rhs)}; + return int128{static_cast(lhs) * static_cast(rhs)}; #else - return low_word_mul(lhs, rhs); + return low_word_mul(lhs, rhs); #endif } } // namespace detail -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const int128 lhs, const int128 rhs) noexcept { return detail::default_mul(lhs, rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const int128 lhs, const UnsignedInteger rhs) noexcept { using local_eval_type = detail::evaluation_type_t; return detail::default_mul(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const UnsignedInteger lhs, const int128 rhs) noexcept { using local_eval_type = detail::evaluation_type_t; return detail::default_mul(rhs, static_cast(lhs)); @@ -3617,14 +3617,14 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const UnsignedInteger lhs, #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const int128 lhs, const SignedInteger rhs) noexcept { return rhs < 0 ? -detail::default_mul(lhs, -static_cast(rhs)) : detail::default_mul(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const SignedInteger lhs, const int128 rhs) noexcept { return lhs < 0 ? -detail::default_mul(rhs, -static_cast(lhs)) : detail::default_mul(rhs, static_cast(lhs)); @@ -3636,26 +3636,26 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const SignedInteger lhs, c #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator*(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator*(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return detail::default_mul(lhs, static_cast(rhs)); + return detail::default_mul(lhs, static_cast(rhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator*(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator*(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return detail::default_mul(rhs, static_cast(lhs)); + return detail::default_mul(rhs, static_cast(lhs)); } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator*=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator*=(const Integer rhs) noexcept { - *this = static_cast(*this * rhs); + *this = static_cast(*this * rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator*=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator*=(const int128 rhs) noexcept { *this = *this * rhs; return *this; @@ -3664,9 +3664,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator*=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator*=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator*=(const Integer rhs) noexcept { - *this = static_cast(*this * rhs); + *this = static_cast(*this * rhs); return *this; } @@ -3681,7 +3681,7 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator*=(const Integer rhs # pragma clang diagnostic ignored "-Wassume" #endif -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const int128 lhs, const int128 rhs) noexcept { if (BOOST_INT128_UNLIKELY(rhs == 0)) { @@ -3689,7 +3689,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const BOOST_INT128_UNREACHABLE; } - constexpr int128_t min_val {INT64_MIN, 0}; + constexpr int128 min_val {INT64_MIN, 0}; const auto abs_lhs {abs(lhs)}; const auto abs_rhs {abs(rhs)}; @@ -3705,7 +3705,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const // computed above and beats native signed division (the out-of-line __divti3) for this case. if (abs_rhs.high == 0) { - int128_t quotient {}; + int128 quotient {}; if (abs_lhs.high == 0) { @@ -3721,7 +3721,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const #if defined(BOOST_INT128_HAS_INT128) - return static_cast(static_cast(lhs) / static_cast(rhs)); + return static_cast(static_cast(lhs) / static_cast(rhs)); #else @@ -3732,7 +3732,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const int128 lhs, const UnsignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -3744,13 +3744,13 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const const auto abs_lhs {abs(lhs)}; - int128_t quotient {}; + int128 quotient {}; detail::one_word_div(abs_lhs, static_cast(rhs), quotient); return lhs < 0 ? -quotient : quotient; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const UnsignedInteger lhs, const int128 rhs) noexcept { if (BOOST_INT128_UNLIKELY(rhs == 0)) { @@ -3771,7 +3771,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const UnsignedInteger lhs, return {0, 0}; } const auto res {static_cast(lhs) / abs_rhs.low}; - const int128_t result {0, res}; + const int128 result {0, res}; return rhs < 0 ? -result : result; } } @@ -3782,7 +3782,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const UnsignedInteger lhs, #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const int128 lhs, const SignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -3792,9 +3792,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const BOOST_INT128_UNREACHABLE; } - int128_t quotient {}; + int128 quotient {}; - constexpr int128_t min_val {INT64_MIN, 0}; + constexpr int128 min_val {INT64_MIN, 0}; const auto negative_res {static_cast((lhs.signed_high() < 0) ^ (rhs < 0))}; // Negate in the unsigned domain so INT64_MIN does not overflow (UBSAN) const auto abs_rhs {rhs < 0 ? -static_cast(rhs) : static_cast(rhs)}; @@ -3811,7 +3811,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const SignedInteger lhs, const int128 rhs) noexcept { if (BOOST_INT128_UNLIKELY(rhs == 0)) { @@ -3834,7 +3834,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const SignedInteger lhs, c } // Negate in the unsigned domain so INT64_MIN does not overflow (UBSAN) const auto abs_lhs {lhs < 0 ? -static_cast(lhs) : static_cast(lhs)}; - const int128_t res {0, abs_lhs / abs_rhs.low}; + const int128 res {0, abs_lhs / abs_rhs.low}; return negative_res ? -res : res; } @@ -3847,39 +3847,39 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const SignedInteger lhs, c #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator/(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator/(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return static_cast(static_cast(lhs) / rhs); + return static_cast(static_cast(lhs) / rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator/(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator/(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs / static_cast(rhs)); + return static_cast(lhs / static_cast(rhs)); } #elif defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128_t operator/(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128 operator/(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs / static_cast(rhs); + return lhs / static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128_t operator/(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128 operator/(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) / rhs; + return static_cast(lhs) / rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator/=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator/=(const Integer rhs) noexcept { - *this = static_cast(*this / rhs); + *this = static_cast(*this / rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator/=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator/=(const int128 rhs) noexcept { *this = *this / rhs; return *this; @@ -3888,9 +3888,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator/=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator/=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator/=(const Integer rhs) noexcept { - *this = static_cast(*this / rhs); + *this = static_cast(*this / rhs); return *this; } @@ -3907,21 +3907,21 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator/=(const Integer rhs //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(int128_t lhs, UnsignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(int128 lhs, UnsignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(UnsignedInteger lhs, int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(UnsignedInteger lhs, int128 rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(int128_t lhs, SignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(int128 lhs, SignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(SignedInteger lhs, int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(SignedInteger lhs, int128 rhs) noexcept; -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(int128_t lhs, int128_t rhs) noexcept; +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator%(int128 lhs, int128 rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const int128 lhs, const UnsignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -3931,8 +3931,8 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const BOOST_INT128_UNREACHABLE; } - int128_t quotient {}; - int128_t remainder {}; + int128 quotient {}; + int128 remainder {}; const auto abs_lhs {abs(lhs)}; @@ -3942,7 +3942,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const } template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const UnsignedInteger lhs, const int128 rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -3959,24 +3959,24 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const UnsignedInteger lhs, return lhs; } - const int128_t remainder {0, static_cast(lhs) % abs_rhs.low}; + const int128 remainder {0, static_cast(lhs) % abs_rhs.low}; return remainder; } template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const int128 lhs, const SignedInteger rhs) noexcept { - return lhs % static_cast(rhs); + return lhs % static_cast(rhs); } template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const SignedInteger lhs, const int128 rhs) noexcept { - return static_cast(lhs) % rhs; + return static_cast(lhs) % rhs; } -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const int128 lhs, const int128 rhs) noexcept { if (rhs == 0) { @@ -3984,7 +3984,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const BOOST_INT128_UNREACHABLE; } - constexpr int128_t min_val {INT64_MIN, 0}; + constexpr int128 min_val {INT64_MIN, 0}; const auto abs_lhs {abs(lhs)}; const auto abs_rhs {abs(rhs)}; @@ -3999,15 +3999,15 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const // magnitudes with the hardware-accelerated one_word_div and reapply the dividend's sign. if (abs_rhs.high == 0) { - int128_t remainder {}; + int128 remainder {}; if (abs_lhs.high == 0) { - remainder = int128_t{0, abs_lhs.low % abs_rhs.low}; + remainder = int128{0, abs_lhs.low % abs_rhs.low}; } else { - int128_t quotient {}; + int128 quotient {}; detail::one_word_div(abs_lhs, abs_rhs.low, quotient, remainder); } @@ -4016,11 +4016,11 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const #if defined(BOOST_INT128_HAS_INT128) - return static_cast(static_cast(lhs) % static_cast(rhs)); + return static_cast(static_cast(lhs) % static_cast(rhs)); #else - int128_t remainder {}; + int128 remainder {}; detail::knuth_div(abs_lhs, abs_rhs, remainder); return is_neg ? -remainder : remainder; @@ -4029,12 +4029,12 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator%(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator%(const int128 lhs, const detail::builtin_i128 rhs) noexcept { return static_cast(lhs) % rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator%(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator%(const detail::builtin_i128 lhs, const int128 rhs) noexcept { return lhs % static_cast(rhs); } @@ -4042,27 +4042,27 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int1 #elif defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128_t operator%(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128 operator%(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs % static_cast(rhs); + return lhs % static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128_t operator%(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128 operator%(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) % rhs; + return static_cast(lhs) % rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator%=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator%=(const Integer rhs) noexcept { - *this = static_cast(*this % rhs); + *this = static_cast(*this % rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator%=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator%=(const int128 rhs) noexcept { *this = *this % rhs; return *this; @@ -4071,9 +4071,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator%=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator%=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator%=(const Integer rhs) noexcept { - *this = static_cast(*this % rhs); + *this = static_cast(*this % rhs); return *this; } @@ -4129,15 +4129,15 @@ class numeric_limits_impl_i128 static constexpr bool tinyness_before = false; // Member functions - BOOST_INT128_HOST_DEVICE static constexpr auto (min) () -> boost::int128::int128_t { return {INT64_MIN, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto lowest () -> boost::int128::int128_t { return {INT64_MIN, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto (max) () -> boost::int128::int128_t { return {INT64_MAX, UINT64_MAX}; } - BOOST_INT128_HOST_DEVICE static constexpr auto epsilon () -> boost::int128::int128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto round_error () -> boost::int128::int128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto infinity () -> boost::int128::int128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto quiet_NaN () -> boost::int128::int128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto signaling_NaN() -> boost::int128::int128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto denorm_min () -> boost::int128::int128_t { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto (min) () -> boost::int128::int128 { return {INT64_MIN, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto lowest () -> boost::int128::int128 { return {INT64_MIN, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto (max) () -> boost::int128::int128 { return {INT64_MAX, UINT64_MAX}; } + BOOST_INT128_HOST_DEVICE static constexpr auto epsilon () -> boost::int128::int128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto round_error () -> boost::int128::int128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto infinity () -> boost::int128::int128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto quiet_NaN () -> boost::int128::int128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto signaling_NaN() -> boost::int128::int128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto denorm_min () -> boost::int128::int128 { return {0, 0}; } }; #if !defined(__cpp_inline_variables) || __cpp_inline_variables < 201606L @@ -4199,7 +4199,7 @@ namespace std { #endif template <> -class numeric_limits : +class numeric_limits : public boost::int128::detail::numeric_limits_impl_i128 {}; #ifdef __clang__ @@ -4242,7 +4242,7 @@ BOOST_INT128_EXPORT struct #if (defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128)) && !defined(_M_IX86) alignas(alignof(detail::builtin_u128)) #endif -uint128_t +uint128 { #if BOOST_INT128_ENDIAN_LITTLE_BYTE std::uint64_t low {}; @@ -4264,33 +4264,33 @@ uint128_t #endif // BOOST_INT128_ENDIAN_LITTLE_BYTE // Defaulted basic construction - constexpr uint128_t() noexcept = default; - constexpr uint128_t(const uint128_t&) noexcept = default; - constexpr uint128_t(uint128_t&&) noexcept = default; - constexpr uint128_t& operator=(const uint128_t&) noexcept = default; - constexpr uint128_t& operator=(uint128_t&&) noexcept = default; + constexpr uint128() noexcept = default; + constexpr uint128(const uint128&) noexcept = default; + constexpr uint128(uint128&&) noexcept = default; + constexpr uint128& operator=(const uint128&) noexcept = default; + constexpr uint128& operator=(uint128&&) noexcept = default; // Requires a conversion file to be implemented - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const int128_t& v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(const int128& v) noexcept; // Construct from integral types #if BOOST_INT128_ENDIAN_LITTLE_BYTE - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const std::uint64_t hi, const std::uint64_t lo) noexcept : low {lo}, high {hi} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const std::uint64_t hi, const std::uint64_t lo) noexcept : low {lo}, high {hi} {} template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const SignedInteger v) noexcept : low {static_cast(v)}, high {v < 0 ? UINT64_MAX : UINT64_C(0)} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const SignedInteger v) noexcept : low {static_cast(v)}, high {v < 0 ? UINT64_MAX : UINT64_C(0)} {} template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const UnsignedInteger v) noexcept : low {static_cast(v)}, high {} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const UnsignedInteger v) noexcept : low {static_cast(v)}, high {} {} #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t(const detail::builtin_i128 v) noexcept : + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128(const detail::builtin_i128 v) noexcept : low {static_cast(v)}, high {static_cast(static_cast(v) >> static_cast(64U))} {} - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t(const detail::builtin_u128 v) noexcept : + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128(const detail::builtin_u128 v) noexcept : low {static_cast(v)}, high {static_cast(v >> static_cast(64U))} {} @@ -4298,21 +4298,21 @@ uint128_t #else // Big endian - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const std::uint64_t hi, const std::uint64_t lo) noexcept : high {hi}, low {lo} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const std::uint64_t hi, const std::uint64_t lo) noexcept : high {hi}, low {lo} {} template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const SignedInteger v) noexcept : high {v < 0 ? UINT64_MAX : UINT64_C(0)}, low {static_cast(v)} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const SignedInteger v) noexcept : high {v < 0 ? UINT64_MAX : UINT64_C(0)}, low {static_cast(v)} {} template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const UnsignedInteger v) noexcept : high {}, low {static_cast(v)} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const UnsignedInteger v) noexcept : high {}, low {static_cast(v)} {} #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t(const detail::builtin_i128 v) noexcept : + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128(const detail::builtin_i128 v) noexcept : high {static_cast(static_cast(v) >> 64U)}, low {static_cast(v)} {} - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t(const detail::builtin_u128 v) noexcept : + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128(const detail::builtin_u128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v)} {} @@ -4322,7 +4322,7 @@ uint128_t // Construct from floating-point types template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(Float f) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(Float f) noexcept; // Integer conversion operators BOOST_INT128_HOST_DEVICE explicit constexpr operator bool() const noexcept {return low || high; } @@ -4355,136 +4355,136 @@ uint128_t // Compound OR template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator|=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator|=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator|=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator|=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator|=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator|=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound AND template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator&=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator&=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator&=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator&=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator&=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator&=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound XOR template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator^=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator^=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator^=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator^=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator^=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator^=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Left Shift template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator<<=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator<<=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator<<=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator<<=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator<<=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator<<=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Right Shift template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator>>=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator>>=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator>>=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator>>=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator>>=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator>>=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator++() noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t operator++(int) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator--() noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t operator--(int) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator++() noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128 operator++(int) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator--() noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128 operator--(int) noexcept; // Compound Addition template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator+=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator+=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator+=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator+=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator+=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator+=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Subtraction template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator-=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator-=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator-=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator-=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator-=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator-=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Multiplication template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator*=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator*=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator*=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator*=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator*=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator*=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Division template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator/=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator/=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator/=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator/=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator/=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator/=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound modulo template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator%=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator%=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator%=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator%=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator%=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator%=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 }; @@ -4493,7 +4493,7 @@ uint128_t // Absolute Value function //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t abs(const uint128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 abs(const uint128 value) noexcept { return value; } @@ -4506,7 +4506,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t abs(const uint1 // runtime (__floatuntisf and friends) is correctly rounded. The portable fallback // composes the words as high * 2^64 + low; see detail/float_conversion.hpp -BOOST_INT128_HOST_DEVICE constexpr uint128_t::operator float() const noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128::operator float() const noexcept { #if defined(BOOST_INT128_HAS_INT128) && !defined(BOOST_INT128_HAS_GPU_SUPPORT) @@ -4519,7 +4519,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t::operator float() const noexcept #endif } -BOOST_INT128_HOST_DEVICE constexpr uint128_t::operator double() const noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128::operator double() const noexcept { #if defined(BOOST_INT128_HAS_INT128) && !defined(BOOST_INT128_HAS_GPU_SUPPORT) @@ -4534,7 +4534,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t::operator double() const noexcept #if !defined(BOOST_INT128_HAS_GPU_SUPPORT) -constexpr uint128_t::operator long double() const noexcept +constexpr uint128::operator long double() const noexcept { #if defined(BOOST_INT128_HAS_INT128) @@ -4557,7 +4557,7 @@ constexpr uint128_t::operator long double() const noexcept // NaN/negative -> 0 // overflow -> UINT128_MAX. template -BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(Float f) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128::uint128(Float f) noexcept { constexpr Float two_32 {static_cast(UINT64_C(1) << 32)}; constexpr Float two_64 {two_32 * two_32}; @@ -4588,12 +4588,12 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(Float f) noexcept // Unary Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 value) noexcept { return value; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 value) noexcept { return {~value.high + static_cast(value.low == UINT64_C(0)), ~value.low + UINT64_C(1)}; } @@ -4602,12 +4602,12 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const // Equality Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128_t lhs, const bool rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128 lhs, const bool rhs) noexcept { return lhs.high == UINT64_C(0) && lhs.low == static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const bool lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const bool lhs, const uint128 rhs) noexcept { return rhs.high == UINT64_C(0) && rhs.low == static_cast(lhs); } @@ -4621,32 +4621,32 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const boo #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high == rhs_u.high && lhs.low == rhs_u.low; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high == rhs.high && lhs_u.low == rhs.low; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high == UINT64_C(0) && lhs.low == static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high == UINT64_C(0) && rhs.low == static_cast(lhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128 lhs, const uint128 rhs) noexcept { #if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_AMD64) @@ -4680,24 +4680,24 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uin #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs == static_cast(rhs); + return lhs == static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) == rhs; + return static_cast(lhs) == rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs == static_cast(rhs); + return lhs == static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) == rhs; + return static_cast(lhs) == rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -4706,43 +4706,43 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Inequality Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128_t lhs, const bool rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128 lhs, const bool rhs) noexcept { return lhs.high != UINT64_C(0) || lhs.low != static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const bool lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const bool lhs, const uint128 rhs) noexcept { return rhs.high != UINT64_C(0) || rhs.low != static_cast(lhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high != rhs_u.high || lhs.low != rhs_u.low; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high != rhs.high || lhs_u.low != rhs.low; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high != UINT64_C(0) || lhs.low != static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high != UINT64_C(0) || rhs.low != static_cast(lhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128 lhs, const uint128 rhs) noexcept { #if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_AMD64) @@ -4777,25 +4777,25 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uin #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_BUILTIN_CONSTEXPR) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs != static_cast(rhs); + return lhs != static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) != rhs; + return static_cast(lhs) != rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs != static_cast(rhs); + return lhs != static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) != rhs; + return static_cast(lhs) != rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -4805,32 +4805,32 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high == rhs_u.high ? lhs.low < rhs_u.low : lhs.high < rhs_u.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high == rhs.high ? lhs_u.low < rhs.low : lhs_u.high < rhs.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high == UINT64_C(0) && lhs.low < static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high > UINT64_C(0) || static_cast(lhs) < rhs.low; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128 lhs, const uint128 rhs) noexcept { // On ARM macs only with the clang compiler is casting to unsigned __int128 uniformly better (and seemingly cost free) #if defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -4895,25 +4895,25 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs < static_cast(rhs); + return lhs < static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) < rhs; + return static_cast(lhs) < rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs < static_cast(rhs); + return lhs < static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) < rhs; + return static_cast(lhs) < rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -4923,32 +4923,32 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high == rhs_u.high ? lhs.low <= rhs_u.low : lhs.high < rhs_u.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high == rhs.high ? lhs_u.low <= rhs.low : lhs_u.high < rhs.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high == UINT64_C(0) && lhs.low <= static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high > UINT64_C(0) || static_cast(lhs) <= rhs.low; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128 lhs, const uint128 rhs) noexcept { #if defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -5012,24 +5012,24 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uin #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs <= static_cast(rhs); + return lhs <= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) <= rhs; + return static_cast(lhs) <= rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs <= static_cast(rhs); + return lhs <= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) <= rhs; + return static_cast(lhs) <= rhs; } @@ -5040,32 +5040,32 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high == rhs_u.high ? lhs.low > rhs_u.low : lhs.high > rhs_u.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high == rhs.high ? lhs_u.low > rhs.low : lhs_u.high > rhs.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high > UINT64_C(0) || lhs.low > static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high == UINT64_C(0) && static_cast(lhs) > rhs.low; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128 lhs, const uint128 rhs) noexcept { #if defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -5129,24 +5129,24 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs > static_cast(rhs); + return lhs > static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) > rhs; + return static_cast(lhs) > rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs > static_cast(rhs); + return lhs > static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) > rhs; + return static_cast(lhs) > rhs; } @@ -5157,32 +5157,32 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high == rhs_u.high ? lhs.low >= rhs_u.low : lhs.high > rhs_u.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high == rhs.high ? lhs_u.low >= rhs.low : lhs_u.high > rhs.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high > UINT64_C(0) || lhs.low >= static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high == UINT64_C(0) && static_cast(lhs) >= rhs.low; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128 lhs, const uint128 rhs) noexcept { #if defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -5245,25 +5245,25 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uin #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs >= static_cast(rhs); + return lhs >= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) >= rhs; + return static_cast(lhs) >= rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs >= static_cast(rhs); + return lhs >= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) >= rhs; + return static_cast(lhs) >= rhs; } @@ -5275,7 +5275,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool #ifdef BOOST_INT128_HAS_SPACESHIP_OPERATOR -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128 lhs, const uint128 rhs) noexcept { if (lhs < rhs) { @@ -5292,7 +5292,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering oper } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128 lhs, const UnsignedInteger rhs) noexcept { if (lhs < rhs) { @@ -5309,7 +5309,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint12 } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const UnsignedInteger lhs, const uint128 rhs) noexcept { if (lhs < rhs) { @@ -5326,7 +5326,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Unsign } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const SignedInteger lhs, const uint128 rhs) noexcept { if (lhs < rhs) { @@ -5343,7 +5343,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Signed } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128 lhs, const SignedInteger rhs) noexcept { if (lhs < rhs) { @@ -5365,7 +5365,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint12 // Not Operator //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator~(const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator~(const uint128 rhs) noexcept { return {~rhs.high, ~rhs.low}; } @@ -5375,30 +5375,30 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator~(const //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const uint128 lhs, const SignedInteger rhs) noexcept { return {lhs.high | (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low | static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const SignedInteger lhs, const uint128 rhs) noexcept { return {rhs.high | (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), rhs.low | static_cast(lhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const uint128 lhs, const UnsignedInteger rhs) noexcept { return {lhs.high, lhs.low | static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const UnsignedInteger lhs, const uint128 rhs) noexcept { return {rhs.high, rhs.low | static_cast(lhs)}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const uint128 lhs, const uint128 rhs) noexcept { return {lhs.high | rhs.high, lhs.low | rhs.low}; } @@ -5406,36 +5406,36 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs | static_cast(rhs); + return lhs | static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) | rhs; + return static_cast(lhs) | rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs | static_cast(rhs); + return lhs | static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) | rhs; + return static_cast(lhs) | rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator|=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator|=(const Integer rhs) noexcept { *this = *this | rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator|=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator|=(const uint128 rhs) noexcept { *this = *this | rhs; return *this; @@ -5444,7 +5444,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator|=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator|=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator|=(const Integer rhs) noexcept { *this = *this | rhs; return *this; @@ -5457,30 +5457,30 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator|=(const Integer r //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const uint128 lhs, const SignedInteger rhs) noexcept { return {lhs.high & (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low & static_cast(rhs)}; } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const SignedInteger lhs, const uint128 rhs) noexcept { return {rhs.high & (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), rhs.low & static_cast(lhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const uint128 lhs, const UnsignedInteger rhs) noexcept { return {UINT64_C(0), lhs.low & static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const UnsignedInteger lhs, const uint128 rhs) noexcept { return {UINT64_C(0), rhs.low & static_cast(lhs)}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const uint128 lhs, const uint128 rhs) noexcept { return {lhs.high & rhs.high, lhs.low & rhs.low}; } @@ -5488,37 +5488,37 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs & static_cast(rhs); + return lhs & static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) & rhs; + return static_cast(lhs) & rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs & static_cast(rhs); + return lhs & static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) & rhs; + return static_cast(lhs) & rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator&=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator&=(const Integer rhs) noexcept { *this = *this & rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator&=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator&=(const uint128 rhs) noexcept { *this = *this & rhs; return *this; @@ -5527,7 +5527,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator&=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator&=(Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator&=(Integer rhs) noexcept { *this = *this & rhs; return *this; @@ -5541,30 +5541,30 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator&=(Integer rhs) no //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const uint128 lhs, const SignedInteger rhs) noexcept { return {lhs.high ^ (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low ^ static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const SignedInteger lhs, const uint128 rhs) noexcept { return {rhs.high ^ (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), rhs.low ^ static_cast(lhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const uint128 lhs, const UnsignedInteger rhs) noexcept { return {lhs.high, lhs.low ^ static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const UnsignedInteger lhs, const uint128 rhs) noexcept { return {rhs.high, rhs.low ^ static_cast(lhs)}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const uint128 lhs, const uint128 rhs) noexcept { return {lhs.high ^ rhs.high, lhs.low ^ rhs.low}; } @@ -5572,37 +5572,37 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs ^ static_cast(rhs); + return lhs ^ static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) ^ rhs; + return static_cast(lhs) ^ rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs ^ static_cast(rhs); + return lhs ^ static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) ^ rhs; + return static_cast(lhs) ^ rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator^=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator^=(const Integer rhs) noexcept { *this = *this ^ rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator^=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator^=(const uint128 rhs) noexcept { *this = *this ^ rhs; return *this; @@ -5611,7 +5611,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator^=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator^=(Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator^=(Integer rhs) noexcept { *this = *this ^ rhs; return *this; @@ -5626,7 +5626,7 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator^=(Integer rhs) no namespace detail { template -BOOST_INT128_HOST_DEVICE constexpr uint128_t default_ls_impl(const uint128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 default_ls_impl(const uint128 lhs, const Integer rhs) noexcept { static_assert(std::is_integral::value, "Needs to be a builtin type"); @@ -5655,7 +5655,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t default_ls_impl(const uint128_t lhs } template -BOOST_INT128_HOST_DEVICE uint128_t intrinsic_ls_impl(const uint128_t lhs, const T rhs) noexcept +BOOST_INT128_HOST_DEVICE uint128 intrinsic_ls_impl(const uint128 lhs, const T rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators; delegate @@ -5673,8 +5673,8 @@ BOOST_INT128_HOST_DEVICE uint128_t intrinsic_ls_impl(const uint128_t lhs, const std::memcpy(&value, &lhs, sizeof(builtin_u128)); const auto res {value << rhs}; - uint128_t return_value; - std::memcpy(&return_value, &res, sizeof(uint128_t)); + uint128 return_value; + std::memcpy(&return_value, &res, sizeof(uint128)); return return_value; #if defined(__GNUC__) && __GNUC__ >= 8 @@ -5715,7 +5715,7 @@ BOOST_INT128_HOST_DEVICE uint128_t intrinsic_ls_impl(const uint128_t lhs, const } // namespace detail BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(const uint128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator<<(const uint128 lhs, const Integer rhs) noexcept { #ifndef BOOST_INT128_NO_CONSTEVAL_DETECTION @@ -5737,7 +5737,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(const uint128_t lhs, con // A number of different overloads to ensure that we return the same type as the builtins would -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator<<(const uint128 lhs, const uint128 rhs) noexcept { // Out-of-range counts (>= 128 or with the high word set) are undefined, // matching the built-in operators; forward the count to the scalar overload. @@ -5746,13 +5746,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(cons #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs << static_cast(rhs.low); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs << static_cast(rhs.low); @@ -5761,27 +5761,27 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR deta #endif BOOST_INT128_EXPORT template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) << rhs.low; } BOOST_INT128_EXPORT template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned int operator<<(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr unsigned int operator<<(const UnsignedInteger lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) << rhs.low; } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator<<=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator<<=(const Integer rhs) noexcept { *this = *this << rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator<<=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator<<=(const uint128 rhs) noexcept { *this = *this << rhs; return *this; @@ -5790,7 +5790,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator<<=(const uint1 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator<<=(Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator<<=(Integer rhs) noexcept { *this = *this << rhs; return *this; @@ -5805,7 +5805,7 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator<<=(Integer rhs) n namespace detail { template -BOOST_INT128_HOST_DEVICE constexpr uint128_t default_rs_impl(const uint128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 default_rs_impl(const uint128 lhs, const Integer rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators. In a @@ -5832,7 +5832,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t default_rs_impl(const uint128_t lhs } template -BOOST_INT128_HOST_DEVICE uint128_t intrinsic_rs_impl(const uint128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE uint128 intrinsic_rs_impl(const uint128 lhs, const Integer rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators; delegate @@ -5850,8 +5850,8 @@ BOOST_INT128_HOST_DEVICE uint128_t intrinsic_rs_impl(const uint128_t lhs, const std::memcpy(&value, &lhs, sizeof(builtin_u128)); const auto res {value >> rhs}; - uint128_t return_value; - std::memcpy(&return_value, &res, sizeof(uint128_t)); + uint128 return_value; + std::memcpy(&return_value, &res, sizeof(uint128)); return return_value; #if defined(__GNUC__) && __GNUC__ >= 8 @@ -5889,7 +5889,7 @@ BOOST_INT128_HOST_DEVICE uint128_t intrinsic_rs_impl(const uint128_t lhs, const } // namespace detail BOOST_INT128_EXPORT template ::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator>>(const uint128 lhs, const Integer rhs) noexcept { #ifndef BOOST_INT128_NO_CONSTEVAL_DETECTION @@ -5909,7 +5909,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, con #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator>>(const uint128 lhs, const uint128 rhs) noexcept { // Out-of-range counts (>= 128 or with the high word set) are undefined, // matching the built-in operators; forward the count to the scalar overload. @@ -5918,13 +5918,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(cons #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs >> static_cast(rhs.low); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs >> static_cast(rhs.low); @@ -5933,27 +5933,27 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR deta #endif BOOST_INT128_EXPORT template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) >> rhs.low; } BOOST_INT128_EXPORT template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned operator>>(UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr unsigned operator>>(UnsignedInteger lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) >> rhs.low; } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator>>=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator>>=(const Integer rhs) noexcept { *this = *this >> rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator>>=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator>>=(const uint128 rhs) noexcept { *this = *this >> rhs; return *this; @@ -5962,7 +5962,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator>>=(const uint1 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator>>=(Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator>>=(Integer rhs) noexcept { *this = *this >> rhs; return *this; @@ -5974,7 +5974,7 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator>>=(Integer rhs) n // Increment Operator //===================================== -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator++() noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator++() noexcept { if (++low == UINT64_C(0)) { @@ -5984,7 +5984,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator++() noexcept return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t uint128_t::operator++(int) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 uint128::operator++(int) noexcept { const auto temp {*this}; ++(*this); @@ -5995,7 +5995,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t uint128_t::operator++(int) noexcept // Decrement Operator //===================================== -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator--() noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator--() noexcept { if (--low == UINT64_MAX) { @@ -6005,7 +6005,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator--() noexcept return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t uint128_t::operator--(int) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 uint128::operator--(int) noexcept { const auto temp {*this}; --(*this); @@ -6018,22 +6018,22 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t uint128_t::operator--(int) noexcept namespace impl { -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_add(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128 default_add(const uint128 lhs, const uint128 rhs) noexcept { #if defined(BOOST_INT128_HAS_BUILTIN_ADD_OVERFLOW) && (defined(__i386__) || (defined(__aarch64__) && !defined(__APPLE__)) || defined(__arm__) || (defined(__s390__) || defined(__s390x__))) - uint128_t res {}; + uint128 res {}; res.high = lhs.high + rhs.high + __builtin_add_overflow(lhs.low, rhs.low, &res.low); return res; #elif (defined(__x86_64__) || (defined(__aarch64__) && !defined(__APPLE__))) && !defined(_MSC_VER) && defined(BOOST_INT128_HAS_INT128) - return static_cast(static_cast(lhs) + static_cast(rhs)); + return static_cast(static_cast(lhs) + static_cast(rhs)); #else - uint128_t temp {lhs.high + rhs.high, lhs.low + rhs.low}; + uint128 temp {lhs.high + rhs.high, lhs.low + rhs.low}; if (temp.low < lhs.low) { @@ -6045,18 +6045,18 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_a #endif } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_add(const uint128_t lhs, const std::uint64_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128 default_add(const uint128 lhs, const std::uint64_t rhs) noexcept { #if defined(BOOST_INT128_HAS_BUILTIN_ADD_OVERFLOW) && (defined(__i386__) || (defined(__aarch64__) && !defined(__APPLE__)) || defined(__arm__) || (defined(__s390__) || defined(__s390x__))) - uint128_t res {}; + uint128 res {}; res.high = lhs.high + __builtin_add_overflow(lhs.low, rhs, &res.low); return res; #else - uint128_t temp {lhs.high, lhs.low + rhs}; + uint128 temp {lhs.high, lhs.low + rhs}; if (temp.low < lhs.low) { @@ -6068,22 +6068,22 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_a #endif } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_sub(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128 default_sub(const uint128 lhs, const uint128 rhs) noexcept { #if defined(BOOST_INT128_HAS_BUILTIN_SUB_OVERFLOW) && (defined(__i386__) || defined(__arm__) || (defined(__s390__) || defined(__s390x__))) - uint128_t res {}; + uint128 res {}; res.high = lhs.high - rhs.high - __builtin_sub_overflow(lhs.low, rhs.low, &res.low); return res; #elif (defined(__x86_64__) || (defined(__aarch64__) && !defined(__APPLE__))) && !defined(_MSC_VER) && defined(BOOST_INT128_HAS_INT128) - return static_cast(static_cast(lhs) - static_cast(rhs)); + return static_cast(static_cast(lhs) - static_cast(rhs)); #else - uint128_t temp {lhs.high - rhs.high, lhs.low - rhs.low}; + uint128 temp {lhs.high - rhs.high, lhs.low - rhs.low}; // Check for carry if (lhs.low < rhs.low) @@ -6096,18 +6096,18 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_s #endif } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_sub(const uint128_t lhs, const std::uint64_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128 default_sub(const uint128 lhs, const std::uint64_t rhs) noexcept { #if defined(BOOST_INT128_HAS_BUILTIN_SUB_OVERFLOW) && (defined(__i386__) || (defined(__aarch64__) && !defined(__APPLE__)) || defined(__arm__) || (defined(__s390__) || defined(__s390x__))) - uint128_t res {}; + uint128 res {}; res.high = lhs.high - __builtin_sub_overflow(lhs.low, rhs, &res.low); return res; #else - uint128_t temp {lhs.high, lhs.low - rhs}; + uint128 temp {lhs.high, lhs.low - rhs}; // Check for carry if (lhs.low < rhs) @@ -6128,14 +6128,14 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_s #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 lhs, const SignedInteger rhs) noexcept { return rhs < 0 ? impl::default_sub(lhs, -static_cast(rhs)) : impl::default_add(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const SignedInteger lhs, const uint128 rhs) noexcept { return lhs < 0 ? impl::default_sub(rhs, -static_cast(lhs)) : impl::default_add(rhs, static_cast(lhs)); @@ -6146,18 +6146,18 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const SignedInteger lhs, #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 lhs, const UnsignedInteger rhs) noexcept { return impl::default_add(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const UnsignedInteger lhs, const uint128 rhs) noexcept { return impl::default_add(rhs, static_cast(lhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 lhs, const uint128 rhs) noexcept { return impl::default_add(lhs, rhs); } @@ -6165,37 +6165,37 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return impl::default_add(lhs, static_cast(rhs)); + return impl::default_add(lhs, static_cast(rhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return impl::default_add(static_cast(lhs), rhs); + return impl::default_add(static_cast(lhs), rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return impl::default_add(lhs, static_cast(rhs)); + return impl::default_add(lhs, static_cast(rhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return impl::default_add(static_cast(lhs), rhs); + return impl::default_add(static_cast(lhs), rhs); } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator+=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator+=(const Integer rhs) noexcept { *this = *this + rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator+=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator+=(const uint128 rhs) noexcept { *this = *this + rhs; return *this; @@ -6204,7 +6204,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator+=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator+=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator+=(const Integer rhs) noexcept { *this = *this + rhs; return *this; @@ -6223,14 +6223,14 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator+=(const Integer r #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 lhs, const SignedInteger rhs) noexcept { return rhs < 0 ? impl::default_add(lhs, -static_cast(rhs)) : impl::default_sub(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const SignedInteger lhs, const uint128 rhs) noexcept { return lhs < 0 ? impl::default_sub(-rhs, -static_cast(lhs)) : impl::default_add(-rhs, static_cast(lhs)); @@ -6241,18 +6241,18 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const SignedInteger lhs, #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 lhs, const UnsignedInteger rhs) noexcept { return impl::default_sub(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const UnsignedInteger lhs, const uint128 rhs) noexcept { return impl::default_add(-rhs, static_cast(lhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 lhs, const uint128 rhs) noexcept { return impl::default_sub(lhs, rhs); } @@ -6260,37 +6260,37 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs - static_cast(rhs); + return lhs - static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) - rhs; + return static_cast(lhs) - rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs - static_cast(rhs); + return lhs - static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) - rhs; + return static_cast(lhs) - rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator-=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator-=(const Integer rhs) noexcept { *this = *this - rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator-=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator-=(const uint128 rhs) noexcept { *this = *this - rhs; return *this; @@ -6299,7 +6299,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator-=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator-=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator-=(const Integer rhs) noexcept { *this = *this - rhs; return *this; @@ -6320,9 +6320,9 @@ namespace detail { #if defined(_M_AMD64) && !defined(__GNUC__) -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const uint128 rhs) noexcept { - uint128_t result {}; + uint128 result {}; result.low = _umul128(lhs.low, rhs.low, &result.high); result.high += lhs.low * rhs.high; result.high += lhs.high * rhs.low; @@ -6330,18 +6330,18 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint return result; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const std::uint64_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const std::uint64_t rhs) noexcept { - uint128_t result {}; + uint128 result {}; result.low = _umul128(lhs.low, rhs, &result.high); result.high += lhs.high * rhs; return result; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const std::uint32_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const std::uint32_t rhs) noexcept { - uint128_t result {}; + uint128 result {}; result.low = _umul128(lhs.low, static_cast(rhs), &result.high); result.high += lhs.high * static_cast(rhs); @@ -6350,7 +6350,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint #elif defined(_M_ARM64) -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const uint128 rhs) noexcept { const auto low_low{lhs.low * rhs.low}; const auto high_low_low{__umulh(lhs.low, rhs.low)}; @@ -6363,7 +6363,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint return {high, low_low}; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const std::uint64_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const std::uint64_t rhs) noexcept { const auto low{lhs.low * rhs}; const auto high{__umulh(lhs.low, rhs) + (lhs.high * rhs)}; @@ -6371,7 +6371,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint return {high, low}; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const std::uint32_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const std::uint32_t rhs) noexcept { const auto low{lhs.low * rhs}; const auto high{__umulh(lhs.low, static_cast(rhs)) + (lhs.high * rhs)}; @@ -6382,7 +6382,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint #endif // MSVC implementations template -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_mul(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128 default_mul(const uint128 lhs, const UnsignedInteger rhs) noexcept { #if (defined(__aarch64__) || defined(__x86_64__) || defined(__PPC__) || defined(__powerpc__)) && defined(__GNUC__) && defined(BOOST_INT128_HAS_INT128) @@ -6393,14 +6393,14 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_m detail::builtin_u128 new_lhs {}; detail::builtin_u128 new_rhs {}; - std::memcpy(&new_lhs, &lhs, sizeof(uint128_t)); + std::memcpy(&new_lhs, &lhs, sizeof(uint128)); std::memcpy(&new_rhs, &rhs, sizeof(UnsignedInteger)); const auto res {new_lhs * new_rhs}; - uint128_t library_res {}; + uint128 library_res {}; - std::memcpy(&library_res, &res, sizeof(uint128_t)); + std::memcpy(&library_res, &res, sizeof(uint128)); return library_res; } @@ -6408,7 +6408,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_m # elif defined(BOOST_INT128_HAS_INT128) # define BOOST_INT128_HIDE_MUL - return static_cast(static_cast(lhs) * static_cast(rhs)); + return static_cast(static_cast(lhs) * static_cast(rhs)); # endif @@ -6425,14 +6425,14 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_m #elif defined(BOOST_INT128_HAS_INT128) && !defined(__s390__) && !defined(__s390x__) # define BOOST_INT128_HIDE_MUL - return static_cast(static_cast(lhs) * static_cast(rhs)); + return static_cast(static_cast(lhs) * static_cast(rhs)); #endif // We need to hide this if we use a non-const eval method above to avoid a litany of cross-platform warnings #ifndef BOOST_INT128_HIDE_MUL - return low_word_mul(lhs, rhs); + return low_word_mul(lhs, rhs); #else #undef BOOST_INT128_HIDE_MUL @@ -6451,7 +6451,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_m #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const uint128 lhs, const SignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -6462,7 +6462,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, cons } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const SignedInteger lhs, const uint128 rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -6473,7 +6473,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const SignedInteger lhs, } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const uint128 lhs, const UnsignedInteger rhs) noexcept { return detail::default_mul(lhs, static_cast(rhs)); } @@ -6483,12 +6483,12 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, cons #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const UnsignedInteger lhs, const uint128 rhs) noexcept { return detail::default_mul(rhs, static_cast(lhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const uint128 lhs, const uint128 rhs) noexcept { return detail::default_mul(lhs, rhs); } @@ -6496,49 +6496,49 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { const detail::builtin_u128 rhs_bits {static_cast(rhs)}; const bool rhs_negative {static_cast(static_cast(rhs_bits >> static_cast(64U))) < 0}; - const uint128_t rhs_u {rhs_bits}; - const uint128_t abs_rhs {rhs_negative ? -rhs_u : rhs_u}; - const uint128_t res {lhs * abs_rhs}; + const uint128 rhs_u {rhs_bits}; + const uint128 abs_rhs {rhs_negative ? -rhs_u : rhs_u}; + const uint128 res {lhs * abs_rhs}; return rhs_negative ? -res : res; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { const detail::builtin_u128 lhs_bits {static_cast(lhs)}; const bool lhs_negative {static_cast(static_cast(lhs_bits >> static_cast(64U))) < 0}; - const uint128_t lhs_u {lhs_bits}; - const uint128_t abs_lhs {lhs_negative ? -lhs_u : lhs_u}; - const uint128_t res {abs_lhs * rhs}; + const uint128 lhs_u {lhs_bits}; + const uint128 abs_lhs {lhs_negative ? -lhs_u : lhs_u}; + const uint128 res {abs_lhs * rhs}; return lhs_negative ? -res : res; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs * static_cast(rhs); + return lhs * static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) * rhs; + return static_cast(lhs) * rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator*=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator*=(const Integer rhs) noexcept { *this = *this * rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator*=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator*=(const uint128 rhs) noexcept { *this = *this * rhs; return *this; @@ -6547,7 +6547,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator*=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator*=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator*=(const Integer rhs) noexcept { *this = *this * rhs; return *this; @@ -6561,35 +6561,35 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator*=(const Integer r // For div we need forward declarations since we mix and match the arguments BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(uint128_t lhs, SignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(uint128 lhs, SignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(SignedInteger lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(SignedInteger lhs, uint128 rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(uint128_t lhs, UnsignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(uint128 lhs, UnsignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(UnsignedInteger lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(UnsignedInteger lhs, uint128 rhs) noexcept; -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(uint128_t lhs, uint128_t rhs) noexcept; +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(uint128 lhs, uint128 rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const uint128 lhs, const SignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; - return rhs < 0 ? lhs / static_cast(rhs) : lhs / static_cast(rhs); + return rhs < 0 ? lhs / static_cast(rhs) : lhs / static_cast(rhs); } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const SignedInteger lhs, const uint128 rhs) noexcept { using eval_type = detail::evaluation_type_t; - return lhs < 0 ? static_cast(lhs) / rhs : static_cast(lhs) / rhs; + return lhs < 0 ? static_cast(lhs) / rhs : static_cast(lhs) / rhs; } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const uint128 lhs, const UnsignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -6604,7 +6604,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, cons return {0, 0}; } - uint128_t quotient {}; + uint128 quotient {}; detail::one_word_div(lhs, static_cast(rhs), quotient); @@ -6612,7 +6612,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, cons } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const UnsignedInteger lhs, const uint128 rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -6630,7 +6630,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const UnsignedInteger lhs return {0, static_cast(lhs) / rhs.low}; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const uint128 lhs, const uint128 rhs) noexcept { if (BOOST_INT128_UNLIKELY(rhs == 0U)) { @@ -6653,14 +6653,14 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, cons return {0, lhs.low / rhs.low}; } - uint128_t quotient {}; + uint128 quotient {}; detail::one_word_div(lhs, rhs.low, quotient); return quotient; } #if defined(BOOST_INT128_HAS_INT128) && !defined(__s390__) && !defined(__s390x__) - return static_cast(static_cast(lhs) / static_cast(rhs)); + return static_cast(static_cast(lhs) / static_cast(rhs)); #else @@ -6671,38 +6671,38 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, cons #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs / static_cast(rhs); + return lhs / static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) / rhs; + return static_cast(lhs) / rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs / static_cast(rhs); + return lhs / static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) / rhs; + return static_cast(lhs) / rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator/=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator/=(const Integer rhs) noexcept { *this = *this / rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator/=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator/=(const uint128 rhs) noexcept { *this = *this / rhs; return *this; @@ -6711,7 +6711,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator/=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator/=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator/=(const Integer rhs) noexcept { *this = *this / rhs; return *this; @@ -6725,35 +6725,35 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator/=(const Integer r // For div we need forward declarations since we mix and match the arguments BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(uint128_t lhs, SignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(uint128 lhs, SignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(SignedInteger lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(SignedInteger lhs, uint128 rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(uint128_t lhs, UnsignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(uint128 lhs, UnsignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(UnsignedInteger lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(UnsignedInteger lhs, uint128 rhs) noexcept; -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(uint128_t lhs, uint128_t rhs) noexcept; +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(uint128 lhs, uint128 rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const uint128 lhs, const SignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; - return rhs < 0 ? lhs % static_cast(rhs) : lhs % static_cast(rhs); + return rhs < 0 ? lhs % static_cast(rhs) : lhs % static_cast(rhs); } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const SignedInteger lhs, const uint128 rhs) noexcept { using eval_type = detail::evaluation_type_t; - return lhs < 0 ? static_cast(lhs) % rhs : static_cast(lhs) % rhs; + return lhs < 0 ? static_cast(lhs) % rhs : static_cast(lhs) % rhs; } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const uint128 lhs, const UnsignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -6765,8 +6765,8 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, cons if (lhs.high != 0) { - uint128_t quotient {}; - uint128_t remainder {}; + uint128 quotient {}; + uint128 remainder {}; detail::one_word_div(lhs, static_cast(rhs), quotient, remainder); @@ -6779,7 +6779,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, cons } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const UnsignedInteger lhs, const uint128 rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -6796,7 +6796,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const UnsignedInteger lhs return {0, static_cast(lhs) % rhs.low}; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const uint128 lhs, const uint128 rhs) noexcept { if (BOOST_INT128_UNLIKELY(rhs == 0U)) { @@ -6817,19 +6817,19 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, cons return {0, lhs.low % rhs.low}; } - uint128_t quotient {}; - uint128_t remainder {}; + uint128 quotient {}; + uint128 remainder {}; detail::one_word_div(lhs, rhs.low, quotient, remainder); return remainder; } #if defined(BOOST_INT128_HAS_INT128) && !defined(__s390__) && !defined(__s390x__) - return static_cast(static_cast(lhs) % static_cast(rhs)); + return static_cast(static_cast(lhs) % static_cast(rhs)); #else - uint128_t remainder {}; + uint128 remainder {}; detail::knuth_div(lhs, rhs, remainder); return remainder; @@ -6838,38 +6838,38 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, cons #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs % static_cast(rhs); + return lhs % static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) % rhs; + return static_cast(lhs) % rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs % static_cast(rhs); + return lhs % static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) % rhs; + return static_cast(lhs) % rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator%=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator%=(const Integer rhs) noexcept { *this = *this % rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator%=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator%=(const uint128 rhs) noexcept { *this = *this % rhs; return *this; @@ -6878,7 +6878,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator%=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator%=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator%=(const Integer rhs) noexcept { * this = *this % rhs; return *this; @@ -6936,15 +6936,15 @@ class numeric_limits_impl_u128 static constexpr bool tinyness_before = false; // Member functions - BOOST_INT128_HOST_DEVICE static constexpr auto (min) () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto lowest () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto (max) () -> boost::int128::uint128_t { return {UINT64_MAX, UINT64_MAX}; } - BOOST_INT128_HOST_DEVICE static constexpr auto epsilon () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto round_error () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto infinity () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto quiet_NaN () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto signaling_NaN() -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto denorm_min () -> boost::int128::uint128_t { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto (min) () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto lowest () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto (max) () -> boost::int128::uint128 { return {UINT64_MAX, UINT64_MAX}; } + BOOST_INT128_HOST_DEVICE static constexpr auto epsilon () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto round_error () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto infinity () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto quiet_NaN () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto signaling_NaN() -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto denorm_min () -> boost::int128::uint128 { return {0, 0}; } }; #if !defined(__cpp_inline_variables) || __cpp_inline_variables < 201606L @@ -7007,7 +7007,7 @@ namespace std { #endif template <> -class numeric_limits : +class numeric_limits : public boost::int128::detail::numeric_limits_impl_u128 {}; #ifdef __clang__ @@ -7037,7 +7037,7 @@ namespace detail { template struct valid_overload { - static constexpr bool value = std::is_same::value || std::is_same::value; + static constexpr bool value = std::is_same::value || std::is_same::value; }; template @@ -7047,15 +7047,15 @@ BOOST_INT128_INLINE_CONSTEXPR bool is_valid_overload_v = valid_overload::valu #if BOOST_INT128_ENDIAN_LITTLE_BYTE -BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(const uint128_t& v) noexcept : low {v.low}, high {v.high} {} +BOOST_INT128_HOST_DEVICE constexpr int128::int128(const uint128& v) noexcept : low {v.low}, high {v.high} {} -BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(const int128_t& v) noexcept : low {v.low}, high {v.high} {} +BOOST_INT128_HOST_DEVICE constexpr uint128::uint128(const int128& v) noexcept : low {v.low}, high {v.high} {} #else -BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(const uint128_t& v) noexcept : high {v.high}, low {v.low} {} +BOOST_INT128_HOST_DEVICE constexpr int128::int128(const uint128& v) noexcept : high {v.high}, low {v.low} {} -BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(const int128_t& v) noexcept : high {v.high}, low {v.low} {} +BOOST_INT128_HOST_DEVICE constexpr uint128::uint128(const int128& v) noexcept : high {v.high}, low {v.low} {} #endif // BOOST_INT128_ENDIAN_LITTLE_BYTE @@ -7071,37 +7071,37 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(const int128_t& v) noexc template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator==(const T lhs, const U rhs) noexcept { - return static_cast(lhs) == static_cast(rhs); + return static_cast(lhs) == static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const T lhs, const U rhs) noexcept { - return static_cast(lhs) != static_cast(rhs); + return static_cast(lhs) != static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator<(const T lhs, const U rhs) noexcept { - return static_cast(lhs) < static_cast(rhs); + return static_cast(lhs) < static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const T lhs, const U rhs) noexcept { - return static_cast(lhs) <= static_cast(rhs); + return static_cast(lhs) <= static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator>(const T lhs, const U rhs) noexcept { - return static_cast(lhs) > static_cast(rhs); + return static_cast(lhs) > static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const T lhs, const U rhs) noexcept { - return static_cast(lhs) >= static_cast(rhs); + return static_cast(lhs) >= static_cast(rhs); } //===================================== @@ -7109,33 +7109,33 @@ BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const T lhs, const U rhs) noe //===================================== template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const T lhs, const U rhs) noexcept { - return static_cast(lhs) + static_cast(rhs); + return static_cast(lhs) + static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const T lhs, const U rhs) noexcept { - return static_cast(lhs) - static_cast(rhs); + return static_cast(lhs) - static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const T lhs, const U rhs) noexcept { - return static_cast(lhs) * static_cast(rhs); + return static_cast(lhs) * static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const T lhs, const U rhs) noexcept { - return static_cast(lhs) / static_cast(rhs); + return static_cast(lhs) / static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const T lhs, const U rhs) noexcept { - return static_cast(lhs) % static_cast(rhs); + return static_cast(lhs) % static_cast(rhs); } //===================================== @@ -7143,49 +7143,49 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const T lhs, const U rhs) //===================================== template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const T lhs, const U rhs) noexcept { - return static_cast(lhs) | static_cast(rhs); + return static_cast(lhs) | static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const T lhs, const U rhs) noexcept { - return static_cast(lhs) & static_cast(rhs); + return static_cast(lhs) & static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const T lhs, const U rhs) noexcept { - return static_cast(lhs) ^ static_cast(rhs); + return static_cast(lhs) ^ static_cast(rhs); } //===================================== // Cross-type Shift Operators //===================================== -BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator<<(const int128 lhs, const uint128 rhs) noexcept { - return lhs << static_cast(rhs); + return lhs << static_cast(rhs); } -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(const uint128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator<<(const uint128 lhs, const int128 rhs) noexcept { - return lhs << static_cast(rhs); + return lhs << static_cast(rhs); } -BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const int128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator>>(const int128 lhs, const uint128 rhs) noexcept { - return lhs >> static_cast(rhs); + return lhs >> static_cast(rhs); } -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator>>(const uint128 lhs, const int128 rhs) noexcept { - return lhs >> static_cast(rhs); + return lhs >> static_cast(rhs); } //===================================== -// int128_t with builtin unsigned __int128 comparison operators +// int128 with builtin unsigned __int128 comparison operators // // These live here (not in int128_imp.hpp) // to avoid C++20 rewritten-candidate ambiguity on MSVC @@ -7193,152 +7193,152 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, con #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) == rhs; + return static_cast(lhs) == rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs == static_cast(rhs); + return lhs == static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) != rhs; + return static_cast(lhs) != rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs != static_cast(rhs); + return lhs != static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) < rhs; + return static_cast(lhs) < rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs < static_cast(rhs); + return lhs < static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) <= rhs; + return static_cast(lhs) <= rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs <= static_cast(rhs); + return lhs <= static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) > rhs; + return static_cast(lhs) > rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs > static_cast(rhs); + return lhs > static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) >= rhs; + return static_cast(lhs) >= rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs >= static_cast(rhs); + return lhs >= static_cast(rhs); } #endif // BOOST_INT128_HAS_INT128 //===================================== -// int128_t with builtin unsigned __int128 binary operators +// int128 with builtin unsigned __int128 binary operators //===================================== #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) | rhs; + return static_cast(lhs) | rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs | static_cast(rhs); + return lhs | static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) & rhs; + return static_cast(lhs) & rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs & static_cast(rhs); + return lhs & static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) ^ rhs; + return static_cast(lhs) ^ rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs ^ static_cast(rhs); + return lhs ^ static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) + rhs; + return static_cast(lhs) + rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs + static_cast(rhs); + return lhs + static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) - rhs; + return static_cast(lhs) - rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs - static_cast(rhs); + return lhs - static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) * rhs; + return static_cast(lhs) * rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs * static_cast(rhs); + return lhs * static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) / rhs; + return static_cast(lhs) / rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs / static_cast(rhs); + return lhs / static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) % rhs; + return static_cast(lhs) % rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs % static_cast(rhs); + return lhs % static_cast(rhs); } #endif // BOOST_INT128_HAS_INT128 @@ -7534,14 +7534,14 @@ namespace int128 { namespace impl { -BOOST_INT128_HOST_DEVICE constexpr int countl_zero_impl(const uint128_t x) noexcept +BOOST_INT128_HOST_DEVICE constexpr int countl_zero_impl(const uint128 x) noexcept { return x.high == 0 ? 64 + detail::countl_zero(x.low) : detail::countl_zero(x.high); } } // namespace impl -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countl_zero(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countl_zero(const uint128 x) noexcept { #if defined(BOOST_INT128_HAS_INT128) && !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) && BOOST_INT128_HAS_BUILTIN(__builtin_clzg) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -7560,38 +7560,38 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countl_zero(const uin #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countl_one(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countl_one(const uint128 x) noexcept { return countl_zero(~x); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int bit_width(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int bit_width(const uint128 x) noexcept { return x ? 128 - countl_zero(x) : 0; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t bit_ceil(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 bit_ceil(const uint128 x) noexcept { // __builtin_stdc_bit_ceil not available, but this is equivalent - return x <= 1U ? static_cast(1) : static_cast(2) << (127 - countl_zero(x - 1)); + return x <= 1U ? static_cast(1) : static_cast(2) << (127 - countl_zero(x - 1)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t bit_floor(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 bit_floor(const uint128 x) noexcept { // __builtin_stdc_bit_floor not available, but this is equivalent - return x == 0U ? static_cast(0) : static_cast(1) << (127 - countl_zero(x)); + return x == 0U ? static_cast(0) : static_cast(1) << (127 - countl_zero(x)); } namespace impl { -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_zero_impl(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_zero_impl(const uint128 x) noexcept { return x.low == 0 ? 64 + detail::countr_zero(x.high) : detail::countr_zero(x.low); } } // namespace impl -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_zero(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_zero(const uint128 x) noexcept { #if defined(BOOST_INT128_HAS_INT128) && !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) && BOOST_INT128_HAS_BUILTIN(__builtin_ctzg) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -7610,19 +7610,19 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_zero(const uin #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_one(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_one(const uint128 x) noexcept { return countr_zero(~x); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t rotl(const uint128_t x, const int s) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 rotl(const uint128 x, const int s) noexcept { // __builtin_stdc_rotate_left not available constexpr auto mask {127U}; return x << (static_cast(s) & mask) | x >> (static_cast(-s) & mask); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t rotr(const uint128_t x, const int s) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 rotr(const uint128 x, const int s) noexcept { // __builtin_stdc_rotate_right not available constexpr auto mask {127U}; @@ -7631,7 +7631,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t rotr(const uint namespace impl { -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount_impl(std::uint64_t x) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount_impl(std::uint64_t x) noexcept { x = x - ((x >> 1U) & UINT64_C(0x5555555555555555)); x = (x & UINT64_C(0x3333333333333333)) + ((x >> 2U) & UINT64_C(0x3333333333333333)); @@ -7641,14 +7641,14 @@ BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount_impl(st } // The exact-match overload above is selected for the 64-bit halves -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount_impl(const uint128_t x) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount_impl(const uint128 x) noexcept { return popcount_impl(x.high) + popcount_impl(x.low); } } // namespace impl -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount(const uint128 x) noexcept { #if defined(BOOST_INT128_HAS_INT128) && !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) && BOOST_INT128_HAS_BUILTIN(__builtin_popcountg) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -7725,14 +7725,14 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::uint64_t byteswap_im return (step16 & UINT64_C(0x00FF00FF00FF00FF)) << 8U | (step16 & UINT64_C(0xFF00FF00FF00FF00)) >> 8U; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap_impl(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 byteswap_impl(const uint128 x) noexcept { return {byteswap_impl(x.low), byteswap_impl(x.high)}; } } // namespace impl -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 byteswap(const uint128 x) noexcept { // The whole-width builtins are deliberately ranked below the paired 64-bit form. // Measured today (7/29/2026) they are a regression: the 128-bit value blocks the loop vectorization @@ -7751,7 +7751,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap(const return impl::byteswap_impl(x); } - return static_cast(__builtin_bswapg(static_cast(x))); + return static_cast(__builtin_bswapg(static_cast(x))); #elif defined(BOOST_INT128_HAS_INT128) && !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) && BOOST_INT128_HAS_BUILTIN(__builtin_bswap128) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -7760,7 +7760,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap(const return impl::byteswap_impl(x); } - return static_cast(__builtin_bswap128(static_cast(x))); + return static_cast(__builtin_bswap128(static_cast(x))); #elif defined(_MSC_VER) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -7780,7 +7780,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap(const #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool has_single_bit(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool has_single_bit(const uint128 x) noexcept { return popcount(x) == 1; } @@ -8049,26 +8049,26 @@ BOOST_INT128_HOST_DEVICE constexpr int from_chars_integer_impl(const char* first } } // namespace impl -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars(const char* first, const char* last, uint128_t& value, int base = 10) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars(const char* first, const char* last, uint128& value, int base = 10) noexcept { - return impl::from_chars_integer_impl(first, last, value, base); + return impl::from_chars_integer_impl(first, last, value, base); } -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars(const char* first, const char* last, int128_t& value, int base = 10) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars(const char* first, const char* last, int128& value, int base = 10) noexcept { - return impl::from_chars_integer_impl(first, last, value, base); + return impl::from_chars_integer_impl(first, last, value, base); } // Parsing entry points for the user-defined literals. Unlike from_chars these skip the // C++ digit separator ' so that literals such as 1'234'567_u128 are accepted. -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_literal(const char* first, const char* last, uint128_t& value, int base = 10) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_literal(const char* first, const char* last, uint128& value, int base = 10) noexcept { - return impl::from_chars_integer_impl(first, last, value, base); + return impl::from_chars_integer_impl(first, last, value, base); } -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_literal(const char* first, const char* last, int128_t& value, int base = 10) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_literal(const char* first, const char* last, int128& value, int base = 10) noexcept { - return impl::from_chars_integer_impl(first, last, value, base); + return impl::from_chars_integer_impl(first, last, value, base); } // Rejects an out of range literal @@ -8077,7 +8077,7 @@ BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_liter #if defined(BOOST_INT128_HAS_GPU_SUPPORT) || defined(BOOST_INT128_DISABLE_EXCEPTIONS) BOOST_INT128_UNREACHABLE; #else - BOOST_INT128_THROW_EXCEPTION(std::out_of_range("Literal is out of range of the target type")); + BOOST_int128HROW_EXCEPTION(std::out_of_range("Literal is out of range of the target type")); #endif } @@ -8087,7 +8087,7 @@ BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_liter #if defined(BOOST_INT128_HAS_GPU_SUPPORT) || defined(BOOST_INT128_DISABLE_EXCEPTIONS) BOOST_INT128_UNREACHABLE; #else - BOOST_INT128_THROW_EXCEPTION(std::invalid_argument("Literal is not a valid integer")); + BOOST_int128HROW_EXCEPTION(std::invalid_argument("Literal is not a valid integer")); #endif } @@ -8229,7 +8229,7 @@ static_assert(sizeof(upper_case_digit_table) == sizeof(char) * 16, "10 numbers, #endif // !__NVCC__ -BOOST_INT128_HOST_DEVICE constexpr char* mini_to_chars(char (&buffer)[mini_to_chars_buffer_size], uint128_t v, const int base, const bool uppercase) noexcept +BOOST_INT128_HOST_DEVICE constexpr char* mini_to_chars(char (&buffer)[mini_to_chars_buffer_size], uint128 v, const int base, const bool uppercase) noexcept { #if defined(BOOST_INT128_HAS_GPU_SUPPORT) constexpr char lower_case_digit_table[] = { @@ -8296,28 +8296,28 @@ BOOST_INT128_HOST_DEVICE constexpr char* mini_to_chars(char (&buffer)[mini_to_ch return last; } -BOOST_INT128_HOST_DEVICE constexpr char* mini_to_chars(char (&buffer)[mini_to_chars_buffer_size], const int128_t v, const int base, const bool uppercase) noexcept +BOOST_INT128_HOST_DEVICE constexpr char* mini_to_chars(char (&buffer)[mini_to_chars_buffer_size], const int128 v, const int base, const bool uppercase) noexcept { char* p {nullptr}; if (v < 0) { // We cant negate the min value inside the signed type, but we know what the result will be - if (v == (std::numeric_limits::min)()) + if (v == (std::numeric_limits::min)()) { - p = mini_to_chars(buffer, uint128_t{UINT64_C(0x8000000000000000), 0}, base, uppercase); + p = mini_to_chars(buffer, uint128{UINT64_C(0x8000000000000000), 0}, base, uppercase); } else { const auto neg_v {-v}; - p = mini_to_chars(buffer, static_cast(neg_v), base, uppercase); + p = mini_to_chars(buffer, static_cast(neg_v), base, uppercase); } *--p = '-'; } else { - p = mini_to_chars(buffer, static_cast(v), base, uppercase); + p = mini_to_chars(buffer, static_cast(v), base, uppercase); } return p; @@ -8387,7 +8387,7 @@ namespace detail { template struct streamable_overload { - static constexpr bool value = std::is_same::value || std::is_same::value; + static constexpr bool value = std::is_same::value || std::is_same::value; }; template @@ -8539,44 +8539,44 @@ namespace boost { namespace int128 { namespace literals { -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_u128(const char* str) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_u128(const char* str) noexcept { - return detail::parse_literal(str, str + detail::strlen(str)); + return detail::parse_literal(str, str + detail::strlen(str)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_U128(const char* str) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_U128(const char* str) noexcept { - return detail::parse_literal(str, str + detail::strlen(str)); + return detail::parse_literal(str, str + detail::strlen(str)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_u128(const char* str, std::size_t len) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_u128(const char* str, std::size_t len) noexcept { - return detail::parse_literal(str, str + len); + return detail::parse_literal(str, str + len); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_U128(const char* str, std::size_t len) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_U128(const char* str, std::size_t len) noexcept { - return detail::parse_literal(str, str + len); + return detail::parse_literal(str, str + len); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_i128(const char* str) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_i128(const char* str) noexcept { - return detail::parse_literal(str, str + detail::strlen(str)); + return detail::parse_literal(str, str + detail::strlen(str)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_I128(const char* str) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_I128(const char* str) noexcept { - return detail::parse_literal(str, str + detail::strlen(str)); + return detail::parse_literal(str, str + detail::strlen(str)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_i128(const char* str, std::size_t len) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_i128(const char* str, std::size_t len) noexcept { - return detail::parse_literal(str, str + len); + return detail::parse_literal(str, str + len); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_I128(const char* str, std::size_t len) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_I128(const char* str, std::size_t len) noexcept { - return detail::parse_literal(str, str + len); + return detail::parse_literal(str, str + len); } } // namespace literals @@ -8629,17 +8629,17 @@ namespace int128 { BOOST_INT128_EXPORT struct u128div_t { - uint128_t quot; - uint128_t rem; + uint128 quot; + uint128 rem; }; BOOST_INT128_EXPORT struct i128div_t { - int128_t quot; - int128_t rem; + int128 quot; + int128 rem; }; -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr u128div_t div(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr u128div_t div(const uint128 x, const uint128 y) noexcept { if (BOOST_INT128_UNLIKELY(x == 0U || y == 0U)) { @@ -8671,15 +8671,15 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr u128div_t div(const uint1 } } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr i128div_t div(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr i128div_t div(const int128 x, const int128 y) noexcept { if (BOOST_INT128_UNLIKELY(x == 0 || y == 0)) { return i128div_t{0, 0}; } - const auto abs_lhs {static_cast(abs(x))}; - const auto abs_rhs {static_cast(abs(y))}; + const auto abs_lhs {static_cast(abs(x))}; + const auto abs_rhs {static_cast(abs(y))}; if (abs_rhs > abs_lhs) { @@ -8695,15 +8695,15 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr i128div_t div(const int12 { const auto builtin_x {static_cast(x)}; const auto builtin_y {static_cast(y)}; - return i128div_t{static_cast(builtin_x / builtin_y), - static_cast(builtin_x % builtin_y)}; + return i128div_t{static_cast(builtin_x / builtin_y), + static_cast(builtin_x % builtin_y)}; } #endif const auto unsigned_res {div(abs_lhs, abs_rhs)}; - i128div_t res {static_cast(unsigned_res.quot), static_cast(unsigned_res.rem)}; + i128div_t res {static_cast(unsigned_res.quot), static_cast(unsigned_res.rem)}; res.quot = negative_quot ? -res.quot : res.quot; res.rem = negative_rem ? -res.rem : res.rem; @@ -8743,8 +8743,8 @@ struct reduced_integers std::is_same::value || std::is_same::value || std::is_same::value || - std::is_same::value || - std::is_same::value}; + std::is_same::value || + std::is_same::value}; }; #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) @@ -8763,25 +8763,25 @@ BOOST_INT128_INLINE_CONSTEXPR bool is_reduced_integer_v {reduced_integers::max)(); + return (std::numeric_limits::max)(); } return z; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_sub(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 saturating_sub(const uint128 x, const uint128 y) noexcept { const auto z {x - y}; if (z > x) { - return (std::numeric_limits::min)(); + return (std::numeric_limits::min)(); } return z; @@ -8793,7 +8793,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_sub( # pragma warning(disable : 4146) // Unary minus applied to unsigned type #endif -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_add(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 saturating_add(const int128 x, const int128 y) noexcept { // Detect overflow BEFORE the addition to avoid signed overflow UB. // When both are non-negative: overflow iff x > max - y (subtraction safe: max - non_negative >= 0) @@ -8802,23 +8802,23 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_add(c if (x.signed_high() >= 0 && y.signed_high() >= 0) { - if (x > (std::numeric_limits::max)() - y) + if (x > (std::numeric_limits::max)() - y) { - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } } else if (x.signed_high() < 0 && y.signed_high() < 0) { - if (x < (std::numeric_limits::min)() - y) + if (x < (std::numeric_limits::min)() - y) { - return (std::numeric_limits::min)(); + return (std::numeric_limits::min)(); } } return x + y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_sub(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 saturating_sub(const int128 x, const int128 y) noexcept { // Detect overflow BEFORE the subtraction to avoid signed overflow UB. // Positive overflow: x >= 0 and y < 0 and x > max + y (safe: max + negative < max) @@ -8827,16 +8827,16 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_sub(c if (x.signed_high() >= 0 && y.signed_high() < 0) { - if (x > (std::numeric_limits::max)() + y) + if (x > (std::numeric_limits::max)() + y) { - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } } else if (x.signed_high() < 0 && y.signed_high() >= 0) { - if (x < (std::numeric_limits::min)() + y) + if (x < (std::numeric_limits::min)() + y) { - return (std::numeric_limits::min)(); + return (std::numeric_limits::min)(); } } @@ -8847,51 +8847,51 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_sub(c # pragma warning(pop) #endif -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_mul(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 saturating_mul(const uint128 x, const uint128 y) noexcept { const auto x_bits {bit_width(x)}; const auto y_bits {bit_width(y)}; - if ((x_bits + y_bits) > std::numeric_limits::digits) + if ((x_bits + y_bits) > std::numeric_limits::digits) { - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } return x * y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_mul(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 saturating_mul(const int128 x, const int128 y) noexcept { - const auto x_bits {bit_width(static_cast(abs(x)))}; - const auto y_bits {bit_width(static_cast(abs(y)))}; + const auto x_bits {bit_width(static_cast(abs(x)))}; + const auto y_bits {bit_width(static_cast(abs(y)))}; - if ((x_bits + y_bits) > std::numeric_limits::digits) + if ((x_bits + y_bits) > std::numeric_limits::digits) { if ((x < 0) != (y < 0)) { - return (std::numeric_limits::min)(); + return (std::numeric_limits::min)(); } else { - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } } - const int128_t res {x * y}; + const int128 res {x * y}; return res; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_div(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 saturating_div(const uint128 x, const uint128 y) noexcept { return x / y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_div(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 saturating_div(const int128 x, const int128 y) noexcept { - if (BOOST_INT128_UNLIKELY(x == (std::numeric_limits::min)() && y == -1)) + if (BOOST_INT128_UNLIKELY(x == (std::numeric_limits::min)() && y == -1)) { // This is the only possible case of overflow - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } return x / y; @@ -8903,15 +8903,15 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_div(c #endif BOOST_INT128_EXPORT template , bool> = true> -BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const uint128_t value) noexcept +BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const uint128 value) noexcept { - BOOST_INT128_IF_CONSTEXPR (std::is_same::value) + BOOST_INT128_IF_CONSTEXPR (std::is_same::value) { return static_cast(value); } else { - if (value > static_cast((std::numeric_limits::max)())) + if (value > static_cast((std::numeric_limits::max)())) { return (std::numeric_limits::max)(); } @@ -8925,16 +8925,16 @@ BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const uint128_t va #endif BOOST_INT128_EXPORT template , bool> = true> -BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const int128_t value) noexcept +BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const int128 value) noexcept { - BOOST_INT128_IF_CONSTEXPR (std::is_same::value) + BOOST_INT128_IF_CONSTEXPR (std::is_same::value) { return static_cast(value); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - else BOOST_INT128_IF_CONSTEXPR (std::is_same::value || std::is_same::value) + else BOOST_INT128_IF_CONSTEXPR (std::is_same::value || std::is_same::value) #else - else BOOST_INT128_IF_CONSTEXPR (std::is_same::value) + else BOOST_INT128_IF_CONSTEXPR (std::is_same::value) #endif { // We can't possibly have overflow in this case @@ -8942,11 +8942,11 @@ BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const int128_t val } else { - if (value > static_cast((std::numeric_limits::max)())) + if (value > static_cast((std::numeric_limits::max)())) { return (std::numeric_limits::max)(); } - else if (value < static_cast((std::numeric_limits::min)())) + else if (value < static_cast((std::numeric_limits::min)())) { return (std::numeric_limits::min)(); } @@ -8957,7 +8957,7 @@ BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const int128_t val namespace detail { -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::uint64_t gcd64(std::uint64_t x, std::uint64_t y) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::uint64_t gcd64(std::uint64_t x, std::uint64_t y) noexcept { if (x == 0) { @@ -8989,7 +8989,7 @@ BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::uint64_t gcd64( } // namespace detail -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t gcd(uint128_t a, uint128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 gcd(uint128 a, uint128 b) noexcept { // Base case if (a == 0U) @@ -9013,7 +9013,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t gcd(uint128_t a if (a > b) { - const uint128_t temp {a}; + const uint128 temp {a}; a = b; b = temp; } @@ -9023,12 +9023,12 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t gcd(uint128_t a // Stop doing 128-bit math as soon as we can const auto g {detail::gcd64(a.low, b.low)}; - return uint128_t{0, g} << shift; + return uint128{0, g} << shift; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t gcd(const int128_t a, const int128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 gcd(const int128 a, const int128 b) noexcept { - return static_cast(gcd(static_cast(abs(a)), static_cast(abs(b)))); + return static_cast(gcd(static_cast(abs(a)), static_cast(abs(b)))); } // For unknown reasons this implementation fails for MSVC x86 only in release mode @@ -9036,11 +9036,11 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t gcd(const int128 // but very slow impl that we know works. #if !(defined(_M_IX86) && !defined(_NDEBUG)) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(const uint128_t a, const uint128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 lcm(const uint128 a, const uint128 b) noexcept { if (a == 0U || b == 0U) { - return static_cast(0); + return static_cast(0); } // Calculate GCD first @@ -9052,11 +9052,11 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(const uint1 #else -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(uint128_t a, uint128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 lcm(uint128 a, uint128 b) noexcept { if (a == 0U || b == 0U) { - return uint128_t{0}; + return uint128{0}; } @@ -9074,7 +9074,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(uint128_t a std::swap(a, b); } - uint128_t lcm{a}; + uint128 lcm{a}; while (lcm % b != 0U) { @@ -9086,12 +9086,12 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(uint128_t a #endif -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t lcm(const int128_t a, const int128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 lcm(const int128 a, const int128 b) noexcept { - return static_cast(lcm(static_cast(abs(a)), static_cast(abs(b)))); + return static_cast(lcm(static_cast(abs(a)), static_cast(abs(b)))); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t midpoint(const uint128_t a, const uint128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 midpoint(const uint128 a, const uint128 b) noexcept { // Bit manipulation formula works for unsigned integers auto mid {(a & b) + ((a ^ b) >> 1)}; @@ -9105,7 +9105,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t midpoint(const return mid; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t midpoint(const int128_t a, const int128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 midpoint(const int128 a, const int128 b) noexcept { // For signed integers, we use a + (b - a) / 2 or a - (a - b) / 2 // The subtraction is done in unsigned arithmetic to handle overflow correctly @@ -9113,10 +9113,10 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t midpoint(const i // // Use direct field access for both the uint128 construction and the // comparison to avoid NVCC host compiler issues with operator<= and - // static_cast on int128_t for large-magnitude values + // static_cast on int128 for large-magnitude values - const uint128_t ua {a.high, a.low}; - const uint128_t ub {b.high, b.low}; + const uint128 ua {a.high, a.low}; + const uint128 ub {b.high, b.low}; const bool a_le_b {a.high == b.high ? a.low <= b.low : a.signed_high() < b.signed_high()}; @@ -9124,13 +9124,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t midpoint(const i { // diff = b - a (computed in unsigned, handles wrap-around correctly) const auto diff {ub - ua}; - return a + static_cast(diff / 2U); + return a + static_cast(diff / 2U); } else { // diff = a - b (computed in unsigned, handles wrap-around correctly) const auto diff {ua - ub}; - return a - static_cast(diff / 2U); + return a - static_cast(diff / 2U); } } @@ -9169,7 +9169,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const div_re namespace detail { // -1 when the exact quotient of x / y is negative, and 1 otherwise -BOOST_INT128_HOST_DEVICE constexpr int quotient_sign(const int128_t x, const int128_t y) noexcept +BOOST_INT128_HOST_DEVICE constexpr int quotient_sign(const int128 x, const int128 y) noexcept { return (x < 0) != (y < 0) ? -1 : 1; } @@ -9177,12 +9177,12 @@ BOOST_INT128_HOST_DEVICE constexpr int quotient_sign(const int128_t x, const int // Applies the quotient offset d (-1, 0, or 1) to a truncated division result, and returns the // remainder matching the adjusted quotient. The remainder is evaluated in unsigned arithmetic // so that the d * y term cannot overflow when y is INT128_MIN. -BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const i128div_t truncated, const int128_t y, const int d) noexcept +BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const i128div_t truncated, const int128 y, const int d) noexcept { - const uint128_t unsigned_rem {truncated.rem.high, truncated.rem.low}; - const uint128_t unsigned_y {y.high, y.low}; + const uint128 unsigned_rem {truncated.rem.high, truncated.rem.low}; + const uint128 unsigned_y {y.high, y.low}; - uint128_t rem {unsigned_rem}; + uint128 rem {unsigned_rem}; if (d > 0) { @@ -9193,14 +9193,14 @@ BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const i1 rem = unsigned_rem + unsigned_y; } - return div_result{truncated.quot + d, static_cast(rem)}; + return div_result{truncated.quot + d, static_cast(rem)}; } // An unsigned quotient is never rounded down, so the only offsets are 0 and 1. The remainder // of an incremented quotient is negative, and is returned reduced modulo 2^128. -BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const u128div_t truncated, const uint128_t y, const bool increment) noexcept +BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const u128div_t truncated, const uint128 y, const bool increment) noexcept { - return div_result{increment ? truncated.quot + 1U : truncated.quot, + return div_result{increment ? truncated.quot + 1U : truncated.quot, increment ? truncated.rem - y : truncated.rem}; } @@ -9208,31 +9208,31 @@ BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const u // magnitude when the remainder is more than half the divisor. truncate_ties selects the strict // form, which both breaks an exact tie towards zero and recovers the bit that abs(y) / 2 drops // when y is odd. -BOOST_INT128_HOST_DEVICE constexpr bool nearest_increment(const uint128_t abs_rem, const uint128_t abs_half_y, const bool truncate_ties) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool nearest_increment(const uint128 abs_rem, const uint128 abs_half_y, const bool truncate_ties) noexcept { return truncate_ties ? abs_rem > abs_half_y : abs_rem >= abs_half_y; } // Magnitude of the remainder of a truncated signed division. The magnitude is always less // than abs(y), so it is representable for every valid divisor. -BOOST_INT128_HOST_DEVICE constexpr uint128_t abs_remainder(const i128div_t truncated) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 abs_remainder(const i128div_t truncated) noexcept { - return static_cast(abs(truncated.rem)); + return static_cast(abs(truncated.rem)); } // floor(abs(y) / 2), exact for every y including INT128_MIN -BOOST_INT128_HOST_DEVICE constexpr uint128_t abs_half_divisor(const int128_t y) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 abs_half_divisor(const int128 y) noexcept { - return static_cast(abs(y)) >> 1U; + return static_cast(abs(y)) >> 1U; } // An odd divisor cannot produce an exact tie, so every ties function truncates on it -BOOST_INT128_HOST_DEVICE constexpr bool is_odd(const int128_t x) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool is_odd(const int128 x) noexcept { return (x.low & 1U) != 0U; } -BOOST_INT128_HOST_DEVICE constexpr bool is_odd(const uint128_t x) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool is_odd(const uint128 x) noexcept { return (x.low & 1U) != 0U; } @@ -9240,180 +9240,180 @@ BOOST_INT128_HOST_DEVICE constexpr bool is_odd(const uint128_t x) noexcept } // namespace detail // Rounds towards zero, which is what operator/ already does -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_zero(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; - return div_result{truncated.quot, truncated.rem}; + return div_result{truncated.quot, truncated.rem}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_zero(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; - return div_result{truncated.quot, truncated.rem}; + return div_result{truncated.quot, truncated.rem}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_to_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_to_zero(const uint128 x, const uint128 y) noexcept { return x / y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_to_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_to_zero(const int128 x, const int128 y) noexcept { return x / y; } // Rounds away from zero, so the quotient grows in magnitude unless the division is exact -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_away_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_away_zero(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, truncated.rem != 0U); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_away_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_away_zero(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, truncated.rem != 0 ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_away_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_away_zero(const uint128 x, const uint128 y) noexcept { return div_rem_away_zero(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_away_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_away_zero(const int128 x, const int128 y) noexcept { return div_rem_away_zero(x, y).quotient; } // Rounds towards positive infinity, which for an unsigned quotient is away from zero -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_pos_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_pos_inf(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, truncated.rem != 0U); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_pos_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_pos_inf(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto adjust {truncated.rem != 0 && detail::quotient_sign(x, y) > 0}; return detail::offset_quotient(truncated, y, adjust ? 1 : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_to_pos_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_to_pos_inf(const uint128 x, const uint128 y) noexcept { return div_rem_to_pos_inf(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_to_pos_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_to_pos_inf(const int128 x, const int128 y) noexcept { return div_rem_to_pos_inf(x, y).quotient; } // Rounds towards negative infinity, which for an unsigned quotient is truncation -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_neg_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_neg_inf(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; - return div_result{truncated.quot, truncated.rem}; + return div_result{truncated.quot, truncated.rem}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_neg_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_neg_inf(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto adjust {truncated.rem != 0 && detail::quotient_sign(x, y) < 0}; return detail::offset_quotient(truncated, y, adjust ? -1 : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_to_neg_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_to_neg_inf(const uint128 x, const uint128 y) noexcept { return x / y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_to_neg_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_to_neg_inf(const int128 x, const int128 y) noexcept { return div_rem_to_neg_inf(x, y).quotient; } // Euclidean division, whose remainder is always in [0, abs(y)). Only a negative remainder // needs fixing, and growing the quotient magnitude by one makes the remainder positive. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_euclid(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_euclid(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; - return div_result{truncated.quot, truncated.rem}; + return div_result{truncated.quot, truncated.rem}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_euclid(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_euclid(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, truncated.rem < 0 ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_euclid(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_euclid(const uint128 x, const uint128 y) noexcept { return x / y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_euclid(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_euclid(const int128 x, const int128 y) noexcept { return div_rem_euclid(x, y).quotient; } // Rounds to nearest, breaking an exact tie towards zero -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_zero(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, detail::nearest_increment(truncated.rem, y >> 1U, true)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_zero(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto increment {detail::nearest_increment(detail::abs_remainder(truncated), detail::abs_half_divisor(y), true)}; return detail::offset_quotient(truncated, y, increment ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_to_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_to_zero(const uint128 x, const uint128 y) noexcept { return div_rem_ties_to_zero(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_to_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_to_zero(const int128 x, const int128 y) noexcept { return div_rem_ties_to_zero(x, y).quotient; } // Rounds to nearest, breaking an exact tie away from zero -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_away_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_away_zero(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, detail::nearest_increment(truncated.rem, y >> 1U, detail::is_odd(y))); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_away_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_away_zero(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto increment {detail::nearest_increment(detail::abs_remainder(truncated), detail::abs_half_divisor(y), detail::is_odd(y))}; return detail::offset_quotient(truncated, y, increment ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_away_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_away_zero(const uint128 x, const uint128 y) noexcept { return div_rem_ties_away_zero(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_away_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_away_zero(const int128 x, const int128 y) noexcept { return div_rem_ties_away_zero(x, y).quotient; } // Rounds to nearest, breaking an exact tie towards positive infinity. A tie only grows the // magnitude when the quotient is positive. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_pos_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_pos_inf(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, detail::nearest_increment(truncated.rem, y >> 1U, detail::is_odd(y))); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_pos_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_pos_inf(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto sign {detail::quotient_sign(x, y)}; @@ -9421,25 +9421,25 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_ return detail::offset_quotient(truncated, y, increment ? sign : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_to_pos_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_to_pos_inf(const uint128 x, const uint128 y) noexcept { return div_rem_ties_to_pos_inf(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_to_pos_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_to_pos_inf(const int128 x, const int128 y) noexcept { return div_rem_ties_to_pos_inf(x, y).quotient; } // Rounds to nearest, breaking an exact tie towards negative infinity. A tie only grows the // magnitude when the quotient is negative, so an unsigned tie always truncates. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_neg_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_neg_inf(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, detail::nearest_increment(truncated.rem, y >> 1U, true)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_neg_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_neg_inf(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto sign {detail::quotient_sign(x, y)}; @@ -9447,26 +9447,26 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_ return detail::offset_quotient(truncated, y, increment ? sign : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_to_neg_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_to_neg_inf(const uint128 x, const uint128 y) noexcept { return div_rem_ties_to_neg_inf(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_to_neg_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_to_neg_inf(const int128 x, const int128 y) noexcept { return div_rem_ties_to_neg_inf(x, y).quotient; } // Rounds to nearest, breaking an exact tie to the odd quotient, so a tie only grows the // magnitude when truncation would have produced an even quotient -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_odd(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_odd(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; const auto increment {detail::nearest_increment(truncated.rem, y >> 1U, detail::is_odd(y) || detail::is_odd(truncated.quot))}; return detail::offset_quotient(truncated, y, increment); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_odd(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_odd(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto truncate_ties {detail::is_odd(y) || detail::is_odd(truncated.quot)}; @@ -9474,26 +9474,26 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_ return detail::offset_quotient(truncated, y, increment ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_to_odd(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_to_odd(const uint128 x, const uint128 y) noexcept { return div_rem_ties_to_odd(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_to_odd(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_to_odd(const int128 x, const int128 y) noexcept { return div_rem_ties_to_odd(x, y).quotient; } // Rounds to nearest, breaking an exact tie to the even quotient, so a tie only grows the // magnitude when truncation would have produced an odd quotient -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_even(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_even(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; const auto increment {detail::nearest_increment(truncated.rem, y >> 1U, detail::is_odd(y) || !detail::is_odd(truncated.quot))}; return detail::offset_quotient(truncated, y, increment); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_even(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_even(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto truncate_ties {detail::is_odd(y) || !detail::is_odd(truncated.quot)}; @@ -9501,31 +9501,31 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_ return detail::offset_quotient(truncated, y, increment ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_to_even(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_to_even(const uint128 x, const uint128 y) noexcept { return div_rem_ties_to_even(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_to_even(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_to_even(const int128 x, const int128 y) noexcept { return div_rem_ties_to_even(x, y).quotient; } // The Euclidean remainder, which is always in [0, abs(y)). Only a negative remainder needs // fixing, and abs(y) is added in unsigned arithmetic so that INT128_MIN is handled. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t rem_euclid(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 rem_euclid(const uint128 x, const uint128 y) noexcept { return x % y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t rem_euclid(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 rem_euclid(const int128 x, const int128 y) noexcept { const auto rem {x % y}; if (rem < 0) { - const uint128_t unsigned_rem {rem.high, rem.low}; - return static_cast(unsigned_rem + static_cast(abs(y))); + const uint128 unsigned_rem {rem.high, rem.low}; + return static_cast(unsigned_rem + static_cast(abs(y))); } return rem; @@ -9714,14 +9714,14 @@ constexpr auto parse_impl(ParseContext& ctx) is_upper = true; break; default: // LCOV_EXCL_LINE - BOOST_INT128_THROW_EXCEPTION(std::format_error("Unsupported format specifier")); // LCOV_EXCL_LINE + BOOST_int128HROW_EXCEPTION(std::format_error("Unsupported format specifier")); // LCOV_EXCL_LINE } } // Verify we're at the closing brace if (it != ctx.end() && *it != '}') { - BOOST_INT128_THROW_EXCEPTION(std::format_error("Expected '}' in format string")); // LCOV_EXCL_LINE + BOOST_int128HROW_EXCEPTION(std::format_error("Expected '}' in format string")); // LCOV_EXCL_LINE } return std::make_tuple(base, padding_digits, sign, is_upper, prefix, zero_pad, fill_char, align, it); @@ -9730,7 +9730,7 @@ constexpr auto parse_impl(ParseContext& ctx) template struct is_library_type_impl { - static constexpr bool value {std::is_same_v || std::is_same_v}; + static constexpr bool value {std::is_same_v || std::is_same_v}; }; template @@ -9786,31 +9786,31 @@ struct formatter { char buffer[boost::int128::detail::mini_to_chars_buffer_size]; bool isneg {false}; - boost::int128::uint128_t abs_v {}; + boost::int128::uint128 abs_v {}; - if constexpr (std::is_same_v) + if constexpr (std::is_same_v) { if (v < 0) { isneg = true; - // Can't negate int128_t::min(), handle specially + // Can't negate int128::min(), handle specially if (v == (std::numeric_limits::min)()) { - abs_v = boost::int128::uint128_t{UINT64_C(0x8000000000000000), 0}; + abs_v = boost::int128::uint128{UINT64_C(0x8000000000000000), 0}; } else { - abs_v = static_cast(-v); + abs_v = static_cast(-v); } } else { - abs_v = static_cast(v); + abs_v = static_cast(v); } } else { - abs_v = static_cast(v); + abs_v = static_cast(v); } const auto end = boost::int128::detail::mini_to_chars(buffer, abs_v, base, is_upper); @@ -9914,7 +9914,7 @@ struct formatter { s.insert(s.begin(), ' '); } - if constexpr (std::is_same_v) + if constexpr (std::is_same_v) { if (isneg) { @@ -9923,7 +9923,7 @@ struct formatter } break; case boost::int128::detail::sign_option::negative: - if constexpr (std::is_same_v) + if constexpr (std::is_same_v) { if (isneg) { @@ -10008,10 +10008,10 @@ struct formatter // [amalgamate] skipped duplicate include of boost/int128/detail/uint128_imp.hpp #include -#define BOOST_INT128_UINT128_MAX boost::int128::uint128_t{UINT64_MAX, UINT64_MAX} +#define BOOST_INT128_UINT128_MAX boost::int128::uint128{UINT64_MAX, UINT64_MAX} -#define BOOST_INT128_INT128_MIN boost::int128::int128_t{INT64_MIN, 0} -#define BOOST_INT128_INT128_MAX boost::int128::int128_t{INT64_MAX, UINT64_MAX} +#define BOOST_INT128_INT128_MIN boost::int128::int128{INT64_MIN, 0} +#define BOOST_INT128_INT128_MAX boost::int128::int128{INT64_MAX, UINT64_MAX} #endif // BOOST_INT128_CLIMITS_HPP // ===== END boost/int128/climits.hpp ===== @@ -10037,7 +10037,7 @@ namespace boost { namespace int128 { template -auto to_string(const T& value) -> std::enable_if_t<(std::is_same::value || std::is_same::value), std::string> +auto to_string(const T& value) -> std::enable_if_t<(std::is_same::value || std::is_same::value), std::string> { char buffer[detail::mini_to_chars_buffer_size]; const auto last {detail::mini_to_chars(buffer, value, 10, false)}; @@ -10045,7 +10045,7 @@ auto to_string(const T& value) -> std::enable_if_t<(std::is_same::v } template -auto to_wstring(const T& value) -> std::enable_if_t<(std::is_same::value || std::is_same::value), std::wstring> +auto to_wstring(const T& value) -> std::enable_if_t<(std::is_same::value || std::is_same::value), std::wstring> { char buffer[detail::mini_to_chars_buffer_size]; const auto last {detail::mini_to_chars(buffer, value, 10, false)}; @@ -10084,9 +10084,9 @@ namespace int128 { namespace detail { // Modular addition for 128-bit operands assuming 0 <= a, b < m -BOOST_INT128_HOST_DEVICE constexpr uint128_t addmod(const uint128_t a, const uint128_t b, const uint128_t m) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 addmod(const uint128 a, const uint128 b, const uint128 m) noexcept { - const uint128_t s {a + b}; + const uint128 s {a + b}; if (s < a || s >= m) { @@ -10097,9 +10097,9 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t addmod(const uint128_t a, const uin } // Modular multiplication via shift-and-add for the full 128-bit modulus case -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t mulmod_shift(uint128_t a, uint128_t b, const uint128_t m) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 mulmod_shift(uint128 a, uint128 b, const uint128 m) noexcept { - uint128_t result {0}; + uint128 result {0}; while (b != 0U) { @@ -10118,42 +10118,42 @@ BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t mulmod_shi // Modular multiplication when the modulus fits in 64 bits BOOST_INT128_HOST_DEVICE constexpr std::uint64_t mulmod_word(const std::uint64_t a, const std::uint64_t b, const std::uint64_t m) noexcept { - return ((uint128_t{a} * uint128_t{b}) % uint128_t{m}).low; + return ((uint128{a} * uint128{b}) % uint128{m}).low; } } // namespace detail // Computes (base ^ exp) mod m using fast modular exponentiation with // optimizations specific to the boost::int128 library types -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t powm(uint128_t base, uint128_t exp, const uint128_t m) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 powm(uint128 base, uint128 exp, const uint128 m) noexcept { if (BOOST_INT128_UNLIKELY(m == 0U)) { - return uint128_t{0}; + return uint128{0}; } if (m == 1U) { - return uint128_t{0}; + return uint128{0}; } if (exp == 0U) { - return uint128_t{1}; + return uint128{1}; } base %= m; if (base == 0U) { - return uint128_t{0}; + return uint128{0}; } // Power-of-two modulus: reduction is just a bitmask. if (has_single_bit(m)) { - const uint128_t mask {m - 1U}; - uint128_t result {1}; + const uint128 mask {m - 1U}; + uint128 result {1}; while (exp != 0U) { @@ -10187,12 +10187,12 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t powm(uint128_t exp >>= 1; } - return uint128_t{result}; + return uint128{result}; } // General 128-bit modulus: shift-and-add for each squaring keeps every // intermediate strictly below m without needing a 256-bit product. - uint128_t result {1}; + uint128 result {1}; while (exp != 0U) { @@ -10209,36 +10209,36 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t powm(uint128_t } // Signed overload. Returns the non-negative residue in [0, m) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t powm(const int128_t base, const int128_t exp, const int128_t m) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 powm(const int128 base, const int128 exp, const int128 m) noexcept { if (BOOST_INT128_UNLIKELY(m <= 0 || exp < 0)) { - return int128_t{0}; + return int128{0}; } - const uint128_t um {static_cast(m)}; + const uint128 um {static_cast(m)}; - uint128_t ub {}; + uint128 ub {}; if (base.signed_high() < 0) { - const uint128_t magnitude {static_cast(abs(base))}; - const uint128_t r {magnitude % um}; - ub = r == 0U ? uint128_t{0} : static_cast(um - r); + const uint128 magnitude {static_cast(abs(base))}; + const uint128 r {magnitude % um}; + ub = r == 0U ? uint128{0} : static_cast(um - r); } else { - ub = static_cast(base) % um; + ub = static_cast(base) % um; } - return static_cast(powm(ub, static_cast(exp), um)); + return static_cast(powm(ub, static_cast(exp), um)); } // Computes base^exp using exponentiation by squaring. The result is reduced // modulo 2^128, mirroring the wrap-around behavior of operator*. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t ipow(uint128_t base, std::uint64_t exp) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 ipow(uint128 base, std::uint64_t exp) noexcept { - uint128_t result {1}; + uint128 result {1}; while (exp != 0U) { @@ -10259,9 +10259,9 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t ipow(uint128_t } // Signed overload. Wraps modulo 2^128 on overflow, matching operator*. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t ipow(int128_t base, std::uint64_t exp) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 ipow(int128 base, std::uint64_t exp) noexcept { - int128_t result {1}; + int128 result {1}; while (exp != 0U) { @@ -10282,7 +10282,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t ipow(int128_t ba } // Integer square root: returns floor(sqrt(n)). -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t isqrt(const uint128_t n) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 isqrt(const uint128 n) noexcept { if (n < 2U) { @@ -10290,11 +10290,11 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t isqrt(const uin } // 2^ceil(bit_width(n)/2) is the smallest power of two whose square exceeds n. - uint128_t x {uint128_t{1} << ((bit_width(n) + 1) / 2)}; + uint128 x {uint128{1} << ((bit_width(n) + 1) / 2)}; while (true) { - const uint128_t y {(x + n / x) >> 1}; + const uint128 y {(x + n / x) >> 1}; if (y >= x) { @@ -10306,14 +10306,14 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t isqrt(const uin } // Signed overload. Negative inputs are documented to return 0. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t isqrt(const int128_t n) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 isqrt(const int128 n) noexcept { if (BOOST_INT128_UNLIKELY(n < 0)) { - return int128_t{0}; + return int128{0}; } - return static_cast(isqrt(static_cast(n))); + return static_cast(isqrt(static_cast(n))); } namespace detail { @@ -10326,22 +10326,22 @@ struct valid_checked_type : std::integral_constant::va !std::is_same::value> {}; template <> -struct valid_checked_type : std::true_type {}; +struct valid_checked_type : std::true_type {}; template <> -struct valid_checked_type : std::true_type {}; +struct valid_checked_type : std::true_type {}; -// Widen an integer operand to its 128-bit two's complement bit pattern, returned as a uint128_t +// Widen an integer operand to its 128-bit two's complement bit pattern, returned as a uint128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t ckd_widen(const T value) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 ckd_widen(const T value) noexcept { BOOST_INT128_IF_CONSTEXPR (std::numeric_limits::is_signed) { - return static_cast(static_cast(value)); + return static_cast(static_cast(value)); } else { - return static_cast(value); + return static_cast(value); } } @@ -10349,35 +10349,35 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t ckd_widen(const T value) noexcept // image. magnitude is the absolute value; negative records the sign. struct ckd_operand { - uint128_t raw; - uint128_t magnitude; + uint128 raw; + uint128 magnitude; bool negative; }; template BOOST_INT128_HOST_DEVICE constexpr ckd_operand ckd_decompose(const T value) noexcept { - const uint128_t raw {ckd_widen(value)}; + const uint128 raw {ckd_widen(value)}; const bool negative {std::numeric_limits::is_signed && ((raw >> 127) != 0U)}; - return ckd_operand{raw, negative ? uint128_t{0} - raw : raw, negative}; + return ckd_operand{raw, negative ? uint128{0} - raw : raw, negative}; } // Exact signed sum of two operands given as (magnitude, sign). carry marks a // 129th bit, which no 128-bit or narrower target can represent. struct ckd_sum_result { - uint128_t magnitude; + uint128 magnitude; bool negative; bool carry; }; -BOOST_INT128_HOST_DEVICE constexpr ckd_sum_result ckd_signed_sum(const uint128_t a_magnitude, const bool a_negative, - const uint128_t b_magnitude, const bool b_negative) noexcept +BOOST_INT128_HOST_DEVICE constexpr ckd_sum_result ckd_signed_sum(const uint128 a_magnitude, const bool a_negative, + const uint128 b_magnitude, const bool b_negative) noexcept { if (a_negative == b_negative) { // Equal signs: magnitudes add and may overflow into a 129th bit. - const uint128_t magnitude {a_magnitude + b_magnitude}; + const uint128 magnitude {a_magnitude + b_magnitude}; return ckd_sum_result{magnitude, a_negative, magnitude < a_magnitude}; } @@ -10393,18 +10393,18 @@ BOOST_INT128_HOST_DEVICE constexpr ckd_sum_result ckd_signed_sum(const uint128_t // Whether a result of the given sign and magnitude fits in T1. exceeds_width // forces overflow when the true magnitude does not even fit in 128 bits. template -BOOST_INT128_HOST_DEVICE constexpr bool ckd_overflows(const uint128_t magnitude, const bool negative, const bool exceeds_width) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool ckd_overflows(const uint128 magnitude, const bool negative, const bool exceeds_width) noexcept { if (exceeds_width) { return true; } - const uint128_t max_magnitude {static_cast((std::numeric_limits::max)())}; + const uint128 max_magnitude {static_cast((std::numeric_limits::max)())}; if (negative) { - const uint128_t min_magnitude {std::numeric_limits::is_signed ? max_magnitude + uint128_t{1} : uint128_t{0}}; + const uint128 min_magnitude {std::numeric_limits::is_signed ? max_magnitude + uint128{1} : uint128{0}}; return magnitude > min_magnitude; } @@ -10485,9 +10485,9 @@ BOOST_INT128_HOST_DEVICE constexpr bool ckd_mul(T1* result, const T2 a, const T3 // UINT128_MAX. Dividing the maximum by one magnitude tests that without // forming a 256-bit product. const bool exceeds_width {op_a.magnitude != 0U && - op_b.magnitude > ((std::numeric_limits::max)() / op_a.magnitude)}; + op_b.magnitude > ((std::numeric_limits::max)() / op_a.magnitude)}; - const uint128_t product_magnitude {op_a.magnitude * op_b.magnitude}; + const uint128 product_magnitude {op_a.magnitude * op_b.magnitude}; const bool product_negative {op_a.negative != op_b.negative}; return detail::ckd_overflows(product_magnitude, product_negative, exceeds_width); @@ -10520,8 +10520,8 @@ BOOST_INT128_INLINE_CONSTEXPR bool is_valid_comparison_type_v = valid_comparison // Allow the builtins to be used when available template -BOOST_INT128_INLINE_CONSTEXPR bool is_int128_type_v = std::is_same::value || - std::is_same::value +BOOST_INT128_INLINE_CONSTEXPR bool is_int128ype_v = std::is_same::value || + std::is_same::value #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) || std::is_same::value || std::is_same::value @@ -10530,7 +10530,7 @@ BOOST_INT128_INLINE_CONSTEXPR bool is_int128_type_v = std::is_same: template BOOST_INT128_INLINE_CONSTEXPR bool is_valid_comparison_operand_v = is_valid_comparison_type_v || - is_int128_type_v; + is_int128ype_v; // Maps the builtin 128-bit types onto the library equivalents template @@ -10544,13 +10544,13 @@ struct comparison_canonical template <> struct comparison_canonical { - using type = int128_t; + using type = int128; }; template <> struct comparison_canonical { - using type = uint128_t; + using type = uint128; }; #endif @@ -10594,7 +10594,7 @@ BOOST_INT128_HOST_DEVICE constexpr bool cmp_less_impl(const T lhs, const U rhs) template BOOST_INT128_INLINE_CONSTEXPR bool enable_comparison_v = is_valid_comparison_operand_v && is_valid_comparison_operand_v && - (is_int128_type_v || is_int128_type_v); + (is_int128ype_v || is_int128ype_v); } // namespace detail @@ -10704,9 +10704,9 @@ inline std::size_t hash_finalize_64(std::uint64_t v) noexcept namespace std { template <> -struct hash +struct hash { - auto operator()(const boost::int128::int128_t v) const noexcept -> std::size_t + auto operator()(const boost::int128::int128 v) const noexcept -> std::size_t { const std::size_t low_hash {boost::int128::detail::hash_finalize_64(v.low)}; const std::size_t high_hash {boost::int128::detail::hash_finalize_64(v.high)}; @@ -10717,9 +10717,9 @@ struct hash }; template <> -struct hash +struct hash { - auto operator()(const boost::int128::uint128_t v) const noexcept -> std::size_t + auto operator()(const boost::int128::uint128 v) const noexcept -> std::size_t { const std::size_t low_hash {boost::int128::detail::hash_finalize_64(v.low)}; const std::size_t high_hash {boost::int128::detail::hash_finalize_64(v.high)}; @@ -10734,14 +10734,14 @@ struct hash namespace boost { namespace int128 { -inline std::size_t hash_value(const uint128_t v) noexcept +inline std::size_t hash_value(const uint128 v) noexcept { - return std::hash{}(v); + return std::hash{}(v); } -inline std::size_t hash_value(const int128_t v) noexcept +inline std::size_t hash_value(const int128 v) noexcept { - return std::hash{}(v); + return std::hash{}(v); } } // namespace int128 diff --git a/include/boost/int128/bit.hpp b/include/boost/int128/bit.hpp index 95a8acdf..8c386095 100644 --- a/include/boost/int128/bit.hpp +++ b/include/boost/int128/bit.hpp @@ -15,14 +15,14 @@ namespace int128 { namespace impl { -BOOST_INT128_HOST_DEVICE constexpr int countl_zero_impl(const uint128_t x) noexcept +BOOST_INT128_HOST_DEVICE constexpr int countl_zero_impl(const uint128 x) noexcept { return x.high == 0 ? 64 + detail::countl_zero(x.low) : detail::countl_zero(x.high); } } // namespace impl -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countl_zero(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countl_zero(const uint128 x) noexcept { #if defined(BOOST_INT128_HAS_INT128) && !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) && BOOST_INT128_HAS_BUILTIN(__builtin_clzg) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -41,38 +41,38 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countl_zero(const uin #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countl_one(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countl_one(const uint128 x) noexcept { return countl_zero(~x); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int bit_width(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int bit_width(const uint128 x) noexcept { return x ? 128 - countl_zero(x) : 0; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t bit_ceil(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 bit_ceil(const uint128 x) noexcept { // __builtin_stdc_bit_ceil not available, but this is equivalent - return x <= 1U ? static_cast(1) : static_cast(2) << (127 - countl_zero(x - 1)); + return x <= 1U ? static_cast(1) : static_cast(2) << (127 - countl_zero(x - 1)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t bit_floor(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 bit_floor(const uint128 x) noexcept { // __builtin_stdc_bit_floor not available, but this is equivalent - return x == 0U ? static_cast(0) : static_cast(1) << (127 - countl_zero(x)); + return x == 0U ? static_cast(0) : static_cast(1) << (127 - countl_zero(x)); } namespace impl { -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_zero_impl(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_zero_impl(const uint128 x) noexcept { return x.low == 0 ? 64 + detail::countr_zero(x.high) : detail::countr_zero(x.low); } } // namespace impl -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_zero(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_zero(const uint128 x) noexcept { #if defined(BOOST_INT128_HAS_INT128) && !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) && BOOST_INT128_HAS_BUILTIN(__builtin_ctzg) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -91,19 +91,19 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_zero(const uin #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_one(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int countr_one(const uint128 x) noexcept { return countr_zero(~x); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t rotl(const uint128_t x, const int s) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 rotl(const uint128 x, const int s) noexcept { // __builtin_stdc_rotate_left not available constexpr auto mask {127U}; return x << (static_cast(s) & mask) | x >> (static_cast(-s) & mask); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t rotr(const uint128_t x, const int s) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 rotr(const uint128 x, const int s) noexcept { // __builtin_stdc_rotate_right not available constexpr auto mask {127U}; @@ -112,7 +112,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t rotr(const uint namespace impl { -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount_impl(std::uint64_t x) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount_impl(std::uint64_t x) noexcept { x = x - ((x >> 1U) & UINT64_C(0x5555555555555555)); x = (x & UINT64_C(0x3333333333333333)) + ((x >> 2U) & UINT64_C(0x3333333333333333)); @@ -122,14 +122,14 @@ BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount_impl(st } // The exact-match overload above is selected for the 64-bit halves -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount_impl(const uint128_t x) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount_impl(const uint128 x) noexcept { return popcount_impl(x.high) + popcount_impl(x.low); } } // namespace impl -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int popcount(const uint128 x) noexcept { #if defined(BOOST_INT128_HAS_INT128) && !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) && BOOST_INT128_HAS_BUILTIN(__builtin_popcountg) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -206,14 +206,14 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::uint64_t byteswap_im return (step16 & UINT64_C(0x00FF00FF00FF00FF)) << 8U | (step16 & UINT64_C(0xFF00FF00FF00FF00)) >> 8U; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap_impl(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 byteswap_impl(const uint128 x) noexcept { return {byteswap_impl(x.low), byteswap_impl(x.high)}; } } // namespace impl -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 byteswap(const uint128 x) noexcept { // The whole-width builtins are deliberately ranked below the paired 64-bit form. // Measured today (7/29/2026) they are a regression: the 128-bit value blocks the loop vectorization @@ -232,7 +232,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap(const return impl::byteswap_impl(x); } - return static_cast(__builtin_bswapg(static_cast(x))); + return static_cast(__builtin_bswapg(static_cast(x))); #elif defined(BOOST_INT128_HAS_INT128) && !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) && BOOST_INT128_HAS_BUILTIN(__builtin_bswap128) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -241,7 +241,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap(const return impl::byteswap_impl(x); } - return static_cast(__builtin_bswap128(static_cast(x))); + return static_cast(__builtin_bswap128(static_cast(x))); #elif defined(_MSC_VER) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -261,7 +261,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t byteswap(const #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool has_single_bit(const uint128_t x) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool has_single_bit(const uint128 x) noexcept { return popcount(x) == 1; } diff --git a/include/boost/int128/charconv.hpp b/include/boost/int128/charconv.hpp index 44183129..28faa6ca 100644 --- a/include/boost/int128/charconv.hpp +++ b/include/boost/int128/charconv.hpp @@ -31,131 +31,131 @@ namespace charconv { namespace detail { template <> -struct is_signed { static constexpr bool value = false; }; +struct is_signed { static constexpr bool value = false; }; template <> -struct is_signed { static constexpr bool value = true; }; +struct is_signed { static constexpr bool value = true; }; template <> -struct make_unsigned { using type = int128::uint128_t; }; +struct make_unsigned { using type = int128::uint128; }; template <> -struct make_unsigned { using type = int128::uint128_t; }; +struct make_unsigned { using type = int128::uint128; }; template <> -struct make_signed { using type = int128::int128_t; }; +struct make_signed { using type = int128::int128; }; template <> -struct make_signed { using type = int128::int128_t; }; +struct make_signed { using type = int128::int128; }; #if defined(BOOST_INT128_HAS_GPU_SUPPORT) template <> -BOOST_INT128_HOST_DEVICE constexpr int128::uint128_t get_max_value() +BOOST_INT128_HOST_DEVICE constexpr int128::uint128 get_max_value() { - return std::numeric_limits::max(); + return std::numeric_limits::max(); } template <> -BOOST_INT128_HOST_DEVICE constexpr int128::int128_t get_max_value() +BOOST_INT128_HOST_DEVICE constexpr int128::int128 get_max_value() { - return std::numeric_limits::max(); + return std::numeric_limits::max(); } #endif #if !defined(BOOST_INT128_HAS_GPU_SUPPORT) -BOOST_INT128_INLINE_CONSTEXPR int128::uint128_t int128_pow10[39] = +BOOST_INT128_INLINE_CONSTEXPR int128::uint128 int128_pow10[39] = { - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x1)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0xa)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x64)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x3e8)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x2710)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x186a0)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0xf4240)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x989680)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x5f5e100)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x3b9aca00)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x2540be400)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x174876e800)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0xe8d4a51000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x9184e72a000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x5af3107a4000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x38d7ea4c68000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x2386f26fc10000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x16345785d8a0000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0xde0b6b3a7640000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x8ac7230489e80000)}, - int128::uint128_t{UINT64_C(0x5), UINT64_C(0x6bc75e2d63100000)}, - int128::uint128_t{UINT64_C(0x36), UINT64_C(0x35c9adc5dea00000)}, - int128::uint128_t{UINT64_C(0x21e), UINT64_C(0x19e0c9bab2400000)}, - int128::uint128_t{UINT64_C(0x152d), UINT64_C(0x2c7e14af6800000)}, - int128::uint128_t{UINT64_C(0xd3c2), UINT64_C(0x1bcecceda1000000)}, - int128::uint128_t{UINT64_C(0x84595), UINT64_C(0x161401484a000000)}, - int128::uint128_t{UINT64_C(0x52b7d2), UINT64_C(0xdcc80cd2e4000000)}, - int128::uint128_t{UINT64_C(0x33b2e3c), UINT64_C(0x9fd0803ce8000000)}, - int128::uint128_t{UINT64_C(0x204fce5e), UINT64_C(0x3e25026110000000)}, - int128::uint128_t{UINT64_C(0x1431e0fae), UINT64_C(0x6d7217caa0000000)}, - int128::uint128_t{UINT64_C(0xc9f2c9cd0), UINT64_C(0x4674edea40000000)}, - int128::uint128_t{UINT64_C(0x7e37be2022), UINT64_C(0xc0914b2680000000)}, - int128::uint128_t{UINT64_C(0x4ee2d6d415b), UINT64_C(0x85acef8100000000)}, - int128::uint128_t{UINT64_C(0x314dc6448d93), UINT64_C(0x38c15b0a00000000)}, - int128::uint128_t{UINT64_C(0x1ed09bead87c0), UINT64_C(0x378d8e6400000000)}, - int128::uint128_t{UINT64_C(0x13426172c74d82), UINT64_C(0x2b878fe800000000)}, - int128::uint128_t{UINT64_C(0xc097ce7bc90715), UINT64_C(0xb34b9f1000000000)}, - int128::uint128_t{UINT64_C(0x785ee10d5da46d9), UINT64_C(0xf436a000000000)}, - int128::uint128_t{UINT64_C(0x4b3b4ca85a86c47a), UINT64_C(0x98a224000000000)} + int128::uint128{UINT64_C(0x0), UINT64_C(0x1)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0xa)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x64)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x3e8)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x2710)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x186a0)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0xf4240)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x989680)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x5f5e100)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x3b9aca00)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x2540be400)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x174876e800)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0xe8d4a51000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x9184e72a000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x5af3107a4000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x38d7ea4c68000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x2386f26fc10000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x16345785d8a0000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0xde0b6b3a7640000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x8ac7230489e80000)}, + int128::uint128{UINT64_C(0x5), UINT64_C(0x6bc75e2d63100000)}, + int128::uint128{UINT64_C(0x36), UINT64_C(0x35c9adc5dea00000)}, + int128::uint128{UINT64_C(0x21e), UINT64_C(0x19e0c9bab2400000)}, + int128::uint128{UINT64_C(0x152d), UINT64_C(0x2c7e14af6800000)}, + int128::uint128{UINT64_C(0xd3c2), UINT64_C(0x1bcecceda1000000)}, + int128::uint128{UINT64_C(0x84595), UINT64_C(0x161401484a000000)}, + int128::uint128{UINT64_C(0x52b7d2), UINT64_C(0xdcc80cd2e4000000)}, + int128::uint128{UINT64_C(0x33b2e3c), UINT64_C(0x9fd0803ce8000000)}, + int128::uint128{UINT64_C(0x204fce5e), UINT64_C(0x3e25026110000000)}, + int128::uint128{UINT64_C(0x1431e0fae), UINT64_C(0x6d7217caa0000000)}, + int128::uint128{UINT64_C(0xc9f2c9cd0), UINT64_C(0x4674edea40000000)}, + int128::uint128{UINT64_C(0x7e37be2022), UINT64_C(0xc0914b2680000000)}, + int128::uint128{UINT64_C(0x4ee2d6d415b), UINT64_C(0x85acef8100000000)}, + int128::uint128{UINT64_C(0x314dc6448d93), UINT64_C(0x38c15b0a00000000)}, + int128::uint128{UINT64_C(0x1ed09bead87c0), UINT64_C(0x378d8e6400000000)}, + int128::uint128{UINT64_C(0x13426172c74d82), UINT64_C(0x2b878fe800000000)}, + int128::uint128{UINT64_C(0xc097ce7bc90715), UINT64_C(0xb34b9f1000000000)}, + int128::uint128{UINT64_C(0x785ee10d5da46d9), UINT64_C(0xf436a000000000)}, + int128::uint128{UINT64_C(0x4b3b4ca85a86c47a), UINT64_C(0x98a224000000000)} }; #endif // __NVCC__ -BOOST_INT128_HOST_DEVICE constexpr int num_digits(const int128::uint128_t& x) noexcept +BOOST_INT128_HOST_DEVICE constexpr int num_digits(const int128::uint128& x) noexcept { #if defined(BOOST_INT128_HAS_GPU_SUPPORT) - constexpr int128::uint128_t int128_pow10[39] = + constexpr int128::uint128 int128_pow10[39] = { - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x1)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0xa)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x64)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x3e8)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x2710)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x186a0)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0xf4240)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x989680)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x5f5e100)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x3b9aca00)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x2540be400)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x174876e800)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0xe8d4a51000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x9184e72a000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x5af3107a4000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x38d7ea4c68000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x2386f26fc10000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x16345785d8a0000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0xde0b6b3a7640000)}, - int128::uint128_t{UINT64_C(0x0), UINT64_C(0x8ac7230489e80000)}, - int128::uint128_t{UINT64_C(0x5), UINT64_C(0x6bc75e2d63100000)}, - int128::uint128_t{UINT64_C(0x36), UINT64_C(0x35c9adc5dea00000)}, - int128::uint128_t{UINT64_C(0x21e), UINT64_C(0x19e0c9bab2400000)}, - int128::uint128_t{UINT64_C(0x152d), UINT64_C(0x2c7e14af6800000)}, - int128::uint128_t{UINT64_C(0xd3c2), UINT64_C(0x1bcecceda1000000)}, - int128::uint128_t{UINT64_C(0x84595), UINT64_C(0x161401484a000000)}, - int128::uint128_t{UINT64_C(0x52b7d2), UINT64_C(0xdcc80cd2e4000000)}, - int128::uint128_t{UINT64_C(0x33b2e3c), UINT64_C(0x9fd0803ce8000000)}, - int128::uint128_t{UINT64_C(0x204fce5e), UINT64_C(0x3e25026110000000)}, - int128::uint128_t{UINT64_C(0x1431e0fae), UINT64_C(0x6d7217caa0000000)}, - int128::uint128_t{UINT64_C(0xc9f2c9cd0), UINT64_C(0x4674edea40000000)}, - int128::uint128_t{UINT64_C(0x7e37be2022), UINT64_C(0xc0914b2680000000)}, - int128::uint128_t{UINT64_C(0x4ee2d6d415b), UINT64_C(0x85acef8100000000)}, - int128::uint128_t{UINT64_C(0x314dc6448d93), UINT64_C(0x38c15b0a00000000)}, - int128::uint128_t{UINT64_C(0x1ed09bead87c0), UINT64_C(0x378d8e6400000000)}, - int128::uint128_t{UINT64_C(0x13426172c74d82), UINT64_C(0x2b878fe800000000)}, - int128::uint128_t{UINT64_C(0xc097ce7bc90715), UINT64_C(0xb34b9f1000000000)}, - int128::uint128_t{UINT64_C(0x785ee10d5da46d9), UINT64_C(0xf436a000000000)}, - int128::uint128_t{UINT64_C(0x4b3b4ca85a86c47a), UINT64_C(0x98a224000000000)} + int128::uint128{UINT64_C(0x0), UINT64_C(0x1)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0xa)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x64)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x3e8)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x2710)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x186a0)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0xf4240)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x989680)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x5f5e100)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x3b9aca00)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x2540be400)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x174876e800)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0xe8d4a51000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x9184e72a000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x5af3107a4000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x38d7ea4c68000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x2386f26fc10000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x16345785d8a0000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0xde0b6b3a7640000)}, + int128::uint128{UINT64_C(0x0), UINT64_C(0x8ac7230489e80000)}, + int128::uint128{UINT64_C(0x5), UINT64_C(0x6bc75e2d63100000)}, + int128::uint128{UINT64_C(0x36), UINT64_C(0x35c9adc5dea00000)}, + int128::uint128{UINT64_C(0x21e), UINT64_C(0x19e0c9bab2400000)}, + int128::uint128{UINT64_C(0x152d), UINT64_C(0x2c7e14af6800000)}, + int128::uint128{UINT64_C(0xd3c2), UINT64_C(0x1bcecceda1000000)}, + int128::uint128{UINT64_C(0x84595), UINT64_C(0x161401484a000000)}, + int128::uint128{UINT64_C(0x52b7d2), UINT64_C(0xdcc80cd2e4000000)}, + int128::uint128{UINT64_C(0x33b2e3c), UINT64_C(0x9fd0803ce8000000)}, + int128::uint128{UINT64_C(0x204fce5e), UINT64_C(0x3e25026110000000)}, + int128::uint128{UINT64_C(0x1431e0fae), UINT64_C(0x6d7217caa0000000)}, + int128::uint128{UINT64_C(0xc9f2c9cd0), UINT64_C(0x4674edea40000000)}, + int128::uint128{UINT64_C(0x7e37be2022), UINT64_C(0xc0914b2680000000)}, + int128::uint128{UINT64_C(0x4ee2d6d415b), UINT64_C(0x85acef8100000000)}, + int128::uint128{UINT64_C(0x314dc6448d93), UINT64_C(0x38c15b0a00000000)}, + int128::uint128{UINT64_C(0x1ed09bead87c0), UINT64_C(0x378d8e6400000000)}, + int128::uint128{UINT64_C(0x13426172c74d82), UINT64_C(0x2b878fe800000000)}, + int128::uint128{UINT64_C(0xc097ce7bc90715), UINT64_C(0xb34b9f1000000000)}, + int128::uint128{UINT64_C(0x785ee10d5da46d9), UINT64_C(0xf436a000000000)}, + int128::uint128{UINT64_C(0x4b3b4ca85a86c47a), UINT64_C(0x98a224000000000)} }; #endif // __NVCC__ @@ -189,52 +189,52 @@ BOOST_INT128_HOST_DEVICE constexpr int num_digits(const int128::uint128_t& x) no } // namespace detail -BOOST_INT128_HOST_DEVICE BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars(char* first, char* last, const int128::uint128_t value, const int base = 10) noexcept +BOOST_INT128_HOST_DEVICE BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars(char* first, char* last, const int128::uint128 value, const int base = 10) noexcept { #if !defined(BOOST_INT128_HAS_GPU_SUPPORT) if (base == 10) { - return detail::to_chars_128integer_impl(first, last, value); + return detail::to_chars_128integer_impl(first, last, value); } #endif // __NVCC__ - return detail::to_chars_integer_impl(first, last, value, base); + return detail::to_chars_integer_impl(first, last, value, base); } -BOOST_INT128_HOST_DEVICE BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars(char* first, char* last, const int128::int128_t value, const int base = 10) noexcept +BOOST_INT128_HOST_DEVICE BOOST_CHARCONV_CONSTEXPR to_chars_result to_chars(char* first, char* last, const int128::int128 value, const int base = 10) noexcept { #if !defined(BOOST_INT128_HAS_GPU_SUPPORT) if (base == 10) { - return detail::to_chars_128integer_impl(first, last, value); + return detail::to_chars_128integer_impl(first, last, value); } #endif // __NVCC__ - return detail::to_chars_integer_impl(first, last, value, base); + return detail::to_chars_integer_impl(first, last, value, base); } -BOOST_INT128_HOST_DEVICE BOOST_CHARCONV_GCC5_CONSTEXPR from_chars_result from_chars(const char* first, const char* last, int128::uint128_t& value, const int base = 10) noexcept +BOOST_INT128_HOST_DEVICE BOOST_CHARCONV_GCC5_CONSTEXPR from_chars_result from_chars(const char* first, const char* last, int128::uint128& value, const int base = 10) noexcept { - return detail::from_chars_integer_impl(first, last, value, base); + return detail::from_chars_integer_impl(first, last, value, base); } -BOOST_CHARCONV_GCC5_CONSTEXPR from_chars_result from_chars(core::string_view sv, int128::uint128_t& value, const int base = 10) noexcept +BOOST_CHARCONV_GCC5_CONSTEXPR from_chars_result from_chars(core::string_view sv, int128::uint128& value, const int base = 10) noexcept { - return detail::from_chars_integer_impl(sv.data(), sv.data() + sv.size(), value, base); + return detail::from_chars_integer_impl(sv.data(), sv.data() + sv.size(), value, base); } -BOOST_INT128_HOST_DEVICE BOOST_CHARCONV_GCC5_CONSTEXPR from_chars_result from_chars(const char* first, const char* last, int128::int128_t& value, const int base = 10) noexcept +BOOST_INT128_HOST_DEVICE BOOST_CHARCONV_GCC5_CONSTEXPR from_chars_result from_chars(const char* first, const char* last, int128::int128& value, const int base = 10) noexcept { - return detail::from_chars_integer_impl(first, last, value, base); + return detail::from_chars_integer_impl(first, last, value, base); } -BOOST_CHARCONV_GCC5_CONSTEXPR from_chars_result from_chars(core::string_view sv, int128::int128_t& value, int base = 10) noexcept +BOOST_CHARCONV_GCC5_CONSTEXPR from_chars_result from_chars(core::string_view sv, int128::int128& value, int base = 10) noexcept { - return detail::from_chars_integer_impl(sv.data(), sv.data() + sv.size(), value, base); + return detail::from_chars_integer_impl(sv.data(), sv.data() + sv.size(), value, base); } } // namespace charconv diff --git a/include/boost/int128/climits.hpp b/include/boost/int128/climits.hpp index c0c8420e..15a9878b 100644 --- a/include/boost/int128/climits.hpp +++ b/include/boost/int128/climits.hpp @@ -9,9 +9,9 @@ #include #include -#define BOOST_INT128_UINT128_MAX boost::int128::uint128_t{UINT64_MAX, UINT64_MAX} +#define BOOST_INT128_UINT128_MAX boost::int128::uint128{UINT64_MAX, UINT64_MAX} -#define BOOST_INT128_INT128_MIN boost::int128::int128_t{INT64_MIN, 0} -#define BOOST_INT128_INT128_MAX boost::int128::int128_t{INT64_MAX, UINT64_MAX} +#define BOOST_INT128_INT128_MIN boost::int128::int128{INT64_MIN, 0} +#define BOOST_INT128_INT128_MAX boost::int128::int128{INT64_MAX, UINT64_MAX} #endif // BOOST_INT128_CLIMITS_HPP diff --git a/include/boost/int128/cstdlib.hpp b/include/boost/int128/cstdlib.hpp index 658685ba..a9957487 100644 --- a/include/boost/int128/cstdlib.hpp +++ b/include/boost/int128/cstdlib.hpp @@ -12,17 +12,17 @@ namespace int128 { BOOST_INT128_EXPORT struct u128div_t { - uint128_t quot; - uint128_t rem; + uint128 quot; + uint128 rem; }; BOOST_INT128_EXPORT struct i128div_t { - int128_t quot; - int128_t rem; + int128 quot; + int128 rem; }; -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr u128div_t div(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr u128div_t div(const uint128 x, const uint128 y) noexcept { if (BOOST_INT128_UNLIKELY(x == 0U || y == 0U)) { @@ -54,15 +54,15 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr u128div_t div(const uint1 } } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr i128div_t div(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr i128div_t div(const int128 x, const int128 y) noexcept { if (BOOST_INT128_UNLIKELY(x == 0 || y == 0)) { return i128div_t{0, 0}; } - const auto abs_lhs {static_cast(abs(x))}; - const auto abs_rhs {static_cast(abs(y))}; + const auto abs_lhs {static_cast(abs(x))}; + const auto abs_rhs {static_cast(abs(y))}; if (abs_rhs > abs_lhs) { @@ -78,15 +78,15 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr i128div_t div(const int12 { const auto builtin_x {static_cast(x)}; const auto builtin_y {static_cast(y)}; - return i128div_t{static_cast(builtin_x / builtin_y), - static_cast(builtin_x % builtin_y)}; + return i128div_t{static_cast(builtin_x / builtin_y), + static_cast(builtin_x % builtin_y)}; } #endif const auto unsigned_res {div(abs_lhs, abs_rhs)}; - i128div_t res {static_cast(unsigned_res.quot), static_cast(unsigned_res.rem)}; + i128div_t res {static_cast(unsigned_res.quot), static_cast(unsigned_res.rem)}; res.quot = negative_quot ? -res.quot : res.quot; res.rem = negative_rem ? -res.rem : res.rem; diff --git a/include/boost/int128/detail/clz.hpp b/include/boost/int128/detail/clz.hpp index 3fa01b6f..b7ecab8b 100644 --- a/include/boost/int128/detail/clz.hpp +++ b/include/boost/int128/detail/clz.hpp @@ -21,7 +21,7 @@ namespace detail { // The whole impl namespace is exported when building the module for testing so // the low-level bit helpers can be exercised directly; it is an ordinary // namespace in every other build. -BOOST_INT128_TEST_EXPORT namespace impl { +BOOST_int128EST_EXPORT namespace impl { #if !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) diff --git a/include/boost/int128/detail/common_mul.hpp b/include/boost/int128/detail/common_mul.hpp index a4bf0fa6..0b361043 100644 --- a/include/boost/int128/detail/common_mul.hpp +++ b/include/boost/int128/detail/common_mul.hpp @@ -25,7 +25,7 @@ struct ctor_high_word }; template <> -struct ctor_high_word +struct ctor_high_word { using type = std::int64_t; }; diff --git a/include/boost/int128/detail/config.hpp b/include/boost/int128/detail/config.hpp index 2cc4f87d..7770da71 100644 --- a/include/boost/int128/detail/config.hpp +++ b/include/boost/int128/detail/config.hpp @@ -6,13 +6,13 @@ #define BOOST_INT128_DETAIL_CONFIG_HPP // A handful of detail-namespace entities are exercised directly by the module -// test suite. BOOST_INT128_TEST_EXPORT exports them only when the module is built +// test suite. BOOST_int128EST_EXPORT exports them only when the module is built // for testing (BOOST_INT128_EXPORT_TESTING), so the normal module API stays limited // to the public interface. It expands to nothing in ordinary (header) builds. #if defined(BOOST_INT128_BUILD_MODULE) && defined(BOOST_INT128_EXPORT_TESTING) -# define BOOST_INT128_TEST_EXPORT export +# define BOOST_int128EST_EXPORT export #else -# define BOOST_INT128_TEST_EXPORT +# define BOOST_int128EST_EXPORT #endif // The SYCL device target (spir64) has no native 128-bit integer, so force the portable @@ -43,13 +43,13 @@ namespace detail { // Avoids pedantic warnings #ifdef __GNUC__ -BOOST_INT128_TEST_EXPORT __extension__ using builtin_i128 = __int128 ; -BOOST_INT128_TEST_EXPORT __extension__ using builtin_u128 = unsigned __int128 ; +BOOST_int128EST_EXPORT __extension__ using builtin_i128 = __int128 ; +BOOST_int128EST_EXPORT __extension__ using builtin_u128 = unsigned __int128 ; #else -BOOST_INT128_TEST_EXPORT using builtin_i128 = __int128 ; -BOOST_INT128_TEST_EXPORT using builtin_u128 = unsigned __int128; +BOOST_int128EST_EXPORT using builtin_i128 = __int128 ; +BOOST_int128EST_EXPORT using builtin_u128 = unsigned __int128; #endif @@ -80,8 +80,8 @@ namespace detail { // See the note above: skip the re-declaration in a module consumer. #if !defined(BOOST_INT128_BUILD_MODULE) || defined(BOOST_INT128_INTERFACE_UNIT) -BOOST_INT128_TEST_EXPORT using builtin_i128 = std::_Signed128; -BOOST_INT128_TEST_EXPORT using builtin_u128 = std::_Unsigned128; +BOOST_int128EST_EXPORT using builtin_i128 = std::_Signed128; +BOOST_int128EST_EXPORT using builtin_u128 = std::_Unsigned128; #endif @@ -293,22 +293,22 @@ BOOST_INT128_TEST_EXPORT using builtin_u128 = std::_Unsigned128; #ifdef BOOST_INT128_DISABLE_EXCEPTIONS -# define BOOST_INT128_THROW_EXCEPTION(expr) +# define BOOST_int128HROW_EXCEPTION(expr) #else # ifdef _MSC_VER # ifdef _CPPUNWIND -# define BOOST_INT128_THROW_EXCEPTION(expr) throw expr; +# define BOOST_int128HROW_EXCEPTION(expr) throw expr; # else -# define BOOST_INT128_THROW_EXCEPTION(expr) +# define BOOST_int128HROW_EXCEPTION(expr) # define BOOST_INT128_DISABLE_EXCEPTIONS # endif # else # ifdef __EXCEPTIONS -# define BOOST_INT128_THROW_EXCEPTION(expr) throw expr; +# define BOOST_int128HROW_EXCEPTION(expr) throw expr; # else -# define BOOST_INT128_THROW_EXCEPTION(expr) +# define BOOST_int128HROW_EXCEPTION(expr) # define BOOST_INT128_DISABLE_EXCEPTIONS # endif #endif diff --git a/include/boost/int128/detail/conversions.hpp b/include/boost/int128/detail/conversions.hpp index ed8dba24..5d165724 100644 --- a/include/boost/int128/detail/conversions.hpp +++ b/include/boost/int128/detail/conversions.hpp @@ -16,7 +16,7 @@ namespace detail { template struct valid_overload { - static constexpr bool value = std::is_same::value || std::is_same::value; + static constexpr bool value = std::is_same::value || std::is_same::value; }; template @@ -26,15 +26,15 @@ BOOST_INT128_INLINE_CONSTEXPR bool is_valid_overload_v = valid_overload::valu #if BOOST_INT128_ENDIAN_LITTLE_BYTE -BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(const uint128_t& v) noexcept : low {v.low}, high {v.high} {} +BOOST_INT128_HOST_DEVICE constexpr int128::int128(const uint128& v) noexcept : low {v.low}, high {v.high} {} -BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(const int128_t& v) noexcept : low {v.low}, high {v.high} {} +BOOST_INT128_HOST_DEVICE constexpr uint128::uint128(const int128& v) noexcept : low {v.low}, high {v.high} {} #else -BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(const uint128_t& v) noexcept : high {v.high}, low {v.low} {} +BOOST_INT128_HOST_DEVICE constexpr int128::int128(const uint128& v) noexcept : high {v.high}, low {v.low} {} -BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(const int128_t& v) noexcept : high {v.high}, low {v.low} {} +BOOST_INT128_HOST_DEVICE constexpr uint128::uint128(const int128& v) noexcept : high {v.high}, low {v.low} {} #endif // BOOST_INT128_ENDIAN_LITTLE_BYTE @@ -50,37 +50,37 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(const int128_t& v) noexc template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator==(const T lhs, const U rhs) noexcept { - return static_cast(lhs) == static_cast(rhs); + return static_cast(lhs) == static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const T lhs, const U rhs) noexcept { - return static_cast(lhs) != static_cast(rhs); + return static_cast(lhs) != static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator<(const T lhs, const U rhs) noexcept { - return static_cast(lhs) < static_cast(rhs); + return static_cast(lhs) < static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const T lhs, const U rhs) noexcept { - return static_cast(lhs) <= static_cast(rhs); + return static_cast(lhs) <= static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator>(const T lhs, const U rhs) noexcept { - return static_cast(lhs) > static_cast(rhs); + return static_cast(lhs) > static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const T lhs, const U rhs) noexcept { - return static_cast(lhs) >= static_cast(rhs); + return static_cast(lhs) >= static_cast(rhs); } //===================================== @@ -88,33 +88,33 @@ BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const T lhs, const U rhs) noe //===================================== template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const T lhs, const U rhs) noexcept { - return static_cast(lhs) + static_cast(rhs); + return static_cast(lhs) + static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const T lhs, const U rhs) noexcept { - return static_cast(lhs) - static_cast(rhs); + return static_cast(lhs) - static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const T lhs, const U rhs) noexcept { - return static_cast(lhs) * static_cast(rhs); + return static_cast(lhs) * static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const T lhs, const U rhs) noexcept { - return static_cast(lhs) / static_cast(rhs); + return static_cast(lhs) / static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const T lhs, const U rhs) noexcept { - return static_cast(lhs) % static_cast(rhs); + return static_cast(lhs) % static_cast(rhs); } //===================================== @@ -122,49 +122,49 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const T lhs, const U rhs) //===================================== template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const T lhs, const U rhs) noexcept { - return static_cast(lhs) | static_cast(rhs); + return static_cast(lhs) | static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const T lhs, const U rhs) noexcept { - return static_cast(lhs) & static_cast(rhs); + return static_cast(lhs) & static_cast(rhs); } template && detail::is_valid_overload_v && !std::is_same::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const T lhs, const U rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const T lhs, const U rhs) noexcept { - return static_cast(lhs) ^ static_cast(rhs); + return static_cast(lhs) ^ static_cast(rhs); } //===================================== // Cross-type Shift Operators //===================================== -BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator<<(const int128 lhs, const uint128 rhs) noexcept { - return lhs << static_cast(rhs); + return lhs << static_cast(rhs); } -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(const uint128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator<<(const uint128 lhs, const int128 rhs) noexcept { - return lhs << static_cast(rhs); + return lhs << static_cast(rhs); } -BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const int128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator>>(const int128 lhs, const uint128 rhs) noexcept { - return lhs >> static_cast(rhs); + return lhs >> static_cast(rhs); } -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator>>(const uint128 lhs, const int128 rhs) noexcept { - return lhs >> static_cast(rhs); + return lhs >> static_cast(rhs); } //===================================== -// int128_t with builtin unsigned __int128 comparison operators +// int128 with builtin unsigned __int128 comparison operators // // These live here (not in int128_imp.hpp) // to avoid C++20 rewritten-candidate ambiguity on MSVC @@ -172,152 +172,152 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, con #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) == rhs; + return static_cast(lhs) == rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs == static_cast(rhs); + return lhs == static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) != rhs; + return static_cast(lhs) != rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs != static_cast(rhs); + return lhs != static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) < rhs; + return static_cast(lhs) < rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs < static_cast(rhs); + return lhs < static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) <= rhs; + return static_cast(lhs) <= rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs <= static_cast(rhs); + return lhs <= static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) > rhs; + return static_cast(lhs) > rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs > static_cast(rhs); + return lhs > static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) >= rhs; + return static_cast(lhs) >= rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs >= static_cast(rhs); + return lhs >= static_cast(rhs); } #endif // BOOST_INT128_HAS_INT128 //===================================== -// int128_t with builtin unsigned __int128 binary operators +// int128 with builtin unsigned __int128 binary operators //===================================== #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) | rhs; + return static_cast(lhs) | rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs | static_cast(rhs); + return lhs | static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) & rhs; + return static_cast(lhs) & rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs & static_cast(rhs); + return lhs & static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) ^ rhs; + return static_cast(lhs) ^ rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs ^ static_cast(rhs); + return lhs ^ static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) + rhs; + return static_cast(lhs) + rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs + static_cast(rhs); + return lhs + static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) - rhs; + return static_cast(lhs) - rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs - static_cast(rhs); + return lhs - static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) * rhs; + return static_cast(lhs) * rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs * static_cast(rhs); + return lhs * static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) / rhs; + return static_cast(lhs) / rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs / static_cast(rhs); + return lhs / static_cast(rhs); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const int128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const int128 lhs, const detail::builtin_u128 rhs) noexcept { - return static_cast(lhs) % rhs; + return static_cast(lhs) % rhs; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const detail::builtin_u128 lhs, const int128 rhs) noexcept { - return lhs % static_cast(rhs); + return lhs % static_cast(rhs); } #endif // BOOST_INT128_HAS_INT128 diff --git a/include/boost/int128/detail/fwd.hpp b/include/boost/int128/detail/fwd.hpp index 4ec7dbc0..127c8318 100644 --- a/include/boost/int128/detail/fwd.hpp +++ b/include/boost/int128/detail/fwd.hpp @@ -10,8 +10,8 @@ namespace boost { namespace int128 { -BOOST_INT128_EXPORT struct uint128_t; -BOOST_INT128_EXPORT struct int128_t; +BOOST_INT128_EXPORT struct uint128; +BOOST_INT128_EXPORT struct int128; } // namespace int128 } // namespace boost diff --git a/include/boost/int128/detail/int128_imp.hpp b/include/boost/int128/detail/int128_imp.hpp index 0341f15a..9fc10e39 100644 --- a/include/boost/int128/detail/int128_imp.hpp +++ b/include/boost/int128/detail/int128_imp.hpp @@ -28,7 +28,7 @@ struct #if (defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128)) && !defined(_M_IX86) alignas(alignof(detail::builtin_i128)) #endif -int128_t +int128 { #if BOOST_INT128_ENDIAN_LITTLE_BYTE std::uint64_t low {}; @@ -50,47 +50,47 @@ int128_t #endif // Defaulted basic construction - constexpr int128_t() noexcept = default; - constexpr int128_t(const int128_t&) noexcept = default; - constexpr int128_t(int128_t&&) noexcept = default; - constexpr int128_t& operator=(const int128_t&) noexcept = default; - constexpr int128_t& operator=(int128_t&&) noexcept = default; + constexpr int128() noexcept = default; + constexpr int128(const int128&) noexcept = default; + constexpr int128(int128&&) noexcept = default; + constexpr int128& operator=(const int128&) noexcept = default; + constexpr int128& operator=(int128&&) noexcept = default; // Requires a conversion file to be implemented - BOOST_INT128_HOST_DEVICE constexpr int128_t(const uint128_t& v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(const uint128& v) noexcept; // Construct from integral types #if BOOST_INT128_ENDIAN_LITTLE_BYTE - BOOST_INT128_HOST_DEVICE constexpr int128_t(const std::int64_t hi, const std::uint64_t lo) noexcept : low{lo}, high{static_cast(hi)} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const std::int64_t hi, const std::uint64_t lo) noexcept : low{lo}, high{static_cast(hi)} {} template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const SignedInteger v) noexcept : low {static_cast(v)}, high {v < 0 ? ~UINT64_C(0) : UINT64_C(0)} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const SignedInteger v) noexcept : low {static_cast(v)}, high {v < 0 ? ~UINT64_C(0) : UINT64_C(0)} {} template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const UnsignedInteger v) noexcept : low {static_cast(v)}, high {} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const UnsignedInteger v) noexcept : low {static_cast(v)}, high {} {} #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_i128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_u128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128(const detail::builtin_i128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128(const detail::builtin_u128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} #endif // BOOST_INT128_HAS_INT128 #else // Big endian - BOOST_INT128_HOST_DEVICE constexpr int128_t(const std::int64_t hi, const std::uint64_t lo) noexcept : high{static_cast(hi)}, low{lo} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const std::int64_t hi, const std::uint64_t lo) noexcept : high{static_cast(hi)}, low{lo} {} template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const SignedInteger v) noexcept : high{v < 0 ? ~UINT64_C(0) : UINT64_C(0)}, low{static_cast(v)} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const SignedInteger v) noexcept : high{v < 0 ? ~UINT64_C(0) : UINT64_C(0)}, low{static_cast(v)} {} template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const UnsignedInteger v) noexcept : high {}, low {static_cast(v)} {} + BOOST_INT128_HOST_DEVICE constexpr int128(const UnsignedInteger v) noexcept : high {}, low {static_cast(v)} {} #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_i128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_u128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128(const detail::builtin_i128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128(const detail::builtin_u128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} #endif // BOOST_INT128_HAS_INT128 @@ -98,7 +98,7 @@ int128_t // Construct from floating-point types template - BOOST_INT128_HOST_DEVICE constexpr int128_t(Float f) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128(Float f) noexcept; // The high word read as a signed value. // Every operation whose meaning depends on the sign of the value goes through @@ -136,150 +136,150 @@ int128_t // Compound Or template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator|=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator|=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator|=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator|=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator|=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator|=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound And template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator&=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator&=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator&=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator&=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator&=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator&=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound XOR template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator^=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator^=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator^=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator^=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator^=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator^=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Left Shift template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator<<=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator<<=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator<<=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator<<=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator<<=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator<<=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Right Shift template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator>>=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator>>=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator>>=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator>>=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator>>=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator>>=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Prefix and postfix increment - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator++() noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t operator++(int) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator++() noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128 operator++(int) noexcept; // Prefix and postfix decrment - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator--() noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t operator--(int) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator--() noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128 operator--(int) noexcept; // Compound Addition template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator+=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator+=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator+=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator+=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator+=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator+=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Subtraction template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator-=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator-=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator-=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator-=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator-=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator-=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Multiplication template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator*=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator*=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator*=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator*=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator*=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator*=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Division template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator/=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator/=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator/=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator/=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator/=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator/=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Modulo template - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator%=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator%=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr int128_t& operator%=(int128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr int128& operator%=(int128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline int128_t& operator%=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline int128& operator%=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 }; namespace detail { -// Builds an int128_t from the raw two's complement words +// Builds an int128 from the raw two's complement words // Enables vectorization -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t from_bits(const std::uint64_t hi, const std::uint64_t lo) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 from_bits(const std::uint64_t hi, const std::uint64_t lo) noexcept { - int128_t result {}; + int128 result {}; result.high = hi; result.low = lo; return result; @@ -291,7 +291,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t from_bits( // Absolute Value function //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t abs(int128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 abs(int128 value) noexcept { if (value.signed_high() < 0) { @@ -311,7 +311,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t abs(int128_t val // converts the unsigned magnitude and applies the sign; see detail/float_conversion.hpp // for why the raw words can not be composed directly for negative values -BOOST_INT128_HOST_DEVICE constexpr int128_t::operator float() const noexcept +BOOST_INT128_HOST_DEVICE constexpr int128::operator float() const noexcept { #if defined(BOOST_INT128_HAS_INT128) && !defined(BOOST_INT128_HAS_GPU_SUPPORT) @@ -324,7 +324,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t::operator float() const noexcept #endif } -BOOST_INT128_HOST_DEVICE constexpr int128_t::operator double() const noexcept +BOOST_INT128_HOST_DEVICE constexpr int128::operator double() const noexcept { #if defined(BOOST_INT128_HAS_INT128) && !defined(BOOST_INT128_HAS_GPU_SUPPORT) @@ -339,7 +339,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t::operator double() const noexcept #if !defined(BOOST_INT128_HAS_GPU_SUPPORT) -constexpr int128_t::operator long double() const noexcept +constexpr int128::operator long double() const noexcept { #if defined(BOOST_INT128_HAS_INT128) @@ -363,7 +363,7 @@ constexpr int128_t::operator long double() const noexcept // f >= 2^127 -> INT128_MAX; // f < -2^127 -> INT128_MIN. template -BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(Float f) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128::int128(Float f) noexcept { constexpr Float two_32 {static_cast(UINT64_C(1) << 32)}; constexpr Float two_64 {two_32 * two_32}; @@ -414,29 +414,29 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(Float f) noexcept // Unary Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 value) noexcept { return value; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 value) noexcept { // Spelled with the constructor rather than from_bits: clang folds the low word // of the low == 0 arm away here, and loses that if the members are written. - return (value.low == 0) ? int128_t{static_cast(UINT64_C(0) - value.high), 0} : - int128_t{static_cast(~value.high), ~value.low + 1}; + return (value.low == 0) ? int128{static_cast(UINT64_C(0) - value.high), 0} : + int128{static_cast(~value.high), ~value.low + 1}; } //===================================== // Equality Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const bool rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128 lhs, const bool rhs) noexcept { return lhs.high == 0 && lhs.low == static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const bool lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const bool lhs, const int128 rhs) noexcept { return rhs.high == 0 && rhs.low == static_cast(lhs); } @@ -451,7 +451,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const boo # pragma GCC diagnostic ignored "-Wsign-compare" #endif -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128 lhs, const int128 rhs) noexcept { // x64 and ARM64 like the values in opposite directions @@ -467,39 +467,39 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128 lhs, const SignedInteger rhs) noexcept { return lhs.high == (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) && lhs.low == static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const SignedInteger lhs, const int128 rhs) noexcept { return rhs.high == (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) && rhs.low == static_cast(lhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high == 0 && lhs.low == static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.high == 0 && rhs.low == static_cast(lhs); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs == static_cast(rhs); + return lhs == static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) == rhs; + return static_cast(lhs) == rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -508,7 +508,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Inequality Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128 lhs, const int128 rhs) noexcept { // x64 and ARM64 like the values in opposite directions @@ -540,50 +540,50 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const bool rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128 lhs, const bool rhs) noexcept { return lhs.high != 0 || lhs.low != static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const bool lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const bool lhs, const int128 rhs) noexcept { return rhs.high != 0 || rhs.low != static_cast(lhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128 lhs, const SignedInteger rhs) noexcept { return lhs.high != (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) || lhs.low != static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const SignedInteger lhs, const int128 rhs) noexcept { return rhs.high != (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) || rhs.low != static_cast(lhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high != 0 || lhs.low != static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.high != 0 || rhs.low != static_cast(lhs); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs != static_cast(rhs); + return lhs != static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) != rhs; + return static_cast(lhs) != rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -592,7 +592,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Less than Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128 lhs, const int128 rhs) noexcept { // On ARM macs only with the clang compiler is casting to __int128 uniformly better (and seemingly cost free) #if defined(__aarch64__) && defined(__APPLE__) && defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -624,23 +624,23 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int1 } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.signed_high() < 0 || (lhs.high == 0 && lhs.low < static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.signed_high() > 0 || (rhs.high == 0 && static_cast(lhs) < rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128 lhs, const SignedInteger rhs) noexcept { if (lhs.signed_high() < 0) { - return rhs >= 0 ? true : lhs < static_cast(rhs); + return rhs >= 0 ? true : lhs < static_cast(rhs); } if (lhs.signed_high() > 0 || rhs < 0) @@ -652,11 +652,11 @@ BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const Sign } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const int128 rhs) noexcept { if (rhs.signed_high() < 0) { - return lhs >= 0 ? false : static_cast(lhs) < rhs; + return lhs >= 0 ? false : static_cast(lhs) < rhs; } // rhs is positive @@ -670,14 +670,14 @@ BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs < static_cast(rhs); + return lhs < static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) < rhs; + return static_cast(lhs) < rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -686,7 +686,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Greater than Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128 lhs, const int128 rhs) noexcept { // On ARM macs only with the clang compiler is casting to __int128 uniformly better (and seemingly cost free) #if defined(__aarch64__) && defined(__APPLE__) && defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -718,39 +718,39 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int1 } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128 lhs, const SignedInteger rhs) noexcept { return !(lhs < rhs) && !(lhs == rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const SignedInteger lhs, const int128 rhs) noexcept { return !(lhs < rhs) && !(lhs == rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.signed_high() > 0 || (lhs.high == 0 && lhs.low > static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.signed_high() < 0 || (rhs.high == 0 && static_cast(lhs) > rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs > static_cast(rhs); + return lhs > static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) > rhs; + return static_cast(lhs) > rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -759,7 +759,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Less Equal Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128 lhs, const int128 rhs) noexcept { // On ARM macs only with the clang compiler is casting to __int128 uniformly better (and seemingly cost free) #if defined(__aarch64__) && defined(__APPLE__) && defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -791,39 +791,39 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128 lhs, const SignedInteger rhs) noexcept { return !(lhs > rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const SignedInteger lhs, const int128 rhs) noexcept { return !(lhs > rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.signed_high() < 0 || (lhs.high == 0 && lhs.low <= static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.signed_high() > 0 || (rhs.high == 0 && static_cast(lhs) <= rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs <= static_cast(rhs); + return lhs <= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) <= rhs; + return static_cast(lhs) <= rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -832,7 +832,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Greater Equal Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128 lhs, const int128 rhs) noexcept { // On ARM macs only with the clang compiler is casting to __int128 uniformly better (and seemingly cost free) #if defined(__aarch64__) && defined(__APPLE__) && defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -864,39 +864,39 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128 lhs, const SignedInteger rhs) noexcept { return !(lhs < rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const SignedInteger lhs, const int128 rhs) noexcept { return !(lhs < rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128 lhs, const UnsignedInteger rhs) noexcept { return lhs.signed_high() > 0 || (lhs.high == 0 && lhs.low >= static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const UnsignedInteger lhs, const int128 rhs) noexcept { return rhs.signed_high() < 0 || (rhs.high == 0 && static_cast(lhs) >= rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs >= static_cast(rhs); + return lhs >= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) >= rhs; + return static_cast(lhs) >= rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -907,7 +907,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool #ifdef BOOST_INT128_HAS_SPACESHIP_OPERATOR -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 lhs, const int128 rhs) noexcept { if (lhs < rhs) { @@ -924,7 +924,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering oper } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 lhs, const SignedInteger rhs) noexcept { if (lhs < rhs) { @@ -941,7 +941,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const SignedInteger lhs, const int128 rhs) noexcept { if (lhs < rhs) { @@ -958,7 +958,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Signed } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 lhs, const UnsignedInteger rhs) noexcept { if (lhs < rhs) { @@ -975,7 +975,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const int128 } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const UnsignedInteger lhs, const int128 rhs) noexcept { if (lhs < rhs) { @@ -997,7 +997,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Unsign // Not Operator //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator~(const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator~(const int128 rhs) noexcept { return detail::from_bits(~rhs.high, ~rhs.low); } @@ -1006,45 +1006,45 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator~(const // Or Operator //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const int128 lhs, const int128 rhs) noexcept { return detail::from_bits(lhs.high | rhs.high, lhs.low | rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const int128 lhs, const SignedInteger rhs) noexcept { return detail::from_bits(lhs.high | (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low | static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const SignedInteger lhs, const int128 rhs) noexcept { return detail::from_bits(rhs.high | (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), static_cast(lhs) | rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const int128 lhs, const UnsignedInteger rhs) noexcept { return detail::from_bits(lhs.high, lhs.low | static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator|(const UnsignedInteger lhs, const int128 rhs) noexcept { return detail::from_bits(rhs.high, static_cast(lhs) | rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator|(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator|(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs | static_cast(rhs); + return lhs | static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator|(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator|(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) | rhs; + return static_cast(lhs) | rhs; } @@ -1055,13 +1055,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int1 //===================================== template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator|=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator|=(const Integer rhs) noexcept { - *this = static_cast(*this | rhs); + *this = static_cast(*this | rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator|=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator|=(const int128 rhs) noexcept { *this = *this | rhs; return *this; @@ -1070,9 +1070,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator|=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator|=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator|=(const Integer rhs) noexcept { - *this = static_cast(*this | rhs); + *this = static_cast(*this | rhs); return *this; } @@ -1082,45 +1082,45 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator|=(const Integer rhs // And Operator //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const int128 lhs, const int128 rhs) noexcept { return detail::from_bits(lhs.high & rhs.high, lhs.low & rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const int128 lhs, const SignedInteger rhs) noexcept { return detail::from_bits(lhs.high & (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low & static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const SignedInteger lhs, const int128 rhs) noexcept { return detail::from_bits(rhs.high & (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), static_cast(lhs) & rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const int128 lhs, const UnsignedInteger rhs) noexcept { return {0, lhs.low & static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator&(const UnsignedInteger lhs, const int128 rhs) noexcept { return {0, static_cast(lhs) & rhs.low}; } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator&(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator&(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs & static_cast(rhs); + return lhs & static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator&(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator&(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) & rhs; + return static_cast(lhs) & rhs; } @@ -1129,9 +1129,9 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int1 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator&=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator&=(const Integer rhs) noexcept { - *this = static_cast(*this & rhs); + *this = static_cast(*this & rhs); return *this; } @@ -1142,13 +1142,13 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator&=(const Integer rhs //===================================== template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator&=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator&=(const Integer rhs) noexcept { - *this = static_cast(*this & rhs); + *this = static_cast(*this & rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator&=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator&=(const int128 rhs) noexcept { *this = *this & rhs; return *this; @@ -1158,45 +1158,45 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator&=(const int128_t // XOR Operator //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const int128 lhs, const int128 rhs) noexcept { return detail::from_bits(lhs.high ^ rhs.high, lhs.low ^ rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const int128 lhs, const SignedInteger rhs) noexcept { return detail::from_bits(lhs.high ^ (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low ^ static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const SignedInteger lhs, const int128 rhs) noexcept { return detail::from_bits(rhs.high ^ (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), static_cast(lhs) ^ rhs.low); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const int128 lhs, const UnsignedInteger rhs) noexcept { return detail::from_bits(lhs.high, lhs.low ^ static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator^(const UnsignedInteger lhs, const int128 rhs) noexcept { return detail::from_bits(rhs.high, static_cast(lhs) ^ rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator^(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator^(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs ^ static_cast(rhs); + return lhs ^ static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator^(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator^(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) ^ rhs; + return static_cast(lhs) ^ rhs; } @@ -1207,13 +1207,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int1 //===================================== template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator^=(Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator^=(Integer rhs) noexcept { - *this = static_cast(*this ^ rhs); + *this = static_cast(*this ^ rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator^=(int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator^=(int128 rhs) noexcept { *this = *this ^ rhs; return *this; @@ -1222,9 +1222,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator^=(int128_t rhs) #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator^=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator^=(const Integer rhs) noexcept { - *this = static_cast(*this ^ rhs); + *this = static_cast(*this ^ rhs); return *this; } @@ -1237,7 +1237,7 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator^=(const Integer rhs namespace detail { template -BOOST_INT128_HOST_DEVICE constexpr int128_t default_ls_impl(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 default_ls_impl(const int128 lhs, const Integer rhs) noexcept { static_assert(std::is_integral::value, "Only builtin types allowed"); @@ -1267,7 +1267,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t default_ls_impl(const int128_t lhs, } template -BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE int128 intrinsic_ls_impl(const int128 lhs, const Integer rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators; delegate @@ -1286,8 +1286,8 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const In std::memcpy(&value, &lhs, sizeof(builtin_u128)); const auto res {value << rhs}; - int128_t return_value; - std::memcpy(&return_value, &res, sizeof(int128_t)); + int128 return_value; + std::memcpy(&return_value, &res, sizeof(int128)); return return_value; #if defined(__GNUC__) && __GNUC__ >= 8 @@ -1296,7 +1296,7 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const In # else - return int128_t{static_cast(lhs) << rhs}; + return int128{static_cast(lhs) << rhs}; # endif @@ -1308,7 +1308,7 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const In } else { - int128_t res; + int128 res; res.high = __shiftleft128(lhs.low, lhs.high, static_cast(rhs)); res.low = lhs.low << rhs; @@ -1343,7 +1343,7 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const In } // namespace detail BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator<<(const int128 lhs, const Integer rhs) noexcept { #ifndef BOOST_INT128_NO_CONSTEVAL_DETECTION @@ -1363,7 +1363,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const #endif } -BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator<<(const int128 lhs, const int128 rhs) noexcept { // Out-of-range counts (negative, >= 128, or with the high word set) are // undefined, matching the built-in operators; forward to the scalar overload. @@ -1372,13 +1372,13 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator<<(const int128_t lhs, const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs << static_cast(rhs.low); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs << static_cast(rhs.low); @@ -1387,14 +1387,14 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR deta #endif BOOST_INT128_EXPORT template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) << rhs.low; } BOOST_INT128_EXPORT template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned operator<<(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr unsigned operator<<(const UnsignedInteger lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) << rhs.low; @@ -1406,13 +1406,13 @@ BOOST_INT128_HOST_DEVICE constexpr unsigned operator<<(const UnsignedInteger lhs #endif // _MSC_VER template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator<<=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator<<=(const Integer rhs) noexcept { - *this = static_cast(*this << rhs); + *this = static_cast(*this << rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator<<=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator<<=(const int128 rhs) noexcept { *this = *this << rhs; return *this; @@ -1421,9 +1421,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator<<=(const int128_ #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator<<=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator<<=(const Integer rhs) noexcept { - *this = static_cast(*this << rhs); + *this = static_cast(*this << rhs); return *this; } @@ -1440,7 +1440,7 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator<<=(const Integer rh namespace detail { template -BOOST_INT128_HOST_DEVICE constexpr int128_t default_rs_impl(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 default_rs_impl(const int128 lhs, const Integer rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators. In a @@ -1465,7 +1465,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t default_rs_impl(const int128_t lhs, } template -BOOST_INT128_HOST_DEVICE int128_t intrinsic_rs_impl(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE int128 intrinsic_rs_impl(const int128 lhs, const Integer rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators; delegate @@ -1483,8 +1483,8 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_rs_impl(const int128_t lhs, const In std::memcpy(&value, &lhs, sizeof(builtin_i128)); const auto res {value >> rhs}; - int128_t return_value; - std::memcpy(&return_value, &res, sizeof(int128_t)); + int128 return_value; + std::memcpy(&return_value, &res, sizeof(int128)); return return_value; #if defined(__GNUC__) && __GNUC__ >= 8 @@ -1506,7 +1506,7 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_rs_impl(const int128_t lhs, const In } else { - int128_t res; + int128 res; res.low = __shiftright128(lhs.low, lhs.high, static_cast(rhs)); res.high = static_cast(lhs.signed_high() >> rhs); @@ -1539,7 +1539,7 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_rs_impl(const int128_t lhs, const In } // namespace detail BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator>>(const int128 lhs, const Integer rhs) noexcept { #ifndef BOOST_INT128_NO_CONSTEVAL_DETECTION @@ -1559,7 +1559,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const int128_t lhs, const #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator>>(const int128 lhs, const int128 rhs) noexcept { // Out-of-range counts (negative, >= 128, or with the high word set) are // undefined, matching the built-in operators; forward to the scalar overload. @@ -1568,13 +1568,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator>>(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs >> static_cast(rhs.low); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs >> static_cast(rhs.low); @@ -1583,14 +1583,14 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR deta #endif BOOST_INT128_EXPORT template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) >> rhs.low; } BOOST_INT128_EXPORT template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned operator>>(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr unsigned operator>>(const UnsignedInteger lhs, const int128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) >> rhs.low; @@ -1602,13 +1602,13 @@ BOOST_INT128_HOST_DEVICE constexpr unsigned operator>>(const UnsignedInteger lhs #endif // _MSC_VER template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator>>=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator>>=(const Integer rhs) noexcept { - *this = static_cast(*this >> rhs); + *this = static_cast(*this >> rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator>>=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator>>=(const int128 rhs) noexcept { *this = *this >> rhs; return *this; @@ -1617,9 +1617,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator>>=(const int128_ #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator>>=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator>>=(const Integer rhs) noexcept { - *this = static_cast(*this >> rhs); + *this = static_cast(*this >> rhs); return *this; } @@ -1633,7 +1633,7 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator>>=(const Integer rh // Increment Operators //===================================== -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator++() noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator++() noexcept { if (++low == UINT64_C(0)) { @@ -1643,7 +1643,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator++() noexcept return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t int128_t::operator++(int) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 int128::operator++(int) noexcept { const auto temp {*this}; ++(*this); @@ -1654,7 +1654,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t int128_t::operator++(int) noexcept // Decrement Operators //===================================== -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator--() noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator--() noexcept { if (low-- == UINT64_C(0)) { @@ -1664,7 +1664,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator--() noexcept return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t int128_t::operator--(int) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 int128::operator--(int) noexcept { const auto temp {*this}; --(*this); @@ -1677,7 +1677,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t int128_t::operator--(int) noexcept namespace detail { -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t library_add(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 library_add(const int128 lhs, const int128 rhs) noexcept { const auto new_low {lhs.low + rhs.low}; const auto new_high {lhs.high + @@ -1687,12 +1687,12 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t library_ad return detail::from_bits(new_high, new_low); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_add(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_add(const int128 lhs, const int128 rhs) noexcept { #if (defined(__x86_64__) || (defined(__aarch64__) && !defined(__APPLE__))) && !defined(_WIN32) && defined(BOOST_INT128_HAS_INT128) // Compute in the unsigned domain so that overflow wraps modulo 2^128 - return int128_t{static_cast(lhs) + static_cast(rhs)}; + return int128{static_cast(lhs) + static_cast(rhs)}; #elif defined(BOOST_INT128_HAS_BUILTIN_ADD_OVERFLOW) @@ -1711,7 +1711,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_ad } else { - int128_t result {}; + int128 result {}; const auto carry {BOOST_INT128_ADD_CARRY(0, lhs.low, rhs.low, &result.low)}; BOOST_INT128_ADD_CARRY(carry, lhs.high, rhs.high, &result.high); @@ -1726,7 +1726,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_ad } template -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_add(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_add(const int128 lhs, const Integer rhs) noexcept { const auto new_low {lhs.low + rhs}; const auto new_high {lhs.high + static_cast(new_low < lhs.low)}; @@ -1734,7 +1734,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_ad return detail::from_bits(new_high, new_low); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t library_sub(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 library_sub(const int128 lhs, const int128 rhs) noexcept { const auto new_low {lhs.low - rhs.low}; const auto new_high {lhs.high - rhs.high - static_cast(lhs.low < rhs.low)}; @@ -1742,7 +1742,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t library_su return detail::from_bits(new_high, new_low); } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_sub(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_sub(const int128 lhs, const int128 rhs) noexcept { #if defined(BOOST_INT128_HAS_BUILTIN_SUB_OVERFLOW) && (!defined(__aarch64__) || defined(__APPLE__) || !defined(BOOST_INT128_HAS_INT128)) && !(defined(__CUDACC__) && defined(BOOST_INT128_ENABLE_CUDA)) @@ -1755,7 +1755,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_su #elif defined(__aarch64__) && !defined(__APPLE__) // Unsigned wrap for consistent two's-complement semantics - return int128_t{static_cast(lhs) - static_cast(rhs)}; + return int128{static_cast(lhs) - static_cast(rhs)}; #elif defined(_M_AMD64) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -1765,7 +1765,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_su } else { - int128_t result {}; + int128 result {}; const auto borrow {BOOST_INT128_SUB_BORROW(0, lhs.low, rhs.low, &result.low)}; BOOST_INT128_SUB_BORROW(borrow, lhs.high, rhs.high, &result.high); @@ -1780,7 +1780,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_su } template -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_sub(const int128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_sub(const int128 lhs, const Integer rhs) noexcept { const auto new_low {lhs.low - rhs}; const auto new_high {lhs.high - static_cast(new_low > lhs.low)}; @@ -1793,14 +1793,14 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_su // doing addition via subtraction is >10% faster in the benchmarks #if defined(__s390__) || defined(__s390x__) -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 lhs, const int128 rhs) noexcept { return detail::default_sub(lhs, -rhs); } #else -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 lhs, const int128 rhs) noexcept { return detail::default_add(lhs, rhs); } @@ -1808,13 +1808,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 lhs, const UnsignedInteger rhs) noexcept { return detail::default_add(lhs, rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const UnsignedInteger lhs, const int128 rhs) noexcept { return detail::default_add(rhs, lhs); } @@ -1825,7 +1825,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const UnsignedInteger lhs, #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const int128 lhs, const SignedInteger rhs) noexcept { // Negate in the unsigned domain so INT64_MIN does not overflow (UBSAN) return rhs < 0 ? detail::default_sub(lhs, -static_cast(rhs)) : @@ -1833,7 +1833,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const int128_t lhs, const } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator+(const SignedInteger lhs, const int128 rhs) noexcept { return lhs < 0 ? detail::default_sub(rhs, -static_cast(lhs)) : detail::default_add(rhs, static_cast(lhs)); @@ -1846,26 +1846,26 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const SignedInteger lhs, c #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator+(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator+(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return detail::default_add(lhs, static_cast(rhs)); + return detail::default_add(lhs, static_cast(rhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator+(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator+(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return detail::default_add(rhs, static_cast(lhs)); + return detail::default_add(rhs, static_cast(lhs)); } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator+=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator+=(const Integer rhs) noexcept { - *this = static_cast(*this + rhs); + *this = static_cast(*this + rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator+=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator+=(const int128 rhs) noexcept { *this = *this + rhs; return *this; @@ -1874,9 +1874,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator+=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator+=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator+=(const Integer rhs) noexcept { - *this = static_cast(*this + rhs); + *this = static_cast(*this + rhs); return *this; } @@ -1886,58 +1886,58 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator+=(const Integer rhs // Subtraction Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 lhs, const int128 rhs) noexcept { return detail::default_sub(lhs, rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 lhs, const UnsignedInteger rhs) noexcept { return detail::default_sub(lhs, rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const UnsignedInteger lhs, const int128 rhs) noexcept { return detail::default_add(-rhs, lhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const int128 lhs, const SignedInteger rhs) noexcept { - return detail::default_sub(lhs, static_cast(rhs)); + return detail::default_sub(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator-(const SignedInteger lhs, const int128 rhs) noexcept { - return detail::default_sub(static_cast(lhs), rhs); + return detail::default_sub(static_cast(lhs), rhs); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator-(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator-(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs - static_cast(rhs); + return lhs - static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator-(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator-(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) - rhs; + return static_cast(lhs) - rhs; } #endif template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator-=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator-=(const Integer rhs) noexcept { - *this = static_cast(*this - rhs); + *this = static_cast(*this - rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator-=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator-=(const int128 rhs) noexcept { *this = *this - rhs; return *this; @@ -1946,9 +1946,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator-=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator-=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator-=(const Integer rhs) noexcept { - *this = static_cast(*this - rhs); + *this = static_cast(*this - rhs); return *this; } @@ -1960,29 +1960,29 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator-=(const Integer rhs namespace detail { -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mul(const int128_t lhs, const std::uint64_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_mul(const int128 lhs, const std::uint64_t rhs) noexcept { #if defined(BOOST_INT128_HAS_INT128) && !defined(__s390__) && !defined(__s390x__) - return int128_t{static_cast(lhs) * static_cast(rhs)}; + return int128{static_cast(lhs) * static_cast(rhs)}; #else - return low_word_mul(lhs, rhs); + return low_word_mul(lhs, rhs); #endif } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mul(const int128_t lhs, const std::uint32_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_mul(const int128 lhs, const std::uint32_t rhs) noexcept { return default_mul(lhs, static_cast(rhs)); } #if defined(_M_AMD64) && !defined(__GNUC__) -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE int128_t msvc_amd64_mul(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE int128 msvc_amd64_mul(const int128 lhs, const int128 rhs) noexcept { - int128_t result {}; + int128 result {}; result.low = _umul128(lhs.low, rhs.low, &result.high); result.high += lhs.low * rhs.high; result.high += lhs.high * rhs.low; @@ -1992,7 +1992,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE int128_t msvc_amd64_mul(const #endif -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mul(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128 default_mul(const int128 lhs, const int128 rhs) noexcept { #if ((defined(__aarch64__) && defined(__APPLE__)) || defined(__x86_64__) || defined(__PPC__) || defined(__powerpc__)) && defined(__GNUC__) && !defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -2000,7 +2000,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mu if (BOOST_INT128_IS_CONSTANT_EVALUATED(lhs)) { - return low_word_mul(lhs, rhs); + return low_word_mul(lhs, rhs); } else { @@ -2014,7 +2014,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mu std::memcpy(&new_rhs, &rhs, sizeof(detail::builtin_u128)); const auto res {new_lhs * new_rhs}; - int128_t library_res {}; + int128 library_res {}; std::memcpy(&library_res, &res, sizeof(detail::builtin_u128)); @@ -2026,23 +2026,23 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mu # elif defined(BOOST_INT128_HAS_INT128) // Unsigned wrap for consistent two's-complement semantics - return int128_t{static_cast(lhs) * static_cast(rhs)}; + return int128{static_cast(lhs) * static_cast(rhs)}; # else - return low_word_mul(lhs, rhs); + return low_word_mul(lhs, rhs); # endif #elif defined(__aarch64__) && defined(BOOST_INT128_HAS_INT128) - return int128_t{static_cast(lhs) * static_cast(rhs)}; + return int128{static_cast(lhs) * static_cast(rhs)}; #elif defined(_M_AMD64) && !defined(__GNUC__) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) if (BOOST_INT128_IS_CONSTANT_EVALUATED(rhs)) { - return low_word_mul(lhs, rhs); // LCOV_EXCL_LINE + return low_word_mul(lhs, rhs); // LCOV_EXCL_LINE } else { @@ -2052,31 +2052,31 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mu #elif defined(BOOST_INT128_HAS_INT128) && !defined(__s390__) && !defined(__s390x__) // Multiply in the unsigned domain to avoid signed-overflow UB, then reinterpret the bits. - return int128_t{static_cast(lhs) * static_cast(rhs)}; + return int128{static_cast(lhs) * static_cast(rhs)}; #else - return low_word_mul(lhs, rhs); + return low_word_mul(lhs, rhs); #endif } } // namespace detail -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const int128 lhs, const int128 rhs) noexcept { return detail::default_mul(lhs, rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const int128 lhs, const UnsignedInteger rhs) noexcept { using local_eval_type = detail::evaluation_type_t; return detail::default_mul(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const UnsignedInteger lhs, const int128 rhs) noexcept { using local_eval_type = detail::evaluation_type_t; return detail::default_mul(rhs, static_cast(lhs)); @@ -2088,14 +2088,14 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const UnsignedInteger lhs, #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const int128 lhs, const SignedInteger rhs) noexcept { return rhs < 0 ? -detail::default_mul(lhs, -static_cast(rhs)) : detail::default_mul(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator*(const SignedInteger lhs, const int128 rhs) noexcept { return lhs < 0 ? -detail::default_mul(rhs, -static_cast(lhs)) : detail::default_mul(rhs, static_cast(lhs)); @@ -2107,26 +2107,26 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const SignedInteger lhs, c #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator*(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator*(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return detail::default_mul(lhs, static_cast(rhs)); + return detail::default_mul(lhs, static_cast(rhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator*(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator*(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return detail::default_mul(rhs, static_cast(lhs)); + return detail::default_mul(rhs, static_cast(lhs)); } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator*=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator*=(const Integer rhs) noexcept { - *this = static_cast(*this * rhs); + *this = static_cast(*this * rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator*=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator*=(const int128 rhs) noexcept { *this = *this * rhs; return *this; @@ -2135,9 +2135,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator*=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator*=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator*=(const Integer rhs) noexcept { - *this = static_cast(*this * rhs); + *this = static_cast(*this * rhs); return *this; } @@ -2152,7 +2152,7 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator*=(const Integer rhs # pragma clang diagnostic ignored "-Wassume" #endif -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const int128 lhs, const int128 rhs) noexcept { if (BOOST_INT128_UNLIKELY(rhs == 0)) { @@ -2160,7 +2160,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const BOOST_INT128_UNREACHABLE; } - constexpr int128_t min_val {INT64_MIN, 0}; + constexpr int128 min_val {INT64_MIN, 0}; const auto abs_lhs {abs(lhs)}; const auto abs_rhs {abs(rhs)}; @@ -2176,7 +2176,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const // computed above and beats native signed division (the out-of-line __divti3) for this case. if (abs_rhs.high == 0) { - int128_t quotient {}; + int128 quotient {}; if (abs_lhs.high == 0) { @@ -2192,7 +2192,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const #if defined(BOOST_INT128_HAS_INT128) - return static_cast(static_cast(lhs) / static_cast(rhs)); + return static_cast(static_cast(lhs) / static_cast(rhs)); #else @@ -2203,7 +2203,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const int128 lhs, const UnsignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -2215,13 +2215,13 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const const auto abs_lhs {abs(lhs)}; - int128_t quotient {}; + int128 quotient {}; detail::one_word_div(abs_lhs, static_cast(rhs), quotient); return lhs < 0 ? -quotient : quotient; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const UnsignedInteger lhs, const int128 rhs) noexcept { if (BOOST_INT128_UNLIKELY(rhs == 0)) { @@ -2242,7 +2242,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const UnsignedInteger lhs, return {0, 0}; } const auto res {static_cast(lhs) / abs_rhs.low}; - const int128_t result {0, res}; + const int128 result {0, res}; return rhs < 0 ? -result : result; } } @@ -2253,7 +2253,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const UnsignedInteger lhs, #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const int128 lhs, const SignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -2263,9 +2263,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const BOOST_INT128_UNREACHABLE; } - int128_t quotient {}; + int128 quotient {}; - constexpr int128_t min_val {INT64_MIN, 0}; + constexpr int128 min_val {INT64_MIN, 0}; const auto negative_res {static_cast((lhs.signed_high() < 0) ^ (rhs < 0))}; // Negate in the unsigned domain so INT64_MIN does not overflow (UBSAN) const auto abs_rhs {rhs < 0 ? -static_cast(rhs) : static_cast(rhs)}; @@ -2282,7 +2282,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator/(const SignedInteger lhs, const int128 rhs) noexcept { if (BOOST_INT128_UNLIKELY(rhs == 0)) { @@ -2305,7 +2305,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const SignedInteger lhs, c } // Negate in the unsigned domain so INT64_MIN does not overflow (UBSAN) const auto abs_lhs {lhs < 0 ? -static_cast(lhs) : static_cast(lhs)}; - const int128_t res {0, abs_lhs / abs_rhs.low}; + const int128 res {0, abs_lhs / abs_rhs.low}; return negative_res ? -res : res; } @@ -2318,39 +2318,39 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const SignedInteger lhs, c #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator/(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator/(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return static_cast(static_cast(lhs) / rhs); + return static_cast(static_cast(lhs) / rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator/(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator/(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs / static_cast(rhs)); + return static_cast(lhs / static_cast(rhs)); } #elif defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128_t operator/(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128 operator/(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs / static_cast(rhs); + return lhs / static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128_t operator/(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128 operator/(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) / rhs; + return static_cast(lhs) / rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator/=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator/=(const Integer rhs) noexcept { - *this = static_cast(*this / rhs); + *this = static_cast(*this / rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator/=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator/=(const int128 rhs) noexcept { *this = *this / rhs; return *this; @@ -2359,9 +2359,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator/=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator/=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator/=(const Integer rhs) noexcept { - *this = static_cast(*this / rhs); + *this = static_cast(*this / rhs); return *this; } @@ -2378,21 +2378,21 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator/=(const Integer rhs //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(int128_t lhs, UnsignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(int128 lhs, UnsignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(UnsignedInteger lhs, int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(UnsignedInteger lhs, int128 rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(int128_t lhs, SignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(int128 lhs, SignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(SignedInteger lhs, int128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(SignedInteger lhs, int128 rhs) noexcept; -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(int128_t lhs, int128_t rhs) noexcept; +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator%(int128 lhs, int128 rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const int128 lhs, const UnsignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -2402,8 +2402,8 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const BOOST_INT128_UNREACHABLE; } - int128_t quotient {}; - int128_t remainder {}; + int128 quotient {}; + int128 remainder {}; const auto abs_lhs {abs(lhs)}; @@ -2413,7 +2413,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const } template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const UnsignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const UnsignedInteger lhs, const int128 rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -2430,24 +2430,24 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const UnsignedInteger lhs, return lhs; } - const int128_t remainder {0, static_cast(lhs) % abs_rhs.low}; + const int128 remainder {0, static_cast(lhs) % abs_rhs.low}; return remainder; } template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const int128 lhs, const SignedInteger rhs) noexcept { - return lhs % static_cast(rhs); + return lhs % static_cast(rhs); } template -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const SignedInteger lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const SignedInteger lhs, const int128 rhs) noexcept { - return static_cast(lhs) % rhs; + return static_cast(lhs) % rhs; } -BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128 operator%(const int128 lhs, const int128 rhs) noexcept { if (rhs == 0) { @@ -2455,7 +2455,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const BOOST_INT128_UNREACHABLE; } - constexpr int128_t min_val {INT64_MIN, 0}; + constexpr int128 min_val {INT64_MIN, 0}; const auto abs_lhs {abs(lhs)}; const auto abs_rhs {abs(rhs)}; @@ -2470,15 +2470,15 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const // magnitudes with the hardware-accelerated one_word_div and reapply the dividend's sign. if (abs_rhs.high == 0) { - int128_t remainder {}; + int128 remainder {}; if (abs_lhs.high == 0) { - remainder = int128_t{0, abs_lhs.low % abs_rhs.low}; + remainder = int128{0, abs_lhs.low % abs_rhs.low}; } else { - int128_t quotient {}; + int128 quotient {}; detail::one_word_div(abs_lhs, abs_rhs.low, quotient, remainder); } @@ -2487,11 +2487,11 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const #if defined(BOOST_INT128_HAS_INT128) - return static_cast(static_cast(lhs) % static_cast(rhs)); + return static_cast(static_cast(lhs) % static_cast(rhs)); #else - int128_t remainder {}; + int128 remainder {}; detail::knuth_div(abs_lhs, abs_rhs, remainder); return is_neg ? -remainder : remainder; @@ -2500,12 +2500,12 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator%(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator%(const int128 lhs, const detail::builtin_i128 rhs) noexcept { return static_cast(lhs) % rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t operator%(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128 operator%(const detail::builtin_i128 lhs, const int128 rhs) noexcept { return lhs % static_cast(rhs); } @@ -2513,27 +2513,27 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int1 #elif defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128_t operator%(const int128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128 operator%(const int128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs % static_cast(rhs); + return lhs % static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128_t operator%(const detail::builtin_i128 lhs, const int128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE inline int128 operator%(const detail::builtin_i128 lhs, const int128 rhs) noexcept { - return static_cast(lhs) % rhs; + return static_cast(lhs) % rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator%=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator%=(const Integer rhs) noexcept { - *this = static_cast(*this % rhs); + *this = static_cast(*this % rhs); return *this; } -BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator%=(const int128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int128& int128::operator%=(const int128 rhs) noexcept { *this = *this % rhs; return *this; @@ -2542,9 +2542,9 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator%=(const int128_t #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator%=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline int128& int128::operator%=(const Integer rhs) noexcept { - *this = static_cast(*this % rhs); + *this = static_cast(*this % rhs); return *this; } @@ -2600,15 +2600,15 @@ class numeric_limits_impl_i128 static constexpr bool tinyness_before = false; // Member functions - BOOST_INT128_HOST_DEVICE static constexpr auto (min) () -> boost::int128::int128_t { return {INT64_MIN, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto lowest () -> boost::int128::int128_t { return {INT64_MIN, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto (max) () -> boost::int128::int128_t { return {INT64_MAX, UINT64_MAX}; } - BOOST_INT128_HOST_DEVICE static constexpr auto epsilon () -> boost::int128::int128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto round_error () -> boost::int128::int128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto infinity () -> boost::int128::int128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto quiet_NaN () -> boost::int128::int128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto signaling_NaN() -> boost::int128::int128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto denorm_min () -> boost::int128::int128_t { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto (min) () -> boost::int128::int128 { return {INT64_MIN, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto lowest () -> boost::int128::int128 { return {INT64_MIN, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto (max) () -> boost::int128::int128 { return {INT64_MAX, UINT64_MAX}; } + BOOST_INT128_HOST_DEVICE static constexpr auto epsilon () -> boost::int128::int128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto round_error () -> boost::int128::int128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto infinity () -> boost::int128::int128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto quiet_NaN () -> boost::int128::int128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto signaling_NaN() -> boost::int128::int128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto denorm_min () -> boost::int128::int128 { return {0, 0}; } }; #if !defined(__cpp_inline_variables) || __cpp_inline_variables < 201606L @@ -2670,7 +2670,7 @@ namespace std { #endif template <> -class numeric_limits : +class numeric_limits : public boost::int128::detail::numeric_limits_impl_i128 {}; #ifdef __clang__ diff --git a/include/boost/int128/detail/mini_from_chars.hpp b/include/boost/int128/detail/mini_from_chars.hpp index 94291e54..def96673 100644 --- a/include/boost/int128/detail/mini_from_chars.hpp +++ b/include/boost/int128/detail/mini_from_chars.hpp @@ -247,26 +247,26 @@ BOOST_INT128_HOST_DEVICE constexpr int from_chars_integer_impl(const char* first } } // namespace impl -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars(const char* first, const char* last, uint128_t& value, int base = 10) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars(const char* first, const char* last, uint128& value, int base = 10) noexcept { - return impl::from_chars_integer_impl(first, last, value, base); + return impl::from_chars_integer_impl(first, last, value, base); } -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars(const char* first, const char* last, int128_t& value, int base = 10) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars(const char* first, const char* last, int128& value, int base = 10) noexcept { - return impl::from_chars_integer_impl(first, last, value, base); + return impl::from_chars_integer_impl(first, last, value, base); } // Parsing entry points for the user-defined literals. Unlike from_chars these skip the // C++ digit separator ' so that literals such as 1'234'567_u128 are accepted. -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_literal(const char* first, const char* last, uint128_t& value, int base = 10) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_literal(const char* first, const char* last, uint128& value, int base = 10) noexcept { - return impl::from_chars_integer_impl(first, last, value, base); + return impl::from_chars_integer_impl(first, last, value, base); } -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_literal(const char* first, const char* last, int128_t& value, int base = 10) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_literal(const char* first, const char* last, int128& value, int base = 10) noexcept { - return impl::from_chars_integer_impl(first, last, value, base); + return impl::from_chars_integer_impl(first, last, value, base); } // Rejects an out of range literal @@ -275,7 +275,7 @@ BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_liter #if defined(BOOST_INT128_HAS_GPU_SUPPORT) || defined(BOOST_INT128_DISABLE_EXCEPTIONS) BOOST_INT128_UNREACHABLE; #else - BOOST_INT128_THROW_EXCEPTION(std::out_of_range("Literal is out of range of the target type")); + BOOST_int128HROW_EXCEPTION(std::out_of_range("Literal is out of range of the target type")); #endif } @@ -285,7 +285,7 @@ BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr int from_chars_liter #if defined(BOOST_INT128_HAS_GPU_SUPPORT) || defined(BOOST_INT128_DISABLE_EXCEPTIONS) BOOST_INT128_UNREACHABLE; #else - BOOST_INT128_THROW_EXCEPTION(std::invalid_argument("Literal is not a valid integer")); + BOOST_int128HROW_EXCEPTION(std::invalid_argument("Literal is not a valid integer")); #endif } diff --git a/include/boost/int128/detail/mini_to_chars.hpp b/include/boost/int128/detail/mini_to_chars.hpp index 5f4d6c7c..6d2f56e4 100644 --- a/include/boost/int128/detail/mini_to_chars.hpp +++ b/include/boost/int128/detail/mini_to_chars.hpp @@ -34,7 +34,7 @@ static_assert(sizeof(upper_case_digit_table) == sizeof(char) * 16, "10 numbers, #endif // !__NVCC__ -BOOST_INT128_HOST_DEVICE constexpr char* mini_to_chars(char (&buffer)[mini_to_chars_buffer_size], uint128_t v, const int base, const bool uppercase) noexcept +BOOST_INT128_HOST_DEVICE constexpr char* mini_to_chars(char (&buffer)[mini_to_chars_buffer_size], uint128 v, const int base, const bool uppercase) noexcept { #if defined(BOOST_INT128_HAS_GPU_SUPPORT) constexpr char lower_case_digit_table[] = { @@ -101,28 +101,28 @@ BOOST_INT128_HOST_DEVICE constexpr char* mini_to_chars(char (&buffer)[mini_to_ch return last; } -BOOST_INT128_HOST_DEVICE constexpr char* mini_to_chars(char (&buffer)[mini_to_chars_buffer_size], const int128_t v, const int base, const bool uppercase) noexcept +BOOST_INT128_HOST_DEVICE constexpr char* mini_to_chars(char (&buffer)[mini_to_chars_buffer_size], const int128 v, const int base, const bool uppercase) noexcept { char* p {nullptr}; if (v < 0) { // We cant negate the min value inside the signed type, but we know what the result will be - if (v == (std::numeric_limits::min)()) + if (v == (std::numeric_limits::min)()) { - p = mini_to_chars(buffer, uint128_t{UINT64_C(0x8000000000000000), 0}, base, uppercase); + p = mini_to_chars(buffer, uint128{UINT64_C(0x8000000000000000), 0}, base, uppercase); } else { const auto neg_v {-v}; - p = mini_to_chars(buffer, static_cast(neg_v), base, uppercase); + p = mini_to_chars(buffer, static_cast(neg_v), base, uppercase); } *--p = '-'; } else { - p = mini_to_chars(buffer, static_cast(v), base, uppercase); + p = mini_to_chars(buffer, static_cast(v), base, uppercase); } return p; diff --git a/include/boost/int128/detail/uint128_imp.hpp b/include/boost/int128/detail/uint128_imp.hpp index 0e378aaf..701c64f5 100644 --- a/include/boost/int128/detail/uint128_imp.hpp +++ b/include/boost/int128/detail/uint128_imp.hpp @@ -29,7 +29,7 @@ BOOST_INT128_EXPORT struct #if (defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128)) && !defined(_M_IX86) alignas(alignof(detail::builtin_u128)) #endif -uint128_t +uint128 { #if BOOST_INT128_ENDIAN_LITTLE_BYTE std::uint64_t low {}; @@ -51,33 +51,33 @@ uint128_t #endif // BOOST_INT128_ENDIAN_LITTLE_BYTE // Defaulted basic construction - constexpr uint128_t() noexcept = default; - constexpr uint128_t(const uint128_t&) noexcept = default; - constexpr uint128_t(uint128_t&&) noexcept = default; - constexpr uint128_t& operator=(const uint128_t&) noexcept = default; - constexpr uint128_t& operator=(uint128_t&&) noexcept = default; + constexpr uint128() noexcept = default; + constexpr uint128(const uint128&) noexcept = default; + constexpr uint128(uint128&&) noexcept = default; + constexpr uint128& operator=(const uint128&) noexcept = default; + constexpr uint128& operator=(uint128&&) noexcept = default; // Requires a conversion file to be implemented - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const int128_t& v) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(const int128& v) noexcept; // Construct from integral types #if BOOST_INT128_ENDIAN_LITTLE_BYTE - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const std::uint64_t hi, const std::uint64_t lo) noexcept : low {lo}, high {hi} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const std::uint64_t hi, const std::uint64_t lo) noexcept : low {lo}, high {hi} {} template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const SignedInteger v) noexcept : low {static_cast(v)}, high {v < 0 ? UINT64_MAX : UINT64_C(0)} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const SignedInteger v) noexcept : low {static_cast(v)}, high {v < 0 ? UINT64_MAX : UINT64_C(0)} {} template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const UnsignedInteger v) noexcept : low {static_cast(v)}, high {} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const UnsignedInteger v) noexcept : low {static_cast(v)}, high {} {} #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t(const detail::builtin_i128 v) noexcept : + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128(const detail::builtin_i128 v) noexcept : low {static_cast(v)}, high {static_cast(static_cast(v) >> static_cast(64U))} {} - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t(const detail::builtin_u128 v) noexcept : + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128(const detail::builtin_u128 v) noexcept : low {static_cast(v)}, high {static_cast(v >> static_cast(64U))} {} @@ -85,21 +85,21 @@ uint128_t #else // Big endian - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const std::uint64_t hi, const std::uint64_t lo) noexcept : high {hi}, low {lo} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const std::uint64_t hi, const std::uint64_t lo) noexcept : high {hi}, low {lo} {} template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const SignedInteger v) noexcept : high {v < 0 ? UINT64_MAX : UINT64_C(0)}, low {static_cast(v)} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const SignedInteger v) noexcept : high {v < 0 ? UINT64_MAX : UINT64_C(0)}, low {static_cast(v)} {} template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(const UnsignedInteger v) noexcept : high {}, low {static_cast(v)} {} + BOOST_INT128_HOST_DEVICE constexpr uint128(const UnsignedInteger v) noexcept : high {}, low {static_cast(v)} {} #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t(const detail::builtin_i128 v) noexcept : + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128(const detail::builtin_i128 v) noexcept : high {static_cast(static_cast(v) >> 64U)}, low {static_cast(v)} {} - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t(const detail::builtin_u128 v) noexcept : + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128(const detail::builtin_u128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v)} {} @@ -109,7 +109,7 @@ uint128_t // Construct from floating-point types template - BOOST_INT128_HOST_DEVICE constexpr uint128_t(Float f) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128(Float f) noexcept; // Integer conversion operators BOOST_INT128_HOST_DEVICE explicit constexpr operator bool() const noexcept {return low || high; } @@ -142,136 +142,136 @@ uint128_t // Compound OR template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator|=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator|=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator|=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator|=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator|=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator|=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound AND template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator&=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator&=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator&=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator&=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator&=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator&=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound XOR template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator^=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator^=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator^=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator^=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator^=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator^=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Left Shift template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator<<=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator<<=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator<<=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator<<=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator<<=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator<<=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Right Shift template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator>>=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator>>=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator>>=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator>>=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator>>=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator>>=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator++() noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t operator++(int) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator--() noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t operator--(int) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator++() noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128 operator++(int) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator--() noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128 operator--(int) noexcept; // Compound Addition template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator+=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator+=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator+=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator+=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator+=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator+=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Subtraction template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator-=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator-=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator-=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator-=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator-=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator-=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Multiplication template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator*=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator*=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator*=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator*=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator*=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator*=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound Division template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator/=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator/=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator/=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator/=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator/=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator/=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 // Compound modulo template - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator%=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator%=(Integer rhs) noexcept; - BOOST_INT128_HOST_DEVICE constexpr uint128_t& operator%=(uint128_t rhs) noexcept; + BOOST_INT128_HOST_DEVICE constexpr uint128& operator%=(uint128 rhs) noexcept; #ifdef BOOST_INT128_HAS_MSVC_INT128 template - BOOST_INT128_HOST_DEVICE inline uint128_t& operator%=(Integer rhs) noexcept; + BOOST_INT128_HOST_DEVICE inline uint128& operator%=(Integer rhs) noexcept; #endif // BOOST_INT128_HAS_MSVC_INT128 }; @@ -280,7 +280,7 @@ uint128_t // Absolute Value function //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t abs(const uint128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 abs(const uint128 value) noexcept { return value; } @@ -293,7 +293,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t abs(const uint1 // runtime (__floatuntisf and friends) is correctly rounded. The portable fallback // composes the words as high * 2^64 + low; see detail/float_conversion.hpp -BOOST_INT128_HOST_DEVICE constexpr uint128_t::operator float() const noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128::operator float() const noexcept { #if defined(BOOST_INT128_HAS_INT128) && !defined(BOOST_INT128_HAS_GPU_SUPPORT) @@ -306,7 +306,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t::operator float() const noexcept #endif } -BOOST_INT128_HOST_DEVICE constexpr uint128_t::operator double() const noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128::operator double() const noexcept { #if defined(BOOST_INT128_HAS_INT128) && !defined(BOOST_INT128_HAS_GPU_SUPPORT) @@ -321,7 +321,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t::operator double() const noexcept #if !defined(BOOST_INT128_HAS_GPU_SUPPORT) -constexpr uint128_t::operator long double() const noexcept +constexpr uint128::operator long double() const noexcept { #if defined(BOOST_INT128_HAS_INT128) @@ -344,7 +344,7 @@ constexpr uint128_t::operator long double() const noexcept // NaN/negative -> 0 // overflow -> UINT128_MAX. template -BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(Float f) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128::uint128(Float f) noexcept { constexpr Float two_32 {static_cast(UINT64_C(1) << 32)}; constexpr Float two_64 {two_32 * two_32}; @@ -375,12 +375,12 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(Float f) noexcept // Unary Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 value) noexcept { return value; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t value) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 value) noexcept { return {~value.high + static_cast(value.low == UINT64_C(0)), ~value.low + UINT64_C(1)}; } @@ -389,12 +389,12 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const // Equality Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128_t lhs, const bool rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128 lhs, const bool rhs) noexcept { return lhs.high == UINT64_C(0) && lhs.low == static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const bool lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const bool lhs, const uint128 rhs) noexcept { return rhs.high == UINT64_C(0) && rhs.low == static_cast(lhs); } @@ -408,32 +408,32 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const boo #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high == rhs_u.high && lhs.low == rhs_u.low; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high == rhs.high && lhs_u.low == rhs.low; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high == UINT64_C(0) && lhs.low == static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator==(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator==(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high == UINT64_C(0) && rhs.low == static_cast(lhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uint128 lhs, const uint128 rhs) noexcept { #if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_AMD64) @@ -467,24 +467,24 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const uin #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs == static_cast(rhs); + return lhs == static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) == rhs; + return static_cast(lhs) == rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs == static_cast(rhs); + return lhs == static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator==(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) == rhs; + return static_cast(lhs) == rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -493,43 +493,43 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool // Inequality Operators //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128_t lhs, const bool rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128 lhs, const bool rhs) noexcept { return lhs.high != UINT64_C(0) || lhs.low != static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const bool lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const bool lhs, const uint128 rhs) noexcept { return rhs.high != UINT64_C(0) || rhs.low != static_cast(lhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high != rhs_u.high || lhs.low != rhs_u.low; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high != rhs.high || lhs_u.low != rhs.low; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high != UINT64_C(0) || lhs.low != static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high != UINT64_C(0) || rhs.low != static_cast(lhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uint128 lhs, const uint128 rhs) noexcept { #if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_AMD64) @@ -564,25 +564,25 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const uin #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_BUILTIN_CONSTEXPR) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs != static_cast(rhs); + return lhs != static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) != rhs; + return static_cast(lhs) != rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs != static_cast(rhs); + return lhs != static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator!=(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) != rhs; + return static_cast(lhs) != rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -592,32 +592,32 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high == rhs_u.high ? lhs.low < rhs_u.low : lhs.high < rhs_u.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high == rhs.high ? lhs_u.low < rhs.low : lhs_u.high < rhs.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high == UINT64_C(0) && lhs.low < static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high > UINT64_C(0) || static_cast(lhs) < rhs.low; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint128 lhs, const uint128 rhs) noexcept { // On ARM macs only with the clang compiler is casting to unsigned __int128 uniformly better (and seemingly cost free) #if defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -682,25 +682,25 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const uint #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs < static_cast(rhs); + return lhs < static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) < rhs; + return static_cast(lhs) < rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs < static_cast(rhs); + return lhs < static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) < rhs; + return static_cast(lhs) < rhs; } #endif // BOOST_INT128_HAS_INT128 @@ -710,32 +710,32 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high == rhs_u.high ? lhs.low <= rhs_u.low : lhs.high < rhs_u.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high == rhs.high ? lhs_u.low <= rhs.low : lhs_u.high < rhs.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high == UINT64_C(0) && lhs.low <= static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high > UINT64_C(0) || static_cast(lhs) <= rhs.low; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uint128 lhs, const uint128 rhs) noexcept { #if defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -799,24 +799,24 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const uin #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs <= static_cast(rhs); + return lhs <= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) <= rhs; + return static_cast(lhs) <= rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs <= static_cast(rhs); + return lhs <= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator<=(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) <= rhs; + return static_cast(lhs) <= rhs; } @@ -827,32 +827,32 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high == rhs_u.high ? lhs.low > rhs_u.low : lhs.high > rhs_u.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high == rhs.high ? lhs_u.low > rhs.low : lhs_u.high > rhs.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high > UINT64_C(0) || lhs.low > static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high == UINT64_C(0) && static_cast(lhs) > rhs.low; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint128 lhs, const uint128 rhs) noexcept { #if defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -916,24 +916,24 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const uint #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs > static_cast(rhs); + return lhs > static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) > rhs; + return static_cast(lhs) > rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs > static_cast(rhs); + return lhs > static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) > rhs; + return static_cast(lhs) > rhs; } @@ -944,32 +944,32 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128 lhs, const SignedInteger rhs) noexcept { - const uint128_t rhs_u {rhs}; + const uint128 rhs_u {rhs}; return lhs.high == rhs_u.high ? lhs.low >= rhs_u.low : lhs.high > rhs_u.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const SignedInteger lhs, const uint128 rhs) noexcept { - const uint128_t lhs_u {lhs}; + const uint128 lhs_u {lhs}; return lhs_u.high == rhs.high ? lhs_u.low >= rhs.low : lhs_u.high > rhs.high; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128 lhs, const UnsignedInteger rhs) noexcept { return lhs.high > UINT64_C(0) || lhs.low >= static_cast(rhs); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const UnsignedInteger lhs, const uint128 rhs) noexcept { return rhs.high == UINT64_C(0) && static_cast(lhs) >= rhs.low; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uint128 lhs, const uint128 rhs) noexcept { #if defined(__clang__) && defined(BOOST_INT128_HAS_INT128) @@ -1032,25 +1032,25 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const uin #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs >= static_cast(rhs); + return lhs >= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) >= rhs; + return static_cast(lhs) >= rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs >= static_cast(rhs); + return lhs >= static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool operator>=(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) >= rhs; + return static_cast(lhs) >= rhs; } @@ -1062,7 +1062,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR bool #ifdef BOOST_INT128_HAS_SPACESHIP_OPERATOR -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128 lhs, const uint128 rhs) noexcept { if (lhs < rhs) { @@ -1079,7 +1079,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering oper } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128 lhs, const UnsignedInteger rhs) noexcept { if (lhs < rhs) { @@ -1096,7 +1096,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint12 } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const UnsignedInteger lhs, const uint128 rhs) noexcept { if (lhs < rhs) { @@ -1113,7 +1113,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Unsign } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const SignedInteger lhs, const uint128 rhs) noexcept { if (lhs < rhs) { @@ -1130,7 +1130,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Signed } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint128 lhs, const SignedInteger rhs) noexcept { if (lhs < rhs) { @@ -1152,7 +1152,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const uint12 // Not Operator //===================================== -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator~(const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator~(const uint128 rhs) noexcept { return {~rhs.high, ~rhs.low}; } @@ -1162,30 +1162,30 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator~(const //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const uint128 lhs, const SignedInteger rhs) noexcept { return {lhs.high | (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low | static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const SignedInteger lhs, const uint128 rhs) noexcept { return {rhs.high | (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), rhs.low | static_cast(lhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const uint128 lhs, const UnsignedInteger rhs) noexcept { return {lhs.high, lhs.low | static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const UnsignedInteger lhs, const uint128 rhs) noexcept { return {rhs.high, rhs.low | static_cast(lhs)}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator|(const uint128 lhs, const uint128 rhs) noexcept { return {lhs.high | rhs.high, lhs.low | rhs.low}; } @@ -1193,36 +1193,36 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator|(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs | static_cast(rhs); + return lhs | static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) | rhs; + return static_cast(lhs) | rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs | static_cast(rhs); + return lhs | static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator|(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator|(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) | rhs; + return static_cast(lhs) | rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator|=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator|=(const Integer rhs) noexcept { *this = *this | rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator|=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator|=(const uint128 rhs) noexcept { *this = *this | rhs; return *this; @@ -1231,7 +1231,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator|=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator|=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator|=(const Integer rhs) noexcept { *this = *this | rhs; return *this; @@ -1244,30 +1244,30 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator|=(const Integer r //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const uint128 lhs, const SignedInteger rhs) noexcept { return {lhs.high & (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low & static_cast(rhs)}; } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const SignedInteger lhs, const uint128 rhs) noexcept { return {rhs.high & (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), rhs.low & static_cast(lhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const uint128 lhs, const UnsignedInteger rhs) noexcept { return {UINT64_C(0), lhs.low & static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const UnsignedInteger lhs, const uint128 rhs) noexcept { return {UINT64_C(0), rhs.low & static_cast(lhs)}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator&(const uint128 lhs, const uint128 rhs) noexcept { return {lhs.high & rhs.high, lhs.low & rhs.low}; } @@ -1275,37 +1275,37 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator&(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs & static_cast(rhs); + return lhs & static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) & rhs; + return static_cast(lhs) & rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs & static_cast(rhs); + return lhs & static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator&(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator&(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) & rhs; + return static_cast(lhs) & rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator&=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator&=(const Integer rhs) noexcept { *this = *this & rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator&=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator&=(const uint128 rhs) noexcept { *this = *this & rhs; return *this; @@ -1314,7 +1314,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator&=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator&=(Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator&=(Integer rhs) noexcept { *this = *this & rhs; return *this; @@ -1328,30 +1328,30 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator&=(Integer rhs) no //===================================== BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const uint128 lhs, const SignedInteger rhs) noexcept { return {lhs.high ^ (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low ^ static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const SignedInteger lhs, const uint128 rhs) noexcept { return {rhs.high ^ (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), rhs.low ^ static_cast(lhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const uint128 lhs, const UnsignedInteger rhs) noexcept { return {lhs.high, lhs.low ^ static_cast(rhs)}; } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const UnsignedInteger lhs, const uint128 rhs) noexcept { return {rhs.high, rhs.low ^ static_cast(lhs)}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator^(const uint128 lhs, const uint128 rhs) noexcept { return {lhs.high ^ rhs.high, lhs.low ^ rhs.low}; } @@ -1359,37 +1359,37 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator^(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs ^ static_cast(rhs); + return lhs ^ static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) ^ rhs; + return static_cast(lhs) ^ rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs ^ static_cast(rhs); + return lhs ^ static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator^(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator^(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) ^ rhs; + return static_cast(lhs) ^ rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator^=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator^=(const Integer rhs) noexcept { *this = *this ^ rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator^=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator^=(const uint128 rhs) noexcept { *this = *this ^ rhs; return *this; @@ -1398,7 +1398,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator^=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator^=(Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator^=(Integer rhs) noexcept { *this = *this ^ rhs; return *this; @@ -1413,7 +1413,7 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator^=(Integer rhs) no namespace detail { template -BOOST_INT128_HOST_DEVICE constexpr uint128_t default_ls_impl(const uint128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 default_ls_impl(const uint128 lhs, const Integer rhs) noexcept { static_assert(std::is_integral::value, "Needs to be a builtin type"); @@ -1442,7 +1442,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t default_ls_impl(const uint128_t lhs } template -BOOST_INT128_HOST_DEVICE uint128_t intrinsic_ls_impl(const uint128_t lhs, const T rhs) noexcept +BOOST_INT128_HOST_DEVICE uint128 intrinsic_ls_impl(const uint128 lhs, const T rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators; delegate @@ -1460,8 +1460,8 @@ BOOST_INT128_HOST_DEVICE uint128_t intrinsic_ls_impl(const uint128_t lhs, const std::memcpy(&value, &lhs, sizeof(builtin_u128)); const auto res {value << rhs}; - uint128_t return_value; - std::memcpy(&return_value, &res, sizeof(uint128_t)); + uint128 return_value; + std::memcpy(&return_value, &res, sizeof(uint128)); return return_value; #if defined(__GNUC__) && __GNUC__ >= 8 @@ -1502,7 +1502,7 @@ BOOST_INT128_HOST_DEVICE uint128_t intrinsic_ls_impl(const uint128_t lhs, const } // namespace detail BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(const uint128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator<<(const uint128 lhs, const Integer rhs) noexcept { #ifndef BOOST_INT128_NO_CONSTEVAL_DETECTION @@ -1524,7 +1524,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(const uint128_t lhs, con // A number of different overloads to ensure that we return the same type as the builtins would -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator<<(const uint128 lhs, const uint128 rhs) noexcept { // Out-of-range counts (>= 128 or with the high word set) are undefined, // matching the built-in operators; forward the count to the scalar overload. @@ -1533,13 +1533,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator<<(cons #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator<<(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs << static_cast(rhs.low); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator<<(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs << static_cast(rhs.low); @@ -1548,27 +1548,27 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR deta #endif BOOST_INT128_EXPORT template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int operator<<(const SignedInteger lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) << rhs.low; } BOOST_INT128_EXPORT template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned int operator<<(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr unsigned int operator<<(const UnsignedInteger lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) << rhs.low; } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator<<=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator<<=(const Integer rhs) noexcept { *this = *this << rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator<<=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator<<=(const uint128 rhs) noexcept { *this = *this << rhs; return *this; @@ -1577,7 +1577,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator<<=(const uint1 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator<<=(Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator<<=(Integer rhs) noexcept { *this = *this << rhs; return *this; @@ -1592,7 +1592,7 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator<<=(Integer rhs) n namespace detail { template -BOOST_INT128_HOST_DEVICE constexpr uint128_t default_rs_impl(const uint128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 default_rs_impl(const uint128 lhs, const Integer rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators. In a @@ -1619,7 +1619,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t default_rs_impl(const uint128_t lhs } template -BOOST_INT128_HOST_DEVICE uint128_t intrinsic_rs_impl(const uint128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE uint128 intrinsic_rs_impl(const uint128 lhs, const Integer rhs) noexcept { // A shift by a negative amount or by an amount >= 128 (the operand width) is // undefined behavior, exactly as for the built-in shift operators; delegate @@ -1637,8 +1637,8 @@ BOOST_INT128_HOST_DEVICE uint128_t intrinsic_rs_impl(const uint128_t lhs, const std::memcpy(&value, &lhs, sizeof(builtin_u128)); const auto res {value >> rhs}; - uint128_t return_value; - std::memcpy(&return_value, &res, sizeof(uint128_t)); + uint128 return_value; + std::memcpy(&return_value, &res, sizeof(uint128)); return return_value; #if defined(__GNUC__) && __GNUC__ >= 8 @@ -1676,7 +1676,7 @@ BOOST_INT128_HOST_DEVICE uint128_t intrinsic_rs_impl(const uint128_t lhs, const } // namespace detail BOOST_INT128_EXPORT template ::value, bool> = true> -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator>>(const uint128 lhs, const Integer rhs) noexcept { #ifndef BOOST_INT128_NO_CONSTEVAL_DETECTION @@ -1696,7 +1696,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, con #endif } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator>>(const uint128 lhs, const uint128 rhs) noexcept { // Out-of-range counts (>= 128 or with the high word set) are undefined, // matching the built-in operators; forward the count to the scalar overload. @@ -1705,13 +1705,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator>>(cons #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_u128 operator>>(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs >> static_cast(rhs.low); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR detail::builtin_i128 operator>>(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return lhs >> static_cast(rhs.low); @@ -1720,27 +1720,27 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR deta #endif BOOST_INT128_EXPORT template && (sizeof(SignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr int operator>>(const SignedInteger lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) >> rhs.low; } BOOST_INT128_EXPORT template && (sizeof(UnsignedInteger) * 8 <= 16), bool> = true> -BOOST_INT128_HOST_DEVICE constexpr unsigned operator>>(UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr unsigned operator>>(UnsignedInteger lhs, const uint128 rhs) noexcept { // Out-of-range counts are undefined, matching the built-in operators. return static_cast(lhs) >> rhs.low; } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator>>=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator>>=(const Integer rhs) noexcept { *this = *this >> rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator>>=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator>>=(const uint128 rhs) noexcept { *this = *this >> rhs; return *this; @@ -1749,7 +1749,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator>>=(const uint1 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator>>=(Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator>>=(Integer rhs) noexcept { *this = *this >> rhs; return *this; @@ -1761,7 +1761,7 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator>>=(Integer rhs) n // Increment Operator //===================================== -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator++() noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator++() noexcept { if (++low == UINT64_C(0)) { @@ -1771,7 +1771,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator++() noexcept return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t uint128_t::operator++(int) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 uint128::operator++(int) noexcept { const auto temp {*this}; ++(*this); @@ -1782,7 +1782,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t uint128_t::operator++(int) noexcept // Decrement Operator //===================================== -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator--() noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator--() noexcept { if (--low == UINT64_MAX) { @@ -1792,7 +1792,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator--() noexcept return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t uint128_t::operator--(int) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 uint128::operator--(int) noexcept { const auto temp {*this}; --(*this); @@ -1805,22 +1805,22 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t uint128_t::operator--(int) noexcept namespace impl { -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_add(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128 default_add(const uint128 lhs, const uint128 rhs) noexcept { #if defined(BOOST_INT128_HAS_BUILTIN_ADD_OVERFLOW) && (defined(__i386__) || (defined(__aarch64__) && !defined(__APPLE__)) || defined(__arm__) || (defined(__s390__) || defined(__s390x__))) - uint128_t res {}; + uint128 res {}; res.high = lhs.high + rhs.high + __builtin_add_overflow(lhs.low, rhs.low, &res.low); return res; #elif (defined(__x86_64__) || (defined(__aarch64__) && !defined(__APPLE__))) && !defined(_MSC_VER) && defined(BOOST_INT128_HAS_INT128) - return static_cast(static_cast(lhs) + static_cast(rhs)); + return static_cast(static_cast(lhs) + static_cast(rhs)); #else - uint128_t temp {lhs.high + rhs.high, lhs.low + rhs.low}; + uint128 temp {lhs.high + rhs.high, lhs.low + rhs.low}; if (temp.low < lhs.low) { @@ -1832,18 +1832,18 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_a #endif } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_add(const uint128_t lhs, const std::uint64_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128 default_add(const uint128 lhs, const std::uint64_t rhs) noexcept { #if defined(BOOST_INT128_HAS_BUILTIN_ADD_OVERFLOW) && (defined(__i386__) || (defined(__aarch64__) && !defined(__APPLE__)) || defined(__arm__) || (defined(__s390__) || defined(__s390x__))) - uint128_t res {}; + uint128 res {}; res.high = lhs.high + __builtin_add_overflow(lhs.low, rhs, &res.low); return res; #else - uint128_t temp {lhs.high, lhs.low + rhs}; + uint128 temp {lhs.high, lhs.low + rhs}; if (temp.low < lhs.low) { @@ -1855,22 +1855,22 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_a #endif } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_sub(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128 default_sub(const uint128 lhs, const uint128 rhs) noexcept { #if defined(BOOST_INT128_HAS_BUILTIN_SUB_OVERFLOW) && (defined(__i386__) || defined(__arm__) || (defined(__s390__) || defined(__s390x__))) - uint128_t res {}; + uint128 res {}; res.high = lhs.high - rhs.high - __builtin_sub_overflow(lhs.low, rhs.low, &res.low); return res; #elif (defined(__x86_64__) || (defined(__aarch64__) && !defined(__APPLE__))) && !defined(_MSC_VER) && defined(BOOST_INT128_HAS_INT128) - return static_cast(static_cast(lhs) - static_cast(rhs)); + return static_cast(static_cast(lhs) - static_cast(rhs)); #else - uint128_t temp {lhs.high - rhs.high, lhs.low - rhs.low}; + uint128 temp {lhs.high - rhs.high, lhs.low - rhs.low}; // Check for carry if (lhs.low < rhs.low) @@ -1883,18 +1883,18 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_s #endif } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_sub(const uint128_t lhs, const std::uint64_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128 default_sub(const uint128 lhs, const std::uint64_t rhs) noexcept { #if defined(BOOST_INT128_HAS_BUILTIN_SUB_OVERFLOW) && (defined(__i386__) || (defined(__aarch64__) && !defined(__APPLE__)) || defined(__arm__) || (defined(__s390__) || defined(__s390x__))) - uint128_t res {}; + uint128 res {}; res.high = lhs.high - __builtin_sub_overflow(lhs.low, rhs, &res.low); return res; #else - uint128_t temp {lhs.high, lhs.low - rhs}; + uint128 temp {lhs.high, lhs.low - rhs}; // Check for carry if (lhs.low < rhs) @@ -1915,14 +1915,14 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_s #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 lhs, const SignedInteger rhs) noexcept { return rhs < 0 ? impl::default_sub(lhs, -static_cast(rhs)) : impl::default_add(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const SignedInteger lhs, const uint128 rhs) noexcept { return lhs < 0 ? impl::default_sub(rhs, -static_cast(lhs)) : impl::default_add(rhs, static_cast(lhs)); @@ -1933,18 +1933,18 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const SignedInteger lhs, #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 lhs, const UnsignedInteger rhs) noexcept { return impl::default_add(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const UnsignedInteger lhs, const uint128 rhs) noexcept { return impl::default_add(rhs, static_cast(lhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator+(const uint128 lhs, const uint128 rhs) noexcept { return impl::default_add(lhs, rhs); } @@ -1952,37 +1952,37 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator+(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return impl::default_add(lhs, static_cast(rhs)); + return impl::default_add(lhs, static_cast(rhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return impl::default_add(static_cast(lhs), rhs); + return impl::default_add(static_cast(lhs), rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return impl::default_add(lhs, static_cast(rhs)); + return impl::default_add(lhs, static_cast(rhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator+(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator+(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return impl::default_add(static_cast(lhs), rhs); + return impl::default_add(static_cast(lhs), rhs); } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator+=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator+=(const Integer rhs) noexcept { *this = *this + rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator+=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator+=(const uint128 rhs) noexcept { *this = *this + rhs; return *this; @@ -1991,7 +1991,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator+=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator+=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator+=(const Integer rhs) noexcept { *this = *this + rhs; return *this; @@ -2010,14 +2010,14 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator+=(const Integer r #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 lhs, const SignedInteger rhs) noexcept { return rhs < 0 ? impl::default_add(lhs, -static_cast(rhs)) : impl::default_sub(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const SignedInteger lhs, const uint128 rhs) noexcept { return lhs < 0 ? impl::default_sub(-rhs, -static_cast(lhs)) : impl::default_add(-rhs, static_cast(lhs)); @@ -2028,18 +2028,18 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const SignedInteger lhs, #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 lhs, const UnsignedInteger rhs) noexcept { return impl::default_sub(lhs, static_cast(rhs)); } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const UnsignedInteger lhs, const uint128 rhs) noexcept { return impl::default_add(-rhs, static_cast(lhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator-(const uint128 lhs, const uint128 rhs) noexcept { return impl::default_sub(lhs, rhs); } @@ -2047,37 +2047,37 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator-(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs - static_cast(rhs); + return lhs - static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) - rhs; + return static_cast(lhs) - rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs - static_cast(rhs); + return lhs - static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator-(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator-(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) - rhs; + return static_cast(lhs) - rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator-=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator-=(const Integer rhs) noexcept { *this = *this - rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator-=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator-=(const uint128 rhs) noexcept { *this = *this - rhs; return *this; @@ -2086,7 +2086,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator-=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator-=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator-=(const Integer rhs) noexcept { *this = *this - rhs; return *this; @@ -2107,9 +2107,9 @@ namespace detail { #if defined(_M_AMD64) && !defined(__GNUC__) -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const uint128 rhs) noexcept { - uint128_t result {}; + uint128 result {}; result.low = _umul128(lhs.low, rhs.low, &result.high); result.high += lhs.low * rhs.high; result.high += lhs.high * rhs.low; @@ -2117,18 +2117,18 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint return result; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const std::uint64_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const std::uint64_t rhs) noexcept { - uint128_t result {}; + uint128 result {}; result.low = _umul128(lhs.low, rhs, &result.high); result.high += lhs.high * rhs; return result; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const std::uint32_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const std::uint32_t rhs) noexcept { - uint128_t result {}; + uint128 result {}; result.low = _umul128(lhs.low, static_cast(rhs), &result.high); result.high += lhs.high * static_cast(rhs); @@ -2137,7 +2137,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint #elif defined(_M_ARM64) -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const uint128 rhs) noexcept { const auto low_low{lhs.low * rhs.low}; const auto high_low_low{__umulh(lhs.low, rhs.low)}; @@ -2150,7 +2150,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint return {high, low_low}; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const std::uint64_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const std::uint64_t rhs) noexcept { const auto low{lhs.low * rhs}; const auto high{__umulh(lhs.low, rhs) + (lhs.high * rhs)}; @@ -2158,7 +2158,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint return {high, low}; } -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint128_t lhs, const std::uint32_t rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128 msvc_mul(const uint128 lhs, const std::uint32_t rhs) noexcept { const auto low{lhs.low * rhs}; const auto high{__umulh(lhs.low, static_cast(rhs)) + (lhs.high * rhs)}; @@ -2169,7 +2169,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE uint128_t msvc_mul(const uint #endif // MSVC implementations template -BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_mul(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128 default_mul(const uint128 lhs, const UnsignedInteger rhs) noexcept { #if (defined(__aarch64__) || defined(__x86_64__) || defined(__PPC__) || defined(__powerpc__)) && defined(__GNUC__) && defined(BOOST_INT128_HAS_INT128) @@ -2180,14 +2180,14 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_m detail::builtin_u128 new_lhs {}; detail::builtin_u128 new_rhs {}; - std::memcpy(&new_lhs, &lhs, sizeof(uint128_t)); + std::memcpy(&new_lhs, &lhs, sizeof(uint128)); std::memcpy(&new_rhs, &rhs, sizeof(UnsignedInteger)); const auto res {new_lhs * new_rhs}; - uint128_t library_res {}; + uint128 library_res {}; - std::memcpy(&library_res, &res, sizeof(uint128_t)); + std::memcpy(&library_res, &res, sizeof(uint128)); return library_res; } @@ -2195,7 +2195,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_m # elif defined(BOOST_INT128_HAS_INT128) # define BOOST_INT128_HIDE_MUL - return static_cast(static_cast(lhs) * static_cast(rhs)); + return static_cast(static_cast(lhs) * static_cast(rhs)); # endif @@ -2212,14 +2212,14 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_m #elif defined(BOOST_INT128_HAS_INT128) && !defined(__s390__) && !defined(__s390x__) # define BOOST_INT128_HIDE_MUL - return static_cast(static_cast(lhs) * static_cast(rhs)); + return static_cast(static_cast(lhs) * static_cast(rhs)); #endif // We need to hide this if we use a non-const eval method above to avoid a litany of cross-platform warnings #ifndef BOOST_INT128_HIDE_MUL - return low_word_mul(lhs, rhs); + return low_word_mul(lhs, rhs); #else #undef BOOST_INT128_HIDE_MUL @@ -2238,7 +2238,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr uint128_t default_m #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const uint128 lhs, const SignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -2249,7 +2249,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, cons } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const SignedInteger lhs, const uint128 rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -2260,7 +2260,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const SignedInteger lhs, } BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const uint128 lhs, const UnsignedInteger rhs) noexcept { return detail::default_mul(lhs, static_cast(rhs)); } @@ -2270,12 +2270,12 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, cons #endif BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const UnsignedInteger lhs, const uint128 rhs) noexcept { return detail::default_mul(rhs, static_cast(lhs)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator*(const uint128 lhs, const uint128 rhs) noexcept { return detail::default_mul(lhs, rhs); } @@ -2283,49 +2283,49 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator*(const #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { const detail::builtin_u128 rhs_bits {static_cast(rhs)}; const bool rhs_negative {static_cast(static_cast(rhs_bits >> static_cast(64U))) < 0}; - const uint128_t rhs_u {rhs_bits}; - const uint128_t abs_rhs {rhs_negative ? -rhs_u : rhs_u}; - const uint128_t res {lhs * abs_rhs}; + const uint128 rhs_u {rhs_bits}; + const uint128 abs_rhs {rhs_negative ? -rhs_u : rhs_u}; + const uint128 res {lhs * abs_rhs}; return rhs_negative ? -res : res; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { const detail::builtin_u128 lhs_bits {static_cast(lhs)}; const bool lhs_negative {static_cast(static_cast(lhs_bits >> static_cast(64U))) < 0}; - const uint128_t lhs_u {lhs_bits}; - const uint128_t abs_lhs {lhs_negative ? -lhs_u : lhs_u}; - const uint128_t res {abs_lhs * rhs}; + const uint128 lhs_u {lhs_bits}; + const uint128 abs_lhs {lhs_negative ? -lhs_u : lhs_u}; + const uint128 res {abs_lhs * rhs}; return lhs_negative ? -res : res; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs * static_cast(rhs); + return lhs * static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator*(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator*(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) * rhs; + return static_cast(lhs) * rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator*=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator*=(const Integer rhs) noexcept { *this = *this * rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator*=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator*=(const uint128 rhs) noexcept { *this = *this * rhs; return *this; @@ -2334,7 +2334,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator*=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator*=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator*=(const Integer rhs) noexcept { *this = *this * rhs; return *this; @@ -2348,35 +2348,35 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator*=(const Integer r // For div we need forward declarations since we mix and match the arguments BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(uint128_t lhs, SignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(uint128 lhs, SignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(SignedInteger lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(SignedInteger lhs, uint128 rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(uint128_t lhs, UnsignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(uint128 lhs, UnsignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(UnsignedInteger lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(UnsignedInteger lhs, uint128 rhs) noexcept; -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(uint128_t lhs, uint128_t rhs) noexcept; +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(uint128 lhs, uint128 rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const uint128 lhs, const SignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; - return rhs < 0 ? lhs / static_cast(rhs) : lhs / static_cast(rhs); + return rhs < 0 ? lhs / static_cast(rhs) : lhs / static_cast(rhs); } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const SignedInteger lhs, const uint128 rhs) noexcept { using eval_type = detail::evaluation_type_t; - return lhs < 0 ? static_cast(lhs) / rhs : static_cast(lhs) / rhs; + return lhs < 0 ? static_cast(lhs) / rhs : static_cast(lhs) / rhs; } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const uint128 lhs, const UnsignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -2391,7 +2391,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, cons return {0, 0}; } - uint128_t quotient {}; + uint128 quotient {}; detail::one_word_div(lhs, static_cast(rhs), quotient); @@ -2399,7 +2399,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, cons } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const UnsignedInteger lhs, const uint128 rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -2417,7 +2417,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const UnsignedInteger lhs return {0, static_cast(lhs) / rhs.low}; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator/(const uint128 lhs, const uint128 rhs) noexcept { if (BOOST_INT128_UNLIKELY(rhs == 0U)) { @@ -2440,14 +2440,14 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, cons return {0, lhs.low / rhs.low}; } - uint128_t quotient {}; + uint128 quotient {}; detail::one_word_div(lhs, rhs.low, quotient); return quotient; } #if defined(BOOST_INT128_HAS_INT128) && !defined(__s390__) && !defined(__s390x__) - return static_cast(static_cast(lhs) / static_cast(rhs)); + return static_cast(static_cast(lhs) / static_cast(rhs)); #else @@ -2458,38 +2458,38 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator/(const uint128_t lhs, cons #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs / static_cast(rhs); + return lhs / static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) / rhs; + return static_cast(lhs) / rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs / static_cast(rhs); + return lhs / static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator/(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator/(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) / rhs; + return static_cast(lhs) / rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator/=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator/=(const Integer rhs) noexcept { *this = *this / rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator/=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator/=(const uint128 rhs) noexcept { *this = *this / rhs; return *this; @@ -2498,7 +2498,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator/=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator/=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator/=(const Integer rhs) noexcept { *this = *this / rhs; return *this; @@ -2512,35 +2512,35 @@ BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator/=(const Integer r // For div we need forward declarations since we mix and match the arguments BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(uint128_t lhs, SignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(uint128 lhs, SignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(SignedInteger lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(SignedInteger lhs, uint128 rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(uint128_t lhs, UnsignedInteger rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(uint128 lhs, UnsignedInteger rhs) noexcept; BOOST_INT128_EXPORT template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(UnsignedInteger lhs, uint128_t rhs) noexcept; +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(UnsignedInteger lhs, uint128 rhs) noexcept; -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(uint128_t lhs, uint128_t rhs) noexcept; +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(uint128 lhs, uint128 rhs) noexcept; template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, const SignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const uint128 lhs, const SignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; - return rhs < 0 ? lhs % static_cast(rhs) : lhs % static_cast(rhs); + return rhs < 0 ? lhs % static_cast(rhs) : lhs % static_cast(rhs); } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const SignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const SignedInteger lhs, const uint128 rhs) noexcept { using eval_type = detail::evaluation_type_t; - return lhs < 0 ? static_cast(lhs) % rhs : static_cast(lhs) % rhs; + return lhs < 0 ? static_cast(lhs) % rhs : static_cast(lhs) % rhs; } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, const UnsignedInteger rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const uint128 lhs, const UnsignedInteger rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -2552,8 +2552,8 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, cons if (lhs.high != 0) { - uint128_t quotient {}; - uint128_t remainder {}; + uint128 quotient {}; + uint128 remainder {}; detail::one_word_div(lhs, static_cast(rhs), quotient, remainder); @@ -2566,7 +2566,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, cons } template -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const UnsignedInteger lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const UnsignedInteger lhs, const uint128 rhs) noexcept { using eval_type = detail::evaluation_type_t; @@ -2583,7 +2583,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const UnsignedInteger lhs return {0, static_cast(lhs) % rhs.low}; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 operator%(const uint128 lhs, const uint128 rhs) noexcept { if (BOOST_INT128_UNLIKELY(rhs == 0U)) { @@ -2604,19 +2604,19 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, cons return {0, lhs.low % rhs.low}; } - uint128_t quotient {}; - uint128_t remainder {}; + uint128 quotient {}; + uint128 remainder {}; detail::one_word_div(lhs, rhs.low, quotient, remainder); return remainder; } #if defined(BOOST_INT128_HAS_INT128) && !defined(__s390__) && !defined(__s390x__) - return static_cast(static_cast(lhs) % static_cast(rhs)); + return static_cast(static_cast(lhs) % static_cast(rhs)); #else - uint128_t remainder {}; + uint128 remainder {}; detail::knuth_div(lhs, rhs, remainder); return remainder; @@ -2625,38 +2625,38 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t operator%(const uint128_t lhs, cons #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const uint128_t lhs, const detail::builtin_u128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const uint128 lhs, const detail::builtin_u128 rhs) noexcept { - return lhs % static_cast(rhs); + return lhs % static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const detail::builtin_u128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const detail::builtin_u128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) % rhs; + return static_cast(lhs) % rhs; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const uint128_t lhs, const detail::builtin_i128 rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const uint128 lhs, const detail::builtin_i128 rhs) noexcept { - return lhs % static_cast(rhs); + return lhs % static_cast(rhs); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128_t operator%(const detail::builtin_i128 lhs, const uint128_t rhs) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR uint128 operator%(const detail::builtin_i128 lhs, const uint128 rhs) noexcept { - return static_cast(lhs) % rhs; + return static_cast(lhs) % rhs; } #endif // BOOST_INT128_HAS_INT128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator%=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator%=(const Integer rhs) noexcept { *this = *this % rhs; return *this; } -BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator%=(const uint128_t rhs) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128& uint128::operator%=(const uint128 rhs) noexcept { *this = *this % rhs; return *this; @@ -2665,7 +2665,7 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t& uint128_t::operator%=(const uint12 #ifdef BOOST_INT128_HAS_MSVC_INT128 template -BOOST_INT128_HOST_DEVICE inline uint128_t& uint128_t::operator%=(const Integer rhs) noexcept +BOOST_INT128_HOST_DEVICE inline uint128& uint128::operator%=(const Integer rhs) noexcept { * this = *this % rhs; return *this; @@ -2723,15 +2723,15 @@ class numeric_limits_impl_u128 static constexpr bool tinyness_before = false; // Member functions - BOOST_INT128_HOST_DEVICE static constexpr auto (min) () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto lowest () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto (max) () -> boost::int128::uint128_t { return {UINT64_MAX, UINT64_MAX}; } - BOOST_INT128_HOST_DEVICE static constexpr auto epsilon () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto round_error () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto infinity () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto quiet_NaN () -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto signaling_NaN() -> boost::int128::uint128_t { return {0, 0}; } - BOOST_INT128_HOST_DEVICE static constexpr auto denorm_min () -> boost::int128::uint128_t { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto (min) () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto lowest () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto (max) () -> boost::int128::uint128 { return {UINT64_MAX, UINT64_MAX}; } + BOOST_INT128_HOST_DEVICE static constexpr auto epsilon () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto round_error () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto infinity () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto quiet_NaN () -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto signaling_NaN() -> boost::int128::uint128 { return {0, 0}; } + BOOST_INT128_HOST_DEVICE static constexpr auto denorm_min () -> boost::int128::uint128 { return {0, 0}; } }; #if !defined(__cpp_inline_variables) || __cpp_inline_variables < 201606L @@ -2794,7 +2794,7 @@ namespace std { #endif template <> -class numeric_limits : +class numeric_limits : public boost::int128::detail::numeric_limits_impl_u128 {}; #ifdef __clang__ diff --git a/include/boost/int128/fmt_format.hpp b/include/boost/int128/fmt_format.hpp index 2199f8b5..030eed3d 100644 --- a/include/boost/int128/fmt_format.hpp +++ b/include/boost/int128/fmt_format.hpp @@ -182,7 +182,7 @@ constexpr auto parse_impl(ParseContext& ctx) break; // LCOV_EXCL_START default: - BOOST_INT128_THROW_EXCEPTION(std::logic_error("Unsupported format specifier")); + BOOST_int128HROW_EXCEPTION(std::logic_error("Unsupported format specifier")); // LCOV_EXCL_STOP } } @@ -190,7 +190,7 @@ constexpr auto parse_impl(ParseContext& ctx) // Verify we're at the closing brace if (it != ctx.end() && *it != '}') { - BOOST_INT128_THROW_EXCEPTION(std::logic_error("Expected '}' in format string")); // LCOV_EXCL_LINE + BOOST_int128HROW_EXCEPTION(std::logic_error("Expected '}' in format string")); // LCOV_EXCL_LINE } return std::make_tuple(base, padding_digits, sign, is_upper, prefix, zero_pad, fill_char, align, it); @@ -199,7 +199,7 @@ constexpr auto parse_impl(ParseContext& ctx) template struct is_library_type_impl { - static constexpr bool value {std::is_same::value || std::is_same::value}; + static constexpr bool value {std::is_same::value || std::is_same::value}; }; template @@ -248,31 +248,31 @@ struct formatter { char buffer[detail::mini_to_chars_buffer_size]; bool isneg {false}; - boost::int128::uint128_t abs_v {}; + boost::int128::uint128 abs_v {}; - BOOST_INT128_IF_CONSTEXPR (std::is_same::value) + BOOST_INT128_IF_CONSTEXPR (std::is_same::value) { if (v < T{0}) { isneg = true; - // Can't negate int128_t::min(), handle specially + // Can't negate int128::min(), handle specially if (v == (std::numeric_limits::min)()) { - abs_v = boost::int128::uint128_t{UINT64_C(0x8000000000000000), 0}; + abs_v = boost::int128::uint128{UINT64_C(0x8000000000000000), 0}; } else { - abs_v = static_cast(-v); + abs_v = static_cast(-v); } } else { - abs_v = static_cast(v); + abs_v = static_cast(v); } } else { - abs_v = static_cast(v); + abs_v = static_cast(v); } const auto end = detail::mini_to_chars(buffer, abs_v, base, is_upper); @@ -376,7 +376,7 @@ struct formatter { s.insert(s.begin(), ' '); } - BOOST_INT128_IF_CONSTEXPR (std::is_same::value) + BOOST_INT128_IF_CONSTEXPR (std::is_same::value) { if (isneg) { @@ -385,7 +385,7 @@ struct formatter } break; case sign_option::negative: - BOOST_INT128_IF_CONSTEXPR (std::is_same::value) + BOOST_INT128_IF_CONSTEXPR (std::is_same::value) { if (isneg) { @@ -444,10 +444,10 @@ struct formatter namespace fmt { template <> -struct formatter : public boost::int128::fmt_detail::formatter {}; +struct formatter : public boost::int128::fmt_detail::formatter {}; template <> -struct formatter : public boost::int128::fmt_detail::formatter {}; +struct formatter : public boost::int128::fmt_detail::formatter {}; } // namespace fmt diff --git a/include/boost/int128/format.hpp b/include/boost/int128/format.hpp index 851e5510..d5589f1e 100644 --- a/include/boost/int128/format.hpp +++ b/include/boost/int128/format.hpp @@ -175,14 +175,14 @@ constexpr auto parse_impl(ParseContext& ctx) is_upper = true; break; default: // LCOV_EXCL_LINE - BOOST_INT128_THROW_EXCEPTION(std::format_error("Unsupported format specifier")); // LCOV_EXCL_LINE + BOOST_int128HROW_EXCEPTION(std::format_error("Unsupported format specifier")); // LCOV_EXCL_LINE } } // Verify we're at the closing brace if (it != ctx.end() && *it != '}') { - BOOST_INT128_THROW_EXCEPTION(std::format_error("Expected '}' in format string")); // LCOV_EXCL_LINE + BOOST_int128HROW_EXCEPTION(std::format_error("Expected '}' in format string")); // LCOV_EXCL_LINE } return std::make_tuple(base, padding_digits, sign, is_upper, prefix, zero_pad, fill_char, align, it); @@ -191,7 +191,7 @@ constexpr auto parse_impl(ParseContext& ctx) template struct is_library_type_impl { - static constexpr bool value {std::is_same_v || std::is_same_v}; + static constexpr bool value {std::is_same_v || std::is_same_v}; }; template @@ -247,31 +247,31 @@ struct formatter { char buffer[boost::int128::detail::mini_to_chars_buffer_size]; bool isneg {false}; - boost::int128::uint128_t abs_v {}; + boost::int128::uint128 abs_v {}; - if constexpr (std::is_same_v) + if constexpr (std::is_same_v) { if (v < 0) { isneg = true; - // Can't negate int128_t::min(), handle specially + // Can't negate int128::min(), handle specially if (v == (std::numeric_limits::min)()) { - abs_v = boost::int128::uint128_t{UINT64_C(0x8000000000000000), 0}; + abs_v = boost::int128::uint128{UINT64_C(0x8000000000000000), 0}; } else { - abs_v = static_cast(-v); + abs_v = static_cast(-v); } } else { - abs_v = static_cast(v); + abs_v = static_cast(v); } } else { - abs_v = static_cast(v); + abs_v = static_cast(v); } const auto end = boost::int128::detail::mini_to_chars(buffer, abs_v, base, is_upper); @@ -375,7 +375,7 @@ struct formatter { s.insert(s.begin(), ' '); } - if constexpr (std::is_same_v) + if constexpr (std::is_same_v) { if (isneg) { @@ -384,7 +384,7 @@ struct formatter } break; case boost::int128::detail::sign_option::negative: - if constexpr (std::is_same_v) + if constexpr (std::is_same_v) { if (isneg) { diff --git a/include/boost/int128/hash.hpp b/include/boost/int128/hash.hpp index 83ec5dbb..d1255fa4 100644 --- a/include/boost/int128/hash.hpp +++ b/include/boost/int128/hash.hpp @@ -49,9 +49,9 @@ inline std::size_t hash_finalize_64(std::uint64_t v) noexcept namespace std { template <> -struct hash +struct hash { - auto operator()(const boost::int128::int128_t v) const noexcept -> std::size_t + auto operator()(const boost::int128::int128 v) const noexcept -> std::size_t { const std::size_t low_hash {boost::int128::detail::hash_finalize_64(v.low)}; const std::size_t high_hash {boost::int128::detail::hash_finalize_64(v.high)}; @@ -62,9 +62,9 @@ struct hash }; template <> -struct hash +struct hash { - auto operator()(const boost::int128::uint128_t v) const noexcept -> std::size_t + auto operator()(const boost::int128::uint128 v) const noexcept -> std::size_t { const std::size_t low_hash {boost::int128::detail::hash_finalize_64(v.low)}; const std::size_t high_hash {boost::int128::detail::hash_finalize_64(v.high)}; @@ -79,14 +79,14 @@ struct hash namespace boost { namespace int128 { -inline std::size_t hash_value(const uint128_t v) noexcept +inline std::size_t hash_value(const uint128 v) noexcept { - return std::hash{}(v); + return std::hash{}(v); } -inline std::size_t hash_value(const int128_t v) noexcept +inline std::size_t hash_value(const int128 v) noexcept { - return std::hash{}(v); + return std::hash{}(v); } } // namespace int128 diff --git a/include/boost/int128/iostream.hpp b/include/boost/int128/iostream.hpp index 878e4610..679ebca2 100644 --- a/include/boost/int128/iostream.hpp +++ b/include/boost/int128/iostream.hpp @@ -28,7 +28,7 @@ namespace detail { template struct streamable_overload { - static constexpr bool value = std::is_same::value || std::is_same::value; + static constexpr bool value = std::is_same::value || std::is_same::value; }; template diff --git a/include/boost/int128/literals.hpp b/include/boost/int128/literals.hpp index 47b18d8a..d11cf277 100644 --- a/include/boost/int128/literals.hpp +++ b/include/boost/int128/literals.hpp @@ -15,44 +15,44 @@ namespace boost { namespace int128 { namespace literals { -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_u128(const char* str) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_u128(const char* str) noexcept { - return detail::parse_literal(str, str + detail::strlen(str)); + return detail::parse_literal(str, str + detail::strlen(str)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_U128(const char* str) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_U128(const char* str) noexcept { - return detail::parse_literal(str, str + detail::strlen(str)); + return detail::parse_literal(str, str + detail::strlen(str)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_u128(const char* str, std::size_t len) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_u128(const char* str, std::size_t len) noexcept { - return detail::parse_literal(str, str + len); + return detail::parse_literal(str, str + len); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t operator ""_U128(const char* str, std::size_t len) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 operator ""_U128(const char* str, std::size_t len) noexcept { - return detail::parse_literal(str, str + len); + return detail::parse_literal(str, str + len); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_i128(const char* str) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_i128(const char* str) noexcept { - return detail::parse_literal(str, str + detail::strlen(str)); + return detail::parse_literal(str, str + detail::strlen(str)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_I128(const char* str) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_I128(const char* str) noexcept { - return detail::parse_literal(str, str + detail::strlen(str)); + return detail::parse_literal(str, str + detail::strlen(str)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_i128(const char* str, std::size_t len) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_i128(const char* str, std::size_t len) noexcept { - return detail::parse_literal(str, str + len); + return detail::parse_literal(str, str + len); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator ""_I128(const char* str, std::size_t len) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 operator ""_I128(const char* str, std::size_t len) noexcept { - return detail::parse_literal(str, str + len); + return detail::parse_literal(str, str + len); } } // namespace literals diff --git a/include/boost/int128/numeric.hpp b/include/boost/int128/numeric.hpp index ba104d6d..5a184bcb 100644 --- a/include/boost/int128/numeric.hpp +++ b/include/boost/int128/numeric.hpp @@ -34,8 +34,8 @@ struct reduced_integers std::is_same::value || std::is_same::value || std::is_same::value || - std::is_same::value || - std::is_same::value}; + std::is_same::value || + std::is_same::value}; }; #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) @@ -54,25 +54,25 @@ BOOST_INT128_INLINE_CONSTEXPR bool is_reduced_integer_v {reduced_integers::max)(); + return (std::numeric_limits::max)(); } return z; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_sub(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 saturating_sub(const uint128 x, const uint128 y) noexcept { const auto z {x - y}; if (z > x) { - return (std::numeric_limits::min)(); + return (std::numeric_limits::min)(); } return z; @@ -84,7 +84,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_sub( # pragma warning(disable : 4146) // Unary minus applied to unsigned type #endif -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_add(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 saturating_add(const int128 x, const int128 y) noexcept { // Detect overflow BEFORE the addition to avoid signed overflow UB. // When both are non-negative: overflow iff x > max - y (subtraction safe: max - non_negative >= 0) @@ -93,23 +93,23 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_add(c if (x.signed_high() >= 0 && y.signed_high() >= 0) { - if (x > (std::numeric_limits::max)() - y) + if (x > (std::numeric_limits::max)() - y) { - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } } else if (x.signed_high() < 0 && y.signed_high() < 0) { - if (x < (std::numeric_limits::min)() - y) + if (x < (std::numeric_limits::min)() - y) { - return (std::numeric_limits::min)(); + return (std::numeric_limits::min)(); } } return x + y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_sub(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 saturating_sub(const int128 x, const int128 y) noexcept { // Detect overflow BEFORE the subtraction to avoid signed overflow UB. // Positive overflow: x >= 0 and y < 0 and x > max + y (safe: max + negative < max) @@ -118,16 +118,16 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_sub(c if (x.signed_high() >= 0 && y.signed_high() < 0) { - if (x > (std::numeric_limits::max)() + y) + if (x > (std::numeric_limits::max)() + y) { - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } } else if (x.signed_high() < 0 && y.signed_high() >= 0) { - if (x < (std::numeric_limits::min)() + y) + if (x < (std::numeric_limits::min)() + y) { - return (std::numeric_limits::min)(); + return (std::numeric_limits::min)(); } } @@ -138,51 +138,51 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_sub(c # pragma warning(pop) #endif -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_mul(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 saturating_mul(const uint128 x, const uint128 y) noexcept { const auto x_bits {bit_width(x)}; const auto y_bits {bit_width(y)}; - if ((x_bits + y_bits) > std::numeric_limits::digits) + if ((x_bits + y_bits) > std::numeric_limits::digits) { - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } return x * y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_mul(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 saturating_mul(const int128 x, const int128 y) noexcept { - const auto x_bits {bit_width(static_cast(abs(x)))}; - const auto y_bits {bit_width(static_cast(abs(y)))}; + const auto x_bits {bit_width(static_cast(abs(x)))}; + const auto y_bits {bit_width(static_cast(abs(y)))}; - if ((x_bits + y_bits) > std::numeric_limits::digits) + if ((x_bits + y_bits) > std::numeric_limits::digits) { if ((x < 0) != (y < 0)) { - return (std::numeric_limits::min)(); + return (std::numeric_limits::min)(); } else { - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } } - const int128_t res {x * y}; + const int128 res {x * y}; return res; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t saturating_div(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 saturating_div(const uint128 x, const uint128 y) noexcept { return x / y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_div(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 saturating_div(const int128 x, const int128 y) noexcept { - if (BOOST_INT128_UNLIKELY(x == (std::numeric_limits::min)() && y == -1)) + if (BOOST_INT128_UNLIKELY(x == (std::numeric_limits::min)() && y == -1)) { // This is the only possible case of overflow - return (std::numeric_limits::max)(); + return (std::numeric_limits::max)(); } return x / y; @@ -194,15 +194,15 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_div(c #endif BOOST_INT128_EXPORT template , bool> = true> -BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const uint128_t value) noexcept +BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const uint128 value) noexcept { - BOOST_INT128_IF_CONSTEXPR (std::is_same::value) + BOOST_INT128_IF_CONSTEXPR (std::is_same::value) { return static_cast(value); } else { - if (value > static_cast((std::numeric_limits::max)())) + if (value > static_cast((std::numeric_limits::max)())) { return (std::numeric_limits::max)(); } @@ -216,16 +216,16 @@ BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const uint128_t va #endif BOOST_INT128_EXPORT template , bool> = true> -BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const int128_t value) noexcept +BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const int128 value) noexcept { - BOOST_INT128_IF_CONSTEXPR (std::is_same::value) + BOOST_INT128_IF_CONSTEXPR (std::is_same::value) { return static_cast(value); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - else BOOST_INT128_IF_CONSTEXPR (std::is_same::value || std::is_same::value) + else BOOST_INT128_IF_CONSTEXPR (std::is_same::value || std::is_same::value) #else - else BOOST_INT128_IF_CONSTEXPR (std::is_same::value) + else BOOST_INT128_IF_CONSTEXPR (std::is_same::value) #endif { // We can't possibly have overflow in this case @@ -233,11 +233,11 @@ BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const int128_t val } else { - if (value > static_cast((std::numeric_limits::max)())) + if (value > static_cast((std::numeric_limits::max)())) { return (std::numeric_limits::max)(); } - else if (value < static_cast((std::numeric_limits::min)())) + else if (value < static_cast((std::numeric_limits::min)())) { return (std::numeric_limits::min)(); } @@ -248,7 +248,7 @@ BOOST_INT128_HOST_DEVICE constexpr TargetType saturating_cast(const int128_t val namespace detail { -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::uint64_t gcd64(std::uint64_t x, std::uint64_t y) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::uint64_t gcd64(std::uint64_t x, std::uint64_t y) noexcept { if (x == 0) { @@ -280,7 +280,7 @@ BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr std::uint64_t gcd64( } // namespace detail -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t gcd(uint128_t a, uint128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 gcd(uint128 a, uint128 b) noexcept { // Base case if (a == 0U) @@ -304,7 +304,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t gcd(uint128_t a if (a > b) { - const uint128_t temp {a}; + const uint128 temp {a}; a = b; b = temp; } @@ -314,12 +314,12 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t gcd(uint128_t a // Stop doing 128-bit math as soon as we can const auto g {detail::gcd64(a.low, b.low)}; - return uint128_t{0, g} << shift; + return uint128{0, g} << shift; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t gcd(const int128_t a, const int128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 gcd(const int128 a, const int128 b) noexcept { - return static_cast(gcd(static_cast(abs(a)), static_cast(abs(b)))); + return static_cast(gcd(static_cast(abs(a)), static_cast(abs(b)))); } // For unknown reasons this implementation fails for MSVC x86 only in release mode @@ -327,11 +327,11 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t gcd(const int128 // but very slow impl that we know works. #if !(defined(_M_IX86) && !defined(_NDEBUG)) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(const uint128_t a, const uint128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 lcm(const uint128 a, const uint128 b) noexcept { if (a == 0U || b == 0U) { - return static_cast(0); + return static_cast(0); } // Calculate GCD first @@ -343,11 +343,11 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(const uint1 #else -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(uint128_t a, uint128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 lcm(uint128 a, uint128 b) noexcept { if (a == 0U || b == 0U) { - return uint128_t{0}; + return uint128{0}; } @@ -365,7 +365,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(uint128_t a std::swap(a, b); } - uint128_t lcm{a}; + uint128 lcm{a}; while (lcm % b != 0U) { @@ -377,12 +377,12 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t lcm(uint128_t a #endif -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t lcm(const int128_t a, const int128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 lcm(const int128 a, const int128 b) noexcept { - return static_cast(lcm(static_cast(abs(a)), static_cast(abs(b)))); + return static_cast(lcm(static_cast(abs(a)), static_cast(abs(b)))); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t midpoint(const uint128_t a, const uint128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 midpoint(const uint128 a, const uint128 b) noexcept { // Bit manipulation formula works for unsigned integers auto mid {(a & b) + ((a ^ b) >> 1)}; @@ -396,7 +396,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t midpoint(const return mid; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t midpoint(const int128_t a, const int128_t b) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 midpoint(const int128 a, const int128 b) noexcept { // For signed integers, we use a + (b - a) / 2 or a - (a - b) / 2 // The subtraction is done in unsigned arithmetic to handle overflow correctly @@ -404,10 +404,10 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t midpoint(const i // // Use direct field access for both the uint128 construction and the // comparison to avoid NVCC host compiler issues with operator<= and - // static_cast on int128_t for large-magnitude values + // static_cast on int128 for large-magnitude values - const uint128_t ua {a.high, a.low}; - const uint128_t ub {b.high, b.low}; + const uint128 ua {a.high, a.low}; + const uint128 ub {b.high, b.low}; const bool a_le_b {a.high == b.high ? a.low <= b.low : a.signed_high() < b.signed_high()}; @@ -415,13 +415,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t midpoint(const i { // diff = b - a (computed in unsigned, handles wrap-around correctly) const auto diff {ub - ua}; - return a + static_cast(diff / 2U); + return a + static_cast(diff / 2U); } else { // diff = a - b (computed in unsigned, handles wrap-around correctly) const auto diff {ua - ub}; - return a - static_cast(diff / 2U); + return a - static_cast(diff / 2U); } } @@ -460,7 +460,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const div_re namespace detail { // -1 when the exact quotient of x / y is negative, and 1 otherwise -BOOST_INT128_HOST_DEVICE constexpr int quotient_sign(const int128_t x, const int128_t y) noexcept +BOOST_INT128_HOST_DEVICE constexpr int quotient_sign(const int128 x, const int128 y) noexcept { return (x < 0) != (y < 0) ? -1 : 1; } @@ -468,12 +468,12 @@ BOOST_INT128_HOST_DEVICE constexpr int quotient_sign(const int128_t x, const int // Applies the quotient offset d (-1, 0, or 1) to a truncated division result, and returns the // remainder matching the adjusted quotient. The remainder is evaluated in unsigned arithmetic // so that the d * y term cannot overflow when y is INT128_MIN. -BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const i128div_t truncated, const int128_t y, const int d) noexcept +BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const i128div_t truncated, const int128 y, const int d) noexcept { - const uint128_t unsigned_rem {truncated.rem.high, truncated.rem.low}; - const uint128_t unsigned_y {y.high, y.low}; + const uint128 unsigned_rem {truncated.rem.high, truncated.rem.low}; + const uint128 unsigned_y {y.high, y.low}; - uint128_t rem {unsigned_rem}; + uint128 rem {unsigned_rem}; if (d > 0) { @@ -484,14 +484,14 @@ BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const i1 rem = unsigned_rem + unsigned_y; } - return div_result{truncated.quot + d, static_cast(rem)}; + return div_result{truncated.quot + d, static_cast(rem)}; } // An unsigned quotient is never rounded down, so the only offsets are 0 and 1. The remainder // of an incremented quotient is negative, and is returned reduced modulo 2^128. -BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const u128div_t truncated, const uint128_t y, const bool increment) noexcept +BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const u128div_t truncated, const uint128 y, const bool increment) noexcept { - return div_result{increment ? truncated.quot + 1U : truncated.quot, + return div_result{increment ? truncated.quot + 1U : truncated.quot, increment ? truncated.rem - y : truncated.rem}; } @@ -499,31 +499,31 @@ BOOST_INT128_HOST_DEVICE constexpr div_result offset_quotient(const u // magnitude when the remainder is more than half the divisor. truncate_ties selects the strict // form, which both breaks an exact tie towards zero and recovers the bit that abs(y) / 2 drops // when y is odd. -BOOST_INT128_HOST_DEVICE constexpr bool nearest_increment(const uint128_t abs_rem, const uint128_t abs_half_y, const bool truncate_ties) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool nearest_increment(const uint128 abs_rem, const uint128 abs_half_y, const bool truncate_ties) noexcept { return truncate_ties ? abs_rem > abs_half_y : abs_rem >= abs_half_y; } // Magnitude of the remainder of a truncated signed division. The magnitude is always less // than abs(y), so it is representable for every valid divisor. -BOOST_INT128_HOST_DEVICE constexpr uint128_t abs_remainder(const i128div_t truncated) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 abs_remainder(const i128div_t truncated) noexcept { - return static_cast(abs(truncated.rem)); + return static_cast(abs(truncated.rem)); } // floor(abs(y) / 2), exact for every y including INT128_MIN -BOOST_INT128_HOST_DEVICE constexpr uint128_t abs_half_divisor(const int128_t y) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 abs_half_divisor(const int128 y) noexcept { - return static_cast(abs(y)) >> 1U; + return static_cast(abs(y)) >> 1U; } // An odd divisor cannot produce an exact tie, so every ties function truncates on it -BOOST_INT128_HOST_DEVICE constexpr bool is_odd(const int128_t x) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool is_odd(const int128 x) noexcept { return (x.low & 1U) != 0U; } -BOOST_INT128_HOST_DEVICE constexpr bool is_odd(const uint128_t x) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool is_odd(const uint128 x) noexcept { return (x.low & 1U) != 0U; } @@ -531,180 +531,180 @@ BOOST_INT128_HOST_DEVICE constexpr bool is_odd(const uint128_t x) noexcept } // namespace detail // Rounds towards zero, which is what operator/ already does -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_zero(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; - return div_result{truncated.quot, truncated.rem}; + return div_result{truncated.quot, truncated.rem}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_zero(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; - return div_result{truncated.quot, truncated.rem}; + return div_result{truncated.quot, truncated.rem}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_to_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_to_zero(const uint128 x, const uint128 y) noexcept { return x / y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_to_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_to_zero(const int128 x, const int128 y) noexcept { return x / y; } // Rounds away from zero, so the quotient grows in magnitude unless the division is exact -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_away_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_away_zero(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, truncated.rem != 0U); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_away_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_away_zero(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, truncated.rem != 0 ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_away_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_away_zero(const uint128 x, const uint128 y) noexcept { return div_rem_away_zero(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_away_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_away_zero(const int128 x, const int128 y) noexcept { return div_rem_away_zero(x, y).quotient; } // Rounds towards positive infinity, which for an unsigned quotient is away from zero -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_pos_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_pos_inf(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, truncated.rem != 0U); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_pos_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_pos_inf(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto adjust {truncated.rem != 0 && detail::quotient_sign(x, y) > 0}; return detail::offset_quotient(truncated, y, adjust ? 1 : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_to_pos_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_to_pos_inf(const uint128 x, const uint128 y) noexcept { return div_rem_to_pos_inf(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_to_pos_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_to_pos_inf(const int128 x, const int128 y) noexcept { return div_rem_to_pos_inf(x, y).quotient; } // Rounds towards negative infinity, which for an unsigned quotient is truncation -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_neg_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_neg_inf(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; - return div_result{truncated.quot, truncated.rem}; + return div_result{truncated.quot, truncated.rem}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_neg_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_to_neg_inf(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto adjust {truncated.rem != 0 && detail::quotient_sign(x, y) < 0}; return detail::offset_quotient(truncated, y, adjust ? -1 : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_to_neg_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_to_neg_inf(const uint128 x, const uint128 y) noexcept { return x / y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_to_neg_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_to_neg_inf(const int128 x, const int128 y) noexcept { return div_rem_to_neg_inf(x, y).quotient; } // Euclidean division, whose remainder is always in [0, abs(y)). Only a negative remainder // needs fixing, and growing the quotient magnitude by one makes the remainder positive. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_euclid(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_euclid(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; - return div_result{truncated.quot, truncated.rem}; + return div_result{truncated.quot, truncated.rem}; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_euclid(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_euclid(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, truncated.rem < 0 ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_euclid(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_euclid(const uint128 x, const uint128 y) noexcept { return x / y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_euclid(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_euclid(const int128 x, const int128 y) noexcept { return div_rem_euclid(x, y).quotient; } // Rounds to nearest, breaking an exact tie towards zero -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_zero(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, detail::nearest_increment(truncated.rem, y >> 1U, true)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_zero(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto increment {detail::nearest_increment(detail::abs_remainder(truncated), detail::abs_half_divisor(y), true)}; return detail::offset_quotient(truncated, y, increment ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_to_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_to_zero(const uint128 x, const uint128 y) noexcept { return div_rem_ties_to_zero(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_to_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_to_zero(const int128 x, const int128 y) noexcept { return div_rem_ties_to_zero(x, y).quotient; } // Rounds to nearest, breaking an exact tie away from zero -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_away_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_away_zero(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, detail::nearest_increment(truncated.rem, y >> 1U, detail::is_odd(y))); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_away_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_away_zero(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto increment {detail::nearest_increment(detail::abs_remainder(truncated), detail::abs_half_divisor(y), detail::is_odd(y))}; return detail::offset_quotient(truncated, y, increment ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_away_zero(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_away_zero(const uint128 x, const uint128 y) noexcept { return div_rem_ties_away_zero(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_away_zero(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_away_zero(const int128 x, const int128 y) noexcept { return div_rem_ties_away_zero(x, y).quotient; } // Rounds to nearest, breaking an exact tie towards positive infinity. A tie only grows the // magnitude when the quotient is positive. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_pos_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_pos_inf(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, detail::nearest_increment(truncated.rem, y >> 1U, detail::is_odd(y))); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_pos_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_pos_inf(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto sign {detail::quotient_sign(x, y)}; @@ -712,25 +712,25 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_ return detail::offset_quotient(truncated, y, increment ? sign : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_to_pos_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_to_pos_inf(const uint128 x, const uint128 y) noexcept { return div_rem_ties_to_pos_inf(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_to_pos_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_to_pos_inf(const int128 x, const int128 y) noexcept { return div_rem_ties_to_pos_inf(x, y).quotient; } // Rounds to nearest, breaking an exact tie towards negative infinity. A tie only grows the // magnitude when the quotient is negative, so an unsigned tie always truncates. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_neg_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_neg_inf(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; return detail::offset_quotient(truncated, y, detail::nearest_increment(truncated.rem, y >> 1U, true)); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_neg_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_neg_inf(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto sign {detail::quotient_sign(x, y)}; @@ -738,26 +738,26 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_ return detail::offset_quotient(truncated, y, increment ? sign : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_to_neg_inf(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_to_neg_inf(const uint128 x, const uint128 y) noexcept { return div_rem_ties_to_neg_inf(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_to_neg_inf(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_to_neg_inf(const int128 x, const int128 y) noexcept { return div_rem_ties_to_neg_inf(x, y).quotient; } // Rounds to nearest, breaking an exact tie to the odd quotient, so a tie only grows the // magnitude when truncation would have produced an even quotient -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_odd(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_odd(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; const auto increment {detail::nearest_increment(truncated.rem, y >> 1U, detail::is_odd(y) || detail::is_odd(truncated.quot))}; return detail::offset_quotient(truncated, y, increment); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_odd(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_odd(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto truncate_ties {detail::is_odd(y) || detail::is_odd(truncated.quot)}; @@ -765,26 +765,26 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_ return detail::offset_quotient(truncated, y, increment ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_to_odd(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_to_odd(const uint128 x, const uint128 y) noexcept { return div_rem_ties_to_odd(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_to_odd(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_to_odd(const int128 x, const int128 y) noexcept { return div_rem_ties_to_odd(x, y).quotient; } // Rounds to nearest, breaking an exact tie to the even quotient, so a tie only grows the // magnitude when truncation would have produced an odd quotient -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_even(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_even(const uint128 x, const uint128 y) noexcept { const auto truncated {div(x, y)}; const auto increment {detail::nearest_increment(truncated.rem, y >> 1U, detail::is_odd(y) || !detail::is_odd(truncated.quot))}; return detail::offset_quotient(truncated, y, increment); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_even(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_rem_ties_to_even(const int128 x, const int128 y) noexcept { const auto truncated {div(x, y)}; const auto truncate_ties {detail::is_odd(y) || !detail::is_odd(truncated.quot)}; @@ -792,31 +792,31 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr div_result div_ return detail::offset_quotient(truncated, y, increment ? detail::quotient_sign(x, y) : 0); } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t div_ties_to_even(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 div_ties_to_even(const uint128 x, const uint128 y) noexcept { return div_rem_ties_to_even(x, y).quotient; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t div_ties_to_even(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 div_ties_to_even(const int128 x, const int128 y) noexcept { return div_rem_ties_to_even(x, y).quotient; } // The Euclidean remainder, which is always in [0, abs(y)). Only a negative remainder needs // fixing, and abs(y) is added in unsigned arithmetic so that INT128_MIN is handled. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t rem_euclid(const uint128_t x, const uint128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 rem_euclid(const uint128 x, const uint128 y) noexcept { return x % y; } -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t rem_euclid(const int128_t x, const int128_t y) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 rem_euclid(const int128 x, const int128 y) noexcept { const auto rem {x % y}; if (rem < 0) { - const uint128_t unsigned_rem {rem.high, rem.low}; - return static_cast(unsigned_rem + static_cast(abs(y))); + const uint128 unsigned_rem {rem.high, rem.low}; + return static_cast(unsigned_rem + static_cast(abs(y))); } return rem; diff --git a/include/boost/int128/random.hpp b/include/boost/int128/random.hpp index 82e2975b..adc58bdb 100644 --- a/include/boost/int128/random.hpp +++ b/include/boost/int128/random.hpp @@ -15,79 +15,79 @@ template struct make_unsigned_imp; template <> -struct make_unsigned_imp +struct make_unsigned_imp { - using type = int128::uint128_t; + using type = int128::uint128; }; template <> -struct make_unsigned_imp +struct make_unsigned_imp { - using type = int128::uint128_t; + using type = int128::uint128; }; template struct make_unsigned; template <> -struct make_unsigned +struct make_unsigned { - using type = int128::uint128_t; + using type = int128::uint128; }; template <> -struct make_unsigned +struct make_unsigned { - using type = int128::int128_t; + using type = int128::int128; }; template struct make_unsigned_or_unbounded_imp; template <> -struct make_unsigned_or_unbounded_imp +struct make_unsigned_or_unbounded_imp { - using type = int128::uint128_t; + using type = int128::uint128; }; template <> -struct make_unsigned_or_unbounded_imp +struct make_unsigned_or_unbounded_imp { - using type = int128::uint128_t; + using type = int128::uint128; }; template struct make_unsigned_or_unbounded; template <> -struct make_unsigned_or_unbounded +struct make_unsigned_or_unbounded { - using type = int128::uint128_t; + using type = int128::uint128; }; template <> -struct make_unsigned_or_unbounded +struct make_unsigned_or_unbounded { - using type = int128::uint128_t; + using type = int128::uint128; }; template struct is_integral; template <> -struct is_integral : std::true_type {}; +struct is_integral : std::true_type {}; template <> -struct is_integral : std::true_type {}; +struct is_integral : std::true_type {}; template struct is_signed; template <> -struct is_signed : std::false_type {}; +struct is_signed : std::false_type {}; template <> -struct is_signed : std::true_type {}; +struct is_signed : std::true_type {}; } // namespace traits } // namespace random diff --git a/include/boost/int128/string.hpp b/include/boost/int128/string.hpp index 4d1d94e6..0eec29a2 100644 --- a/include/boost/int128/string.hpp +++ b/include/boost/int128/string.hpp @@ -18,7 +18,7 @@ namespace boost { namespace int128 { template -auto to_string(const T& value) -> std::enable_if_t<(std::is_same::value || std::is_same::value), std::string> +auto to_string(const T& value) -> std::enable_if_t<(std::is_same::value || std::is_same::value), std::string> { char buffer[detail::mini_to_chars_buffer_size]; const auto last {detail::mini_to_chars(buffer, value, 10, false)}; @@ -26,7 +26,7 @@ auto to_string(const T& value) -> std::enable_if_t<(std::is_same::v } template -auto to_wstring(const T& value) -> std::enable_if_t<(std::is_same::value || std::is_same::value), std::wstring> +auto to_wstring(const T& value) -> std::enable_if_t<(std::is_same::value || std::is_same::value), std::wstring> { char buffer[detail::mini_to_chars_buffer_size]; const auto last {detail::mini_to_chars(buffer, value, 10, false)}; diff --git a/include/boost/int128/utilities.hpp b/include/boost/int128/utilities.hpp index 2ccf907e..fd63c308 100644 --- a/include/boost/int128/utilities.hpp +++ b/include/boost/int128/utilities.hpp @@ -24,9 +24,9 @@ namespace int128 { namespace detail { // Modular addition for 128-bit operands assuming 0 <= a, b < m -BOOST_INT128_HOST_DEVICE constexpr uint128_t addmod(const uint128_t a, const uint128_t b, const uint128_t m) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 addmod(const uint128 a, const uint128 b, const uint128 m) noexcept { - const uint128_t s {a + b}; + const uint128 s {a + b}; if (s < a || s >= m) { @@ -37,9 +37,9 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t addmod(const uint128_t a, const uin } // Modular multiplication via shift-and-add for the full 128-bit modulus case -BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t mulmod_shift(uint128_t a, uint128_t b, const uint128_t m) noexcept +BOOST_int128EST_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 mulmod_shift(uint128 a, uint128 b, const uint128 m) noexcept { - uint128_t result {0}; + uint128 result {0}; while (b != 0U) { @@ -58,42 +58,42 @@ BOOST_INT128_TEST_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t mulmod_shi // Modular multiplication when the modulus fits in 64 bits BOOST_INT128_HOST_DEVICE constexpr std::uint64_t mulmod_word(const std::uint64_t a, const std::uint64_t b, const std::uint64_t m) noexcept { - return ((uint128_t{a} * uint128_t{b}) % uint128_t{m}).low; + return ((uint128{a} * uint128{b}) % uint128{m}).low; } } // namespace detail // Computes (base ^ exp) mod m using fast modular exponentiation with // optimizations specific to the boost::int128 library types -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t powm(uint128_t base, uint128_t exp, const uint128_t m) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 powm(uint128 base, uint128 exp, const uint128 m) noexcept { if (BOOST_INT128_UNLIKELY(m == 0U)) { - return uint128_t{0}; + return uint128{0}; } if (m == 1U) { - return uint128_t{0}; + return uint128{0}; } if (exp == 0U) { - return uint128_t{1}; + return uint128{1}; } base %= m; if (base == 0U) { - return uint128_t{0}; + return uint128{0}; } // Power-of-two modulus: reduction is just a bitmask. if (has_single_bit(m)) { - const uint128_t mask {m - 1U}; - uint128_t result {1}; + const uint128 mask {m - 1U}; + uint128 result {1}; while (exp != 0U) { @@ -127,12 +127,12 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t powm(uint128_t exp >>= 1; } - return uint128_t{result}; + return uint128{result}; } // General 128-bit modulus: shift-and-add for each squaring keeps every // intermediate strictly below m without needing a 256-bit product. - uint128_t result {1}; + uint128 result {1}; while (exp != 0U) { @@ -149,36 +149,36 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t powm(uint128_t } // Signed overload. Returns the non-negative residue in [0, m) -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t powm(const int128_t base, const int128_t exp, const int128_t m) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 powm(const int128 base, const int128 exp, const int128 m) noexcept { if (BOOST_INT128_UNLIKELY(m <= 0 || exp < 0)) { - return int128_t{0}; + return int128{0}; } - const uint128_t um {static_cast(m)}; + const uint128 um {static_cast(m)}; - uint128_t ub {}; + uint128 ub {}; if (base.signed_high() < 0) { - const uint128_t magnitude {static_cast(abs(base))}; - const uint128_t r {magnitude % um}; - ub = r == 0U ? uint128_t{0} : static_cast(um - r); + const uint128 magnitude {static_cast(abs(base))}; + const uint128 r {magnitude % um}; + ub = r == 0U ? uint128{0} : static_cast(um - r); } else { - ub = static_cast(base) % um; + ub = static_cast(base) % um; } - return static_cast(powm(ub, static_cast(exp), um)); + return static_cast(powm(ub, static_cast(exp), um)); } // Computes base^exp using exponentiation by squaring. The result is reduced // modulo 2^128, mirroring the wrap-around behavior of operator*. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t ipow(uint128_t base, std::uint64_t exp) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 ipow(uint128 base, std::uint64_t exp) noexcept { - uint128_t result {1}; + uint128 result {1}; while (exp != 0U) { @@ -199,9 +199,9 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t ipow(uint128_t } // Signed overload. Wraps modulo 2^128 on overflow, matching operator*. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t ipow(int128_t base, std::uint64_t exp) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 ipow(int128 base, std::uint64_t exp) noexcept { - int128_t result {1}; + int128 result {1}; while (exp != 0U) { @@ -222,7 +222,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t ipow(int128_t ba } // Integer square root: returns floor(sqrt(n)). -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t isqrt(const uint128_t n) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128 isqrt(const uint128 n) noexcept { if (n < 2U) { @@ -230,11 +230,11 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t isqrt(const uin } // 2^ceil(bit_width(n)/2) is the smallest power of two whose square exceeds n. - uint128_t x {uint128_t{1} << ((bit_width(n) + 1) / 2)}; + uint128 x {uint128{1} << ((bit_width(n) + 1) / 2)}; while (true) { - const uint128_t y {(x + n / x) >> 1}; + const uint128 y {(x + n / x) >> 1}; if (y >= x) { @@ -246,14 +246,14 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr uint128_t isqrt(const uin } // Signed overload. Negative inputs are documented to return 0. -BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t isqrt(const int128_t n) noexcept +BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128 isqrt(const int128 n) noexcept { if (BOOST_INT128_UNLIKELY(n < 0)) { - return int128_t{0}; + return int128{0}; } - return static_cast(isqrt(static_cast(n))); + return static_cast(isqrt(static_cast(n))); } namespace detail { @@ -266,22 +266,22 @@ struct valid_checked_type : std::integral_constant::va !std::is_same::value> {}; template <> -struct valid_checked_type : std::true_type {}; +struct valid_checked_type : std::true_type {}; template <> -struct valid_checked_type : std::true_type {}; +struct valid_checked_type : std::true_type {}; -// Widen an integer operand to its 128-bit two's complement bit pattern, returned as a uint128_t +// Widen an integer operand to its 128-bit two's complement bit pattern, returned as a uint128 template -BOOST_INT128_HOST_DEVICE constexpr uint128_t ckd_widen(const T value) noexcept +BOOST_INT128_HOST_DEVICE constexpr uint128 ckd_widen(const T value) noexcept { BOOST_INT128_IF_CONSTEXPR (std::numeric_limits::is_signed) { - return static_cast(static_cast(value)); + return static_cast(static_cast(value)); } else { - return static_cast(value); + return static_cast(value); } } @@ -289,35 +289,35 @@ BOOST_INT128_HOST_DEVICE constexpr uint128_t ckd_widen(const T value) noexcept // image. magnitude is the absolute value; negative records the sign. struct ckd_operand { - uint128_t raw; - uint128_t magnitude; + uint128 raw; + uint128 magnitude; bool negative; }; template BOOST_INT128_HOST_DEVICE constexpr ckd_operand ckd_decompose(const T value) noexcept { - const uint128_t raw {ckd_widen(value)}; + const uint128 raw {ckd_widen(value)}; const bool negative {std::numeric_limits::is_signed && ((raw >> 127) != 0U)}; - return ckd_operand{raw, negative ? uint128_t{0} - raw : raw, negative}; + return ckd_operand{raw, negative ? uint128{0} - raw : raw, negative}; } // Exact signed sum of two operands given as (magnitude, sign). carry marks a // 129th bit, which no 128-bit or narrower target can represent. struct ckd_sum_result { - uint128_t magnitude; + uint128 magnitude; bool negative; bool carry; }; -BOOST_INT128_HOST_DEVICE constexpr ckd_sum_result ckd_signed_sum(const uint128_t a_magnitude, const bool a_negative, - const uint128_t b_magnitude, const bool b_negative) noexcept +BOOST_INT128_HOST_DEVICE constexpr ckd_sum_result ckd_signed_sum(const uint128 a_magnitude, const bool a_negative, + const uint128 b_magnitude, const bool b_negative) noexcept { if (a_negative == b_negative) { // Equal signs: magnitudes add and may overflow into a 129th bit. - const uint128_t magnitude {a_magnitude + b_magnitude}; + const uint128 magnitude {a_magnitude + b_magnitude}; return ckd_sum_result{magnitude, a_negative, magnitude < a_magnitude}; } @@ -333,18 +333,18 @@ BOOST_INT128_HOST_DEVICE constexpr ckd_sum_result ckd_signed_sum(const uint128_t // Whether a result of the given sign and magnitude fits in T1. exceeds_width // forces overflow when the true magnitude does not even fit in 128 bits. template -BOOST_INT128_HOST_DEVICE constexpr bool ckd_overflows(const uint128_t magnitude, const bool negative, const bool exceeds_width) noexcept +BOOST_INT128_HOST_DEVICE constexpr bool ckd_overflows(const uint128 magnitude, const bool negative, const bool exceeds_width) noexcept { if (exceeds_width) { return true; } - const uint128_t max_magnitude {static_cast((std::numeric_limits::max)())}; + const uint128 max_magnitude {static_cast((std::numeric_limits::max)())}; if (negative) { - const uint128_t min_magnitude {std::numeric_limits::is_signed ? max_magnitude + uint128_t{1} : uint128_t{0}}; + const uint128 min_magnitude {std::numeric_limits::is_signed ? max_magnitude + uint128{1} : uint128{0}}; return magnitude > min_magnitude; } @@ -425,9 +425,9 @@ BOOST_INT128_HOST_DEVICE constexpr bool ckd_mul(T1* result, const T2 a, const T3 // UINT128_MAX. Dividing the maximum by one magnitude tests that without // forming a 256-bit product. const bool exceeds_width {op_a.magnitude != 0U && - op_b.magnitude > ((std::numeric_limits::max)() / op_a.magnitude)}; + op_b.magnitude > ((std::numeric_limits::max)() / op_a.magnitude)}; - const uint128_t product_magnitude {op_a.magnitude * op_b.magnitude}; + const uint128 product_magnitude {op_a.magnitude * op_b.magnitude}; const bool product_negative {op_a.negative != op_b.negative}; return detail::ckd_overflows(product_magnitude, product_negative, exceeds_width); @@ -460,8 +460,8 @@ BOOST_INT128_INLINE_CONSTEXPR bool is_valid_comparison_type_v = valid_comparison // Allow the builtins to be used when available template -BOOST_INT128_INLINE_CONSTEXPR bool is_int128_type_v = std::is_same::value || - std::is_same::value +BOOST_INT128_INLINE_CONSTEXPR bool is_int128_type_v = std::is_same::value || + std::is_same::value #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) || std::is_same::value || std::is_same::value @@ -484,13 +484,13 @@ struct comparison_canonical template <> struct comparison_canonical { - using type = int128_t; + using type = int128; }; template <> struct comparison_canonical { - using type = uint128_t; + using type = uint128; }; #endif diff --git a/module/int128.cppm b/module/int128.cppm index 6218cac9..de6b35c9 100644 --- a/module/int128.cppm +++ b/module/int128.cppm @@ -71,18 +71,18 @@ extern "C++" { export namespace boost::int128 { -struct int128_t; -struct uint128_t; +struct int128; +struct uint128; } // namespace boost::int128 export namespace std { template <> -class numeric_limits; +class numeric_limits; template <> -class numeric_limits; +class numeric_limits; } // namespace std diff --git a/module/quick_test.cpp b/module/quick_test.cpp index 8f44ad82..ff7f4cbd 100644 --- a/module/quick_test.cpp +++ b/module/quick_test.cpp @@ -15,7 +15,7 @@ int main() { using namespace boost::int128; - uint128_t a {2, 0}; + uint128 a {2, 0}; a += 2u; std::cout << a << std::endl; diff --git a/test/benchmark_i128.cpp b/test/benchmark_i128.cpp index 963b7483..112be6a3 100644 --- a/test/benchmark_i128.cpp +++ b/test/benchmark_i128.cpp @@ -94,15 +94,15 @@ template const char* impl_label() noexcept; template <> -const char* impl_label() noexcept +const char* impl_label() noexcept { - return "int128_t"; + return "int128"; } template <> const char* impl_label() noexcept { - return "boost::mp::int128_t"; + return "boost::mp::int128"; } #if defined(BOOST_INT128_HAS_INT128) @@ -149,13 +149,13 @@ const char* impl_label() noexcept // 4 = Random width template -T from_int128(const boost::int128::int128_t value) +T from_int128(const boost::int128::int128 value) { return static_cast(value); } template <> -mp_i128 from_int128(const boost::int128::int128_t value) +mp_i128 from_int128(const boost::int128::int128 value) { return static_cast(static_cast(value.high)) << 64 | value.low; } @@ -163,7 +163,7 @@ mp_i128 from_int128(const boost::int128::int128_t value) #ifdef BOOST_INT128_HAS_MSVC_INTERNAL_I128 template <> -std::_Signed128 from_int128(const boost::int128::int128_t value) +std::_Signed128 from_int128(const boost::int128::int128 value) { return static_cast(static_cast(value.high)) << static_cast(64) | static_cast(value.low); } @@ -173,7 +173,7 @@ std::_Signed128 from_int128(const boost::int128::int128_t value) #ifdef BOOST_INT128_BENCHMARK_ABSL template <> -absl::int128 from_int128(const boost::int128::int128_t value) +absl::int128 from_int128(const boost::int128::int128 value) { return static_cast(static_cast(value.high)) << 64 | static_cast(value.low); } @@ -183,7 +183,7 @@ absl::int128 from_int128(const boost::int128::int128_t value) template std::vector generate_random_vector(std::size_t size = N, unsigned seed = 42U) { - using boost::int128::int128_t; + using boost::int128::int128; if (seed == 0) { @@ -202,43 +202,43 @@ std::vector generate_random_vector(std::size_t size = N, unsigned seed = 42U) switch (words) { case 0: - result[i] = from_int128(int128_t{ dist_high(gen), dist_low(gen) }); + result[i] = from_int128(int128{ dist_high(gen), dist_low(gen) }); break; case 1: - result[i] = from_int128(int128_t{dist_low(gen)}); + result[i] = from_int128(int128{dist_low(gen)}); break; case 2: if (i % 2 == 0) { - result[i] = from_int128(int128_t{dist_high(gen), dist_low(gen)}); + result[i] = from_int128(int128{dist_high(gen), dist_low(gen)}); } else { - result[i] = from_int128(int128_t{dist_low(gen)}); + result[i] = from_int128(int128{dist_low(gen)}); } break; case 3: if (i % 2 == 1) { - result[i] = from_int128(int128_t{dist_high(gen), dist_low(gen)}); + result[i] = from_int128(int128{dist_high(gen), dist_low(gen)}); } else { - result[i] = from_int128(int128_t{dist_low(gen)}); + result[i] = from_int128(int128{dist_low(gen)}); } break; case 4: if (size_dist(gen) == 1) { - result[i] = from_int128(int128_t{dist_high(gen), dist_low(gen)}); + result[i] = from_int128(int128{dist_high(gen), dist_low(gen)}); } else { - result[i] = from_int128(int128_t{dist_low(gen)}); + result[i] = from_int128(int128{dist_low(gen)}); } break; } @@ -510,7 +510,7 @@ int main(int argc, char* argv[]) std::cerr << "Two Word Operations\n"; std::cerr << "---------------------------\n\n"; - const auto library_vector = generate_random_vector<0, boost::int128::int128_t>(); + const auto library_vector = generate_random_vector<0, boost::int128::int128>(); const auto mp_vector = generate_random_vector<0, mp_i128>(); #if defined(BOOST_INT128_HAS_INT128) @@ -634,7 +634,7 @@ int main(int argc, char* argv[]) std::cerr << "One Word Operations\n"; std::cerr << "---------------------------\n\n"; - const auto library_vector = generate_random_vector<1, boost::int128::int128_t>(); + const auto library_vector = generate_random_vector<1, boost::int128::int128>(); const auto mp_vector = generate_random_vector<1, mp_i128>(); #if defined(BOOST_INT128_HAS_INT128) @@ -733,7 +733,7 @@ int main(int argc, char* argv[]) std::cerr << "Two-One Word Operations\n"; std::cerr << "---------------------------\n\n"; - const auto library_vector = generate_random_vector<2, boost::int128::int128_t>(); + const auto library_vector = generate_random_vector<2, boost::int128::int128>(); const auto mp_vector = generate_random_vector<2, mp_i128>(); #if defined(BOOST_INT128_HAS_INT128) @@ -832,7 +832,7 @@ int main(int argc, char* argv[]) std::cerr << "One-Two Word Operations\n"; std::cerr << "---------------------------\n\n"; - const auto library_vector = generate_random_vector<3, boost::int128::int128_t>(); + const auto library_vector = generate_random_vector<3, boost::int128::int128>(); const auto mp_vector = generate_random_vector<3, mp_i128>(); #if defined(BOOST_INT128_HAS_INT128) @@ -931,7 +931,7 @@ int main(int argc, char* argv[]) std::cerr << "Random Width Operations\n"; std::cerr << "---------------------------\n\n"; - const auto library_vector = generate_random_vector<4, boost::int128::int128_t>(); + const auto library_vector = generate_random_vector<4, boost::int128::int128>(); const auto mp_vector = generate_random_vector<4, mp_i128>(); #if defined(BOOST_INT128_HAS_INT128) @@ -1048,7 +1048,7 @@ int main(int argc, char* argv[]) std::cerr << std::endl; } - bench::write_json(bench::metadata{"int128_t", "i128", impl_label()}); + bench::write_json(bench::metadata{"int128", "i128", impl_label()}); // The Jamfile declares this target with run-fail, so a successful run reports 1. return 1; diff --git a/test/benchmark_results.hpp b/test/benchmark_results.hpp index 6fa5bc18..4edddcc8 100644 --- a/test/benchmark_results.hpp +++ b/test/benchmark_results.hpp @@ -2,8 +2,8 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#ifndef BOOST_INT128_TEST_BENCHMARK_RESULTS_HPP -#define BOOST_INT128_TEST_BENCHMARK_RESULTS_HPP +#ifndef BOOST_int128EST_BENCHMARK_RESULTS_HPP +#define BOOST_int128EST_BENCHMARK_RESULTS_HPP // Command line handling and result collection shared by benchmark_u128.cpp and // benchmark_i128.cpp. Every timing is still printed to stderr as it is measured @@ -343,4 +343,4 @@ inline void parse_options(const int argc, char* argv[]) } // namespace bench -#endif // BOOST_INT128_TEST_BENCHMARK_RESULTS_HPP +#endif // BOOST_int128EST_BENCHMARK_RESULTS_HPP diff --git a/test/benchmark_u128.cpp b/test/benchmark_u128.cpp index e1ee9c8a..077ed0d0 100644 --- a/test/benchmark_u128.cpp +++ b/test/benchmark_u128.cpp @@ -101,15 +101,15 @@ template const char* impl_label() noexcept; template <> -const char* impl_label() noexcept +const char* impl_label() noexcept { - return "uint128_t"; + return "uint128"; } template <> const char* impl_label() noexcept { - return "boost::mp::uint128_t"; + return "boost::mp::uint128"; } #if defined(BOOST_INT128_HAS_INT128) @@ -156,13 +156,13 @@ const char* impl_label() noexcept // 4 = Random width template -T from_uint128(const boost::int128::uint128_t value) +T from_uint128(const boost::int128::uint128 value) { return static_cast(value); } template <> -mp_u128 from_uint128(const boost::int128::uint128_t value) +mp_u128 from_uint128(const boost::int128::uint128 value) { return static_cast(value.high) << 64 | value.low; } @@ -170,7 +170,7 @@ mp_u128 from_uint128(const boost::int128::uint128_t value) #ifdef BOOST_INT128_HAS_MSVC_INTERNAL_I128 template <> -std::_Unsigned128 from_uint128(const boost::int128::uint128_t value) +std::_Unsigned128 from_uint128(const boost::int128::uint128 value) { return static_cast(value.high) << static_cast(64) | static_cast(value.low); } @@ -180,7 +180,7 @@ std::_Unsigned128 from_uint128(const boost::int128::uint128_t value) #ifdef BOOST_INT128_BENCHMARK_ABSL template <> -absl::uint128 from_uint128(const boost::int128::uint128_t value) +absl::uint128 from_uint128(const boost::int128::uint128 value) { return static_cast(value.high) << 64U | static_cast(value.low); } @@ -190,7 +190,7 @@ absl::uint128 from_uint128(const boost::int128::uint128_t value) template std::vector generate_random_vector(std::size_t size = N, unsigned seed = 42U) { - using boost::int128::uint128_t; + using boost::int128::uint128; if (seed == 0) { @@ -210,32 +210,32 @@ std::vector generate_random_vector(std::size_t size = N, unsigned seed = 42U) switch (words) { case 0: - result[i] = from_uint128(uint128_t{dist_high(gen), dist_low(gen)}); + result[i] = from_uint128(uint128{dist_high(gen), dist_low(gen)}); break; case 1: - result[i] = from_uint128(uint128_t{ dist_low(gen) }); + result[i] = from_uint128(uint128{ dist_low(gen) }); break; case 2: if (i % 2 == 0) { - result[i] = from_uint128(uint128_t{dist_high(gen), dist_low(gen)}); + result[i] = from_uint128(uint128{dist_high(gen), dist_low(gen)}); } else { - result[i] = from_uint128(uint128_t{dist_low(gen)}); + result[i] = from_uint128(uint128{dist_low(gen)}); } break; case 3: if (i % 2 == 1) { - result[i] = from_uint128(uint128_t{dist_high(gen), dist_low(gen)}); + result[i] = from_uint128(uint128{dist_high(gen), dist_low(gen)}); } else { - result[i] = from_uint128(uint128_t{dist_low(gen)}); + result[i] = from_uint128(uint128{dist_low(gen)}); } break; @@ -244,16 +244,16 @@ std::vector generate_random_vector(std::size_t size = N, unsigned seed = 42U) switch (size_dist(gen)) { case 0: - result[i] = from_uint128(uint128_t{dist_low(gen)}); + result[i] = from_uint128(uint128{dist_low(gen)}); break; case 1: - result[i] = from_uint128(uint128_t{dist_high(gen), dist_low(gen)}); + result[i] = from_uint128(uint128{dist_high(gen), dist_low(gen)}); break; case 2: - result[i] = from_uint128(uint128_t{dist_small(gen), dist_low(gen)}); + result[i] = from_uint128(uint128{dist_small(gen), dist_low(gen)}); break; case 3: - result[i] = from_uint128(uint128_t{dist_small(gen)}); + result[i] = from_uint128(uint128{dist_small(gen)}); break; default: BOOST_INT128_UNREACHABLE; @@ -638,7 +638,7 @@ int main(int argc, char* argv[]) std::cerr << "Two Word Operations\n"; std::cerr << "---------------------------\n\n"; - const auto library_vector = generate_random_vector<0, boost::int128::uint128_t>(); + const auto library_vector = generate_random_vector<0, boost::int128::uint128>(); const auto mp_vector = generate_random_vector<0, mp_u128>(); #if defined(BOOST_INT128_HAS_INT128) @@ -773,7 +773,7 @@ int main(int argc, char* argv[]) std::cerr << "One Word Operations\n"; std::cerr << "---------------------------\n\n"; - const auto library_vector = generate_random_vector<1, boost::int128::uint128_t>(); + const auto library_vector = generate_random_vector<1, boost::int128::uint128>(); const auto mp_vector = generate_random_vector<1, mp_u128>(); #if defined(BOOST_INT128_HAS_INT128) @@ -874,7 +874,7 @@ int main(int argc, char* argv[]) std::cerr << "Two-One Word Operations\n"; std::cerr << "---------------------------\n\n"; - const auto library_vector = generate_random_vector<2, boost::int128::uint128_t>(); + const auto library_vector = generate_random_vector<2, boost::int128::uint128>(); const auto mp_vector = generate_random_vector<2, mp_u128>(); #if defined(BOOST_INT128_HAS_INT128) @@ -973,7 +973,7 @@ int main(int argc, char* argv[]) std::cerr << "One-Two Word Operations\n"; std::cerr << "---------------------------\n\n"; - const auto library_vector = generate_random_vector<3, boost::int128::uint128_t>(); + const auto library_vector = generate_random_vector<3, boost::int128::uint128>(); const auto mp_vector = generate_random_vector<3, mp_u128>(); #if defined(BOOST_INT128_HAS_INT128) @@ -1071,7 +1071,7 @@ int main(int argc, char* argv[]) std::cerr << "Random Width Operations\n"; std::cerr << "---------------------------\n\n"; - const auto library_vector = generate_random_vector<4, boost::int128::uint128_t>(); + const auto library_vector = generate_random_vector<4, boost::int128::uint128>(); const auto mp_vector = generate_random_vector<4, mp_u128>(); #if defined(BOOST_INT128_HAS_INT128) @@ -1230,7 +1230,7 @@ int main(int argc, char* argv[]) } - bench::write_json(bench::metadata{"uint128_t", "u128", impl_label()}); + bench::write_json(bench::metadata{"uint128", "u128", impl_label()}); // The Jamfile declares this target with run-fail, so a successful run reports 1. return 1; diff --git a/test/compile_tests/literals_base_prefix_fail.cpp b/test/compile_tests/literals_base_prefix_fail.cpp index f7e10b0c..32eac374 100644 --- a/test/compile_tests/literals_base_prefix_fail.cpp +++ b/test/compile_tests/literals_base_prefix_fail.cpp @@ -4,7 +4,7 @@ // // A prefixed user-defined literal whose value does not fit the target type must be // rejected at compile time. 0x1 followed by 32 zeros is 2^128, one past the -// uint128_t maximum, so the base-16 parse overflows and this must not compile. +// uint128 maximum, so the base-16 parse overflows and this must not compile. #include diff --git a/test/compile_tests/utilities_comparison_fail.cpp b/test/compile_tests/utilities_comparison_fail.cpp index 5053bbf6..e6bce46a 100644 --- a/test/compile_tests/utilities_comparison_fail.cpp +++ b/test/compile_tests/utilities_comparison_fail.cpp @@ -9,5 +9,5 @@ int main() { - return boost::int128::cmp_equal(boost::int128::uint128_t{1}, 'a') ? 1 : 0; + return boost::int128::cmp_equal(boost::int128::uint128{1}, 'a') ? 1 : 0; } diff --git a/test/decimal_github_issue_1260.cpp b/test/decimal_github_issue_1260.cpp index 43825836..80cd10fb 100644 --- a/test/decimal_github_issue_1260.cpp +++ b/test/decimal_github_issue_1260.cpp @@ -12,11 +12,11 @@ using namespace boost::int128; int main() { - uint128_t lhs_sig {UINT64_C(54210108624275), UINT64_C(4089650035136921600)}; - uint128_t rhs_sig {UINT64_C(276471553983803), UINT64_C(11633843142343524352)}; + uint128 lhs_sig {UINT64_C(54210108624275), UINT64_C(4089650035136921600)}; + uint128 rhs_sig {UINT64_C(276471553983803), UINT64_C(11633843142343524352)}; lhs_sig *= 1000U; - BOOST_TEST_EQ(lhs_sig, uint128_t(UINT64_C(54210108624275221), UINT64_C(12919594847110692864))); + BOOST_TEST_EQ(lhs_sig, uint128(UINT64_C(54210108624275221), UINT64_C(12919594847110692864))); // 10^31 rhs_sig /= BOOST_INT128_UINT128_C(10000000000000000000000000000000); @@ -25,20 +25,20 @@ int main() rhs_sig /= 10U; BOOST_TEST_EQ(rhs_sig, 51U); - auto signed_lhs {static_cast(lhs_sig)}; - auto signed_rhs {static_cast(rhs_sig)}; + auto signed_lhs {static_cast(lhs_sig)}; + auto signed_rhs {static_cast(rhs_sig)}; signed_rhs = -signed_rhs; - BOOST_TEST_EQ(signed_rhs, int128_t(INT64_C(-1), UINT64_C(18446744073709551565))); + BOOST_TEST_EQ(signed_rhs, int128(INT64_C(-1), UINT64_C(18446744073709551565))); - auto res_sig {static_cast(signed_lhs + signed_rhs)}; - BOOST_TEST_EQ(res_sig, uint128_t(UINT64_C(54210108624275221), UINT64_C(12919594847110692813))); + auto res_sig {static_cast(signed_lhs + signed_rhs)}; + BOOST_TEST_EQ(res_sig, uint128(UINT64_C(54210108624275221), UINT64_C(12919594847110692813))); res_sig /= UINT64_C(10); - BOOST_TEST_EQ(res_sig, uint128_t(UINT64_C(5421010862427522), UINT64_C(3136633892082024442))); + BOOST_TEST_EQ(res_sig, uint128(UINT64_C(5421010862427522), UINT64_C(3136633892082024442))); res_sig /= UINT64_C(10); - BOOST_TEST_EQ(res_sig, uint128_t(UINT64_C(542101086242752), UINT64_C(4003012203950112767))); + BOOST_TEST_EQ(res_sig, uint128(UINT64_C(542101086242752), UINT64_C(4003012203950112767))); return boost::report_errors(); } diff --git a/test/fuzzing/test_fuzzing_add_versus_wide_int.cpp b/test/fuzzing/test_fuzzing_add_versus_wide_int.cpp index 216ec8e6..421cd58f 100644 --- a/test/fuzzing/test_fuzzing_add_versus_wide_int.cpp +++ b/test/fuzzing/test_fuzzing_add_versus_wide_int.cpp @@ -104,7 +104,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) const std::uint64_t b_hi64 { *reinterpret_cast(tmp_data.data() + std::size_t { UINT8_C(24) }) }; // Import data into the uint values. - using local_uint_type = ::boost::int128::uint128_t; + using local_uint_type = ::boost::int128::uint128; #if defined(WIDE_INTEGER_NAMESPACE) using cntrl_uint_type = ::WIDE_INTEGER_NAMESPACE::math::wide_integer::uint128_t; diff --git a/test/fuzzing/test_fuzzing_div_versus_wide_int.cpp b/test/fuzzing/test_fuzzing_div_versus_wide_int.cpp index 64145026..e5356874 100644 --- a/test/fuzzing/test_fuzzing_div_versus_wide_int.cpp +++ b/test/fuzzing/test_fuzzing_div_versus_wide_int.cpp @@ -104,7 +104,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) const std::uint64_t b_hi64 { *reinterpret_cast(tmp_data.data() + std::size_t { UINT8_C(24) }) }; // Import data into the uint values. - using local_uint_type = ::boost::int128::uint128_t; + using local_uint_type = ::boost::int128::uint128; #if defined(WIDE_INTEGER_NAMESPACE) using cntrl_uint_type = ::WIDE_INTEGER_NAMESPACE::math::wide_integer::uint128_t; diff --git a/test/fuzzing/test_fuzzing_mul_versus_wide_int.cpp b/test/fuzzing/test_fuzzing_mul_versus_wide_int.cpp index 2d7da2dc..4a437139 100644 --- a/test/fuzzing/test_fuzzing_mul_versus_wide_int.cpp +++ b/test/fuzzing/test_fuzzing_mul_versus_wide_int.cpp @@ -104,7 +104,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) const std::uint64_t b_hi64 { *reinterpret_cast(tmp_data.data() + std::size_t { UINT8_C(24) }) }; // Import data into the uint values. - using local_uint_type = ::boost::int128::uint128_t; + using local_uint_type = ::boost::int128::uint128; #if defined(WIDE_INTEGER_NAMESPACE) using cntrl_uint_type = ::WIDE_INTEGER_NAMESPACE::math::wide_integer::uint128_t; diff --git a/test/fuzzing/test_fuzzing_sub_versus_wide_int.cpp b/test/fuzzing/test_fuzzing_sub_versus_wide_int.cpp index e5bff887..e1242845 100644 --- a/test/fuzzing/test_fuzzing_sub_versus_wide_int.cpp +++ b/test/fuzzing/test_fuzzing_sub_versus_wide_int.cpp @@ -104,7 +104,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) const std::uint64_t b_hi64 { *reinterpret_cast(tmp_data.data() + std::size_t { UINT8_C(24) }) }; // Import data into the uint values. - using local_uint_type = ::boost::int128::uint128_t; + using local_uint_type = ::boost::int128::uint128; #if defined(WIDE_INTEGER_NAMESPACE) using cntrl_uint_type = ::WIDE_INTEGER_NAMESPACE::math::wide_integer::uint128_t; diff --git a/test/github_issue_207.cpp b/test/github_issue_207.cpp index c7c6cb2f..36d1917d 100644 --- a/test/github_issue_207.cpp +++ b/test/github_issue_207.cpp @@ -10,18 +10,18 @@ void test_u128_literals() { - const boost::int128::uint128_t max_val {std::numeric_limits::max()}; + const boost::int128::uint128 max_val {std::numeric_limits::max()}; const auto macro_val {BOOST_INT128_UINT128_C(340282366920938463463374607431768211455)}; BOOST_TEST(max_val == macro_val); } void test_i128_literals() { - const boost::int128::int128_t max_val {std::numeric_limits::max()}; + const boost::int128::int128 max_val {std::numeric_limits::max()}; const auto macro_val {BOOST_INT128_INT128_C(170141183460469231731687303715884105727)}; BOOST_TEST(max_val == macro_val); - const boost::int128::int128_t min_val {std::numeric_limits::min()}; + const boost::int128::int128 min_val {std::numeric_limits::min()}; const auto min_macro_val {BOOST_INT128_INT128_C(-170141183460469231731687303715884105728)}; BOOST_TEST(min_val == min_macro_val); } diff --git a/test/github_issue_210.cpp b/test/github_issue_210.cpp index 43e6ff4f..e80578ef 100644 --- a/test/github_issue_210.cpp +++ b/test/github_issue_210.cpp @@ -17,7 +17,7 @@ constexpr bool test_spot_div(IntType lhs, IntType rhs, IntType known_res) int main() { - static_assert(test_spot_div(boost::int128::uint128_t{50012077812411ULL, 6429278683030093824ULL}, boost::int128::uint128_t{542101086ULL, 4477988020393345024ULL}, 92256), "Spot failure"); + static_assert(test_spot_div(boost::int128::uint128{50012077812411ULL, 6429278683030093824ULL}, boost::int128::uint128{542101086ULL, 4477988020393345024ULL}, 92256), "Spot failure"); return 0; } diff --git a/test/github_issue_221.cpp b/test/github_issue_221.cpp index f05f2bd0..9a68b5ed 100644 --- a/test/github_issue_221.cpp +++ b/test/github_issue_221.cpp @@ -29,8 +29,8 @@ void test() int main() { - test(); - test(); + test(); + test(); return boost::report_errors(); } diff --git a/test/github_issue_272.cpp b/test/github_issue_272.cpp index c26f940c..c5342043 100644 --- a/test/github_issue_272.cpp +++ b/test/github_issue_272.cpp @@ -36,8 +36,8 @@ void check_endpos() int main() { - check_endpos(); - check_endpos(); + check_endpos(); + check_endpos(); return boost::report_errors(); } diff --git a/test/github_issue_377.cpp b/test/github_issue_377.cpp index 11ba3eb4..9b779cae 100644 --- a/test/github_issue_377.cpp +++ b/test/github_issue_377.cpp @@ -14,14 +14,14 @@ using namespace boost::int128; template void test_div_by_one() { - constexpr auto min_val {std::numeric_limits::min()}; + constexpr auto min_val {std::numeric_limits::min()}; BOOST_TEST_EQ(min_val, min_val / T{1}); } template void test_other_vals() { - constexpr auto min_val {std::numeric_limits::min()}; + constexpr auto min_val {std::numeric_limits::min()}; const auto min_div_2 {BOOST_INT128_INT128_C(-85070591730234615865843651857942052864)}; const auto min_div_4 {BOOST_INT128_INT128_C(-42535295865117307932921825928971026432)}; const auto min_div_16 {BOOST_INT128_INT128_C(-10633823966279326983230456482242756608)}; @@ -31,44 +31,44 @@ void test_other_vals() BOOST_TEST_EQ(min_div_16, min_val / T{16}); } -// Bug 1: operator>>(int128_t, int128_t) was calling << instead of >> +// Bug 1: operator>>(int128, int128) was calling << instead of >> void test_right_shift_int128_amount() { - const auto val {int128_t(0, 0xFF00)}; - const auto shift_4 {int128_t(0, 4)}; + const auto val {int128(0, 0xFF00)}; + const auto shift_4 {int128(0, 4)}; - // Right-shift with int128_t shift amount must match integer shift + // Right-shift with int128 shift amount must match integer shift BOOST_TEST_EQ(val >> shift_4, val >> 4); - const auto expected_ff0 {int128_t(0, 0xFF0)}; + const auto expected_ff0 {int128(0, 0xFF0)}; BOOST_TEST_EQ(val >> shift_4, expected_ff0); - // Test >>= with int128_t rhs + // Test >>= with int128 rhs auto val2 {val}; val2 >>= shift_4; BOOST_TEST_EQ(val2, expected_ff0); // Cross-word shift - const auto big_val {int128_t(0x1234, 0)}; - const auto shift_64 {int128_t(0, 64)}; - const auto expected_1234 {int128_t(0, 0x1234)}; + const auto big_val {int128(0x1234, 0)}; + const auto shift_64 {int128(0, 64)}; + const auto expected_1234 {int128(0, 0x1234)}; BOOST_TEST_EQ(big_val >> shift_64, expected_1234); // Arithmetic right shift preserves sign for negative values - constexpr auto min_val {std::numeric_limits::min()}; - const auto shift_1 {int128_t(0, 1)}; + constexpr auto min_val {std::numeric_limits::min()}; + const auto shift_1 {int128(0, 1)}; BOOST_TEST_EQ(min_val >> shift_1, min_val >> 1); BOOST_TEST((min_val >> shift_1) < 0); } -// Bug 2: UnsignedInteger / int128_t returned {rhs.high, res} instead of proper sign handling +// Bug 2: UnsignedInteger / int128 returned {rhs.high, res} instead of proper sign handling void test_unsigned_div_negative_int128() { const std::uint64_t lhs {10}; - const auto neg3 {-int128_t(0, 3)}; - const auto pos3 {int128_t(0, 3)}; - const auto expected_neg3 {-int128_t(0, 3)}; - const auto expected_pos3 {int128_t(0, 3)}; + const auto neg3 {-int128(0, 3)}; + const auto pos3 {int128(0, 3)}; + const auto expected_neg3 {-int128(0, 3)}; + const auto expected_pos3 {int128(0, 3)}; // 10 / -3 = -3 BOOST_TEST_EQ(lhs / neg3, expected_neg3); @@ -78,19 +78,19 @@ void test_unsigned_div_negative_int128() // 7 / -1 = -7 const std::uint64_t seven {7}; - const auto neg1 {-int128_t(0, 1)}; - const auto expected_neg7 {-int128_t(0, 7)}; + const auto neg1 {-int128(0, 1)}; + const auto expected_neg7 {-int128(0, 7)}; BOOST_TEST_EQ(seven / neg1, expected_neg7); } -// Bug 3: UnsignedInteger % int128_t used rhs.low instead of abs_rhs.low +// Bug 3: UnsignedInteger % int128 used rhs.low instead of abs_rhs.low // and applied wrong sign to remainder void test_unsigned_mod_negative_int128() { const std::uint64_t lhs {10}; - const auto neg3 {-int128_t(0, 3)}; - const auto pos3 {int128_t(0, 3)}; - const auto expected_1 {int128_t(0, 1)}; + const auto neg3 {-int128(0, 3)}; + const auto pos3 {int128(0, 3)}; + const auto expected_1 {int128(0, 1)}; // 10 % -3 = 1 (remainder has sign of dividend, which is unsigned/positive) BOOST_TEST_EQ(lhs % neg3, expected_1); @@ -100,29 +100,29 @@ void test_unsigned_mod_negative_int128() // 12 % -5 = 2 const std::uint64_t twelve {12}; - const auto neg5 {-int128_t(0, 5)}; - const auto expected_2 {int128_t(0, 2)}; + const auto neg5 {-int128(0, 5)}; + const auto expected_2 {int128(0, 2)}; BOOST_TEST_EQ(twelve % neg5, expected_2); } -// Bug 4: operator%(int128_t, int128_t) early return was wrong when lhs = INT128_MIN +// Bug 4: operator%(int128, int128) early return was wrong when lhs = INT128_MIN // because abs(INT128_MIN) overflows back to INT128_MIN void test_min_val_modulo() { - constexpr auto min_val {std::numeric_limits::min()}; - const auto zero {int128_t(0, 0)}; + constexpr auto min_val {std::numeric_limits::min()}; + const auto zero {int128(0, 0)}; // INT128_MIN % 1 = 0 - const auto one {int128_t(0, 1)}; + const auto one {int128(0, 1)}; BOOST_TEST_EQ(min_val % one, zero); // INT128_MIN % 2 = 0 (2^127 is even) - const auto two {int128_t(0, 2)}; + const auto two {int128(0, 2)}; BOOST_TEST_EQ(min_val % two, zero); // INT128_MIN % 3 = -2 // -170141183460469231731687303715884105728 = -56713727820156410577229101238628035242 * 3 + (-2) - const auto three {int128_t(0, 3)}; + const auto three {int128(0, 3)}; const auto expected_neg2 {BOOST_INT128_INT128_C(-2)}; BOOST_TEST_EQ(min_val % three, expected_neg2); @@ -134,11 +134,11 @@ int main() { test_div_by_one(); test_div_by_one(); - test_div_by_one(); + test_div_by_one(); test_other_vals(); test_other_vals(); - test_other_vals(); + test_other_vals(); test_right_shift_int128_amount(); test_unsigned_div_negative_int128(); diff --git a/test/github_issue_432.cpp b/test/github_issue_432.cpp index 0dfd6ebb..0e870708 100644 --- a/test/github_issue_432.cpp +++ b/test/github_issue_432.cpp @@ -10,13 +10,13 @@ // double round 2^64 - 1 up to 2^64, which hid the error, but any type with 64 or // more significand bits (x87 80-bit and IEEE quad long double) holds 2^64 - 1 // exactly, so every conversion with a non-zero high word was off by the value of -// the high word. For example uint128_t{1, 0} (2^64) converted to 2^64 - 1. +// the high word. For example uint128{1, 0} (2^64) converted to 2^64 - 1. // -// 2) int128_t fed its raw two's complement words into high * scale + low. That +// 2) int128 fed its raw two's complement words into high * scale + low. That // identity is exact in integer arithmetic but not in floating point: a small // negative value stores low close to 2^64, which rounds to exactly 2^64 whenever // the type has fewer than 64 significand bits, and adding the scaled high word -// then cancels catastrophically. int128_t{-1} converted to 0.0 instead of -1.0. +// then cancels catastrophically. int128{-1} converted to 0.0 instead of -1.0. // // The operators now use the builtin 128-bit conversion where one exists, and the // portable fallback scales by an exact 2^64 and converts negative values through @@ -39,8 +39,8 @@ #include #include -using boost::int128::int128_t; -using boost::int128::uint128_t; +using boost::int128::int128; +using boost::int128::uint128; // Exactly representable values must convert exactly, so a defect either produces // the exact expected value or it is a bug. No tolerances are used anywhere here. @@ -51,7 +51,7 @@ void test_small_negative_values() { for (int v {-1}; v >= -1024; --v) { - const int128_t value {v}; + const int128 value {v}; BOOST_TEST_EQ(static_cast(value), static_cast(v)); // The portable fallback must also be correct on platforms @@ -66,16 +66,16 @@ void test_signed_powers_of_two() { for (int k {0}; k < 127; ++k) { - const int128_t value {-(int128_t{1} << k)}; + const int128 value {-(int128{1} << k)}; const T expected {-std::ldexp(static_cast(1), k)}; BOOST_TEST_EQ(static_cast(value), expected); BOOST_TEST_EQ(boost::int128::detail::signed_words_to_float(value.signed_high(), value.low), expected); } - // INT128_MIN itself: the magnitude 2^127 does not fit in int128_t, + // INT128_MIN itself: the magnitude 2^127 does not fit in int128, // so this exercises the negation edge case in the fallback - const auto min_value {(std::numeric_limits::min)()}; + const auto min_value {(std::numeric_limits::min)()}; const T expected_min {-std::ldexp(static_cast(1), 127)}; BOOST_TEST_EQ(static_cast(min_value), expected_min); @@ -101,18 +101,18 @@ void test_offset_exactness() for (std::uint64_t k {1}; k <= 64; ++k) { - BOOST_TEST_EQ(static_cast(uint128_t{k, 0}), static_cast(k) * two_64); + BOOST_TEST_EQ(static_cast(uint128{k, 0}), static_cast(k) * two_64); BOOST_TEST_EQ(boost::int128::detail::unsigned_words_to_float(k, 0), static_cast(k) * two_64); - const int128_t negative {-int128_t{static_cast(k), 0}}; + const int128 negative {-int128{static_cast(k), 0}}; BOOST_TEST_EQ(static_cast(negative), -(static_cast(k) * two_64)); } - BOOST_TEST_EQ(static_cast(uint128_t{UINT64_C(1) << 63, 0}), std::ldexp(static_cast(1), 127)); + BOOST_TEST_EQ(static_cast(uint128{UINT64_C(1) << 63, 0}), std::ldexp(static_cast(1), 127)); // -(2^64 - 1): exact wherever the significand holds 64 bits, and the computed // expected value rounds identically to the conversion everywhere else - const int128_t value {-1, 1}; + const int128 value {-1, 1}; BOOST_TEST_EQ(static_cast(value), -(two_64 - static_cast(1))); } @@ -147,10 +147,10 @@ void test_vs_builtin() const auto hi {rng()}; const auto lo {rng()}; - const uint128_t u {hi, lo}; + const uint128 u {hi, lo}; const auto builtin_u {(static_cast(hi) << 64) | static_cast(lo)}; - const int128_t s {static_cast(hi), lo}; + const int128 s {static_cast(hi), lo}; const auto builtin_s {static_cast(builtin_u)}; // The operators use the builtin conversion on this platform, so these are exact @@ -176,23 +176,23 @@ void test_vs_builtin() #endif // BOOST_INT128_HAS_INT128 // Both conversion paths are constexpr, so the regressions are also pinned at compile time -static_assert(static_cast(int128_t{-1}) == -1.0f, "int128_t{-1} must convert to -1.0f"); -static_assert(static_cast(int128_t{-1}) == -1.0, "int128_t{-1} must convert to -1.0"); -static_assert(static_cast(int128_t{-1024}) == -1024.0, "small negatives must not cancel to 0"); -static_assert(static_cast(uint128_t{1, 0}) == 18446744073709551616.0, "uint128_t 2^64 must convert to 2^64"); +static_assert(static_cast(int128{-1}) == -1.0f, "int128{-1} must convert to -1.0f"); +static_assert(static_cast(int128{-1}) == -1.0, "int128{-1} must convert to -1.0"); +static_assert(static_cast(int128{-1024}) == -1024.0, "small negatives must not cancel to 0"); +static_assert(static_cast(uint128{1, 0}) == 18446744073709551616.0, "uint128 2^64 must convert to 2^64"); static_assert(boost::int128::detail::signed_words_to_float(-1, UINT64_MAX) == -1.0, - "fallback conversion of int128_t{-1} must yield -1.0"); + "fallback conversion of int128{-1} must yield -1.0"); static_assert(boost::int128::detail::unsigned_words_to_float(1, 0) == 18446744073709551616.0, "fallback conversion of 2^64 must yield 2^64"); #if !defined(BOOST_INT128_HAS_GPU_SUPPORT) -static_assert(static_cast(int128_t{-1}) == -1.0L, "int128_t{-1} must convert to -1.0L"); -static_assert(static_cast(uint128_t{1, 0}) == 18446744073709551616.0L, - "uint128_t 2^64 must convert to 2^64 exactly, not 2^64 - 1"); -static_assert(static_cast(int128_t{-1, 1}) == -(18446744073709551616.0L - 1.0L), - "int128_t -(2^64 - 1) must match the correctly rounded value"); +static_assert(static_cast(int128{-1}) == -1.0L, "int128{-1} must convert to -1.0L"); +static_assert(static_cast(uint128{1, 0}) == 18446744073709551616.0L, + "uint128 2^64 must convert to 2^64 exactly, not 2^64 - 1"); +static_assert(static_cast(int128{-1, 1}) == -(18446744073709551616.0L - 1.0L), + "int128 -(2^64 - 1) must match the correctly rounded value"); #endif diff --git a/test/limits_link_1.cpp b/test/limits_link_1.cpp index e55da2ed..44e8c3d8 100644 --- a/test/limits_link_1.cpp +++ b/test/limits_link_1.cpp @@ -16,6 +16,6 @@ template void test() void f1() { - test(); - test(); + test(); + test(); } diff --git a/test/limits_link_2.cpp b/test/limits_link_2.cpp index 03cfca27..2b54a6c6 100644 --- a/test/limits_link_2.cpp +++ b/test/limits_link_2.cpp @@ -16,6 +16,6 @@ template void test() // LCOV_EXCL_LINE void f2() { - test(); - test(); + test(); + test(); } diff --git a/test/sycl_test.hpp b/test/sycl_test.hpp index bbf02c78..b2157108 100644 --- a/test/sycl_test.hpp +++ b/test/sycl_test.hpp @@ -6,8 +6,8 @@ // element-wise on the SYCL device over random inputs and verifies that the // device results match a host recomputation of the same operation. -#ifndef BOOST_INT128_TEST_SYCL_TEST_HPP -#define BOOST_INT128_TEST_SYCL_TEST_HPP +#ifndef BOOST_int128EST_SYCL_TEST_HPP +#define BOOST_int128EST_SYCL_TEST_HPP #include #include @@ -319,4 +319,4 @@ int run_from_chars(const int base) } // namespace int128_sycl_test -#endif // BOOST_INT128_TEST_SYCL_TEST_HPP +#endif // BOOST_int128EST_SYCL_TEST_HPP diff --git a/test/test_bit.cpp b/test/test_bit.cpp index 8085c628..0486eb11 100644 --- a/test/test_bit.cpp +++ b/test/test_bit.cpp @@ -18,7 +18,7 @@ import boost.int128; void test_has_single_bit() { - boost::int128::uint128_t x {0}; + boost::int128::uint128 x {0}; BOOST_TEST(!boost::int128::has_single_bit(x)); ++x; @@ -40,7 +40,7 @@ void test_countl_zero() { BOOST_TEST_EQ(boost::int128::countl_zero(0), 128); - boost::int128::uint128_t x {1}; + boost::int128::uint128 x {1}; for (unsigned i {1}; i < 128U; ++i) { @@ -51,9 +51,9 @@ void test_countl_zero() void test_bit_width() { - BOOST_TEST_EQ(boost::int128::bit_width(boost::int128::uint128_t{0}), 0); + BOOST_TEST_EQ(boost::int128::bit_width(boost::int128::uint128{0}), 0); - boost::int128::uint128_t x {1}; + boost::int128::uint128 x {1}; for (unsigned i {1}; i < 128U; ++i) { @@ -75,8 +75,8 @@ void test_bit_ceil() BOOST_TEST_EQ(boost::int128::bit_ceil(1), 1U); BOOST_TEST_EQ(boost::int128::bit_ceil(2), 2U); - boost::int128::uint128_t x {3}; - boost::int128::uint128_t y {4}; + boost::int128::uint128 x {3}; + boost::int128::uint128 y {4}; for (unsigned i {4}; i < 128U; ++i) { BOOST_TEST_EQ(boost::int128::bit_ceil(x), y); @@ -90,8 +90,8 @@ void test_bit_floor() { BOOST_TEST_EQ(boost::int128::bit_floor(0), 0U); - boost::int128::uint128_t x {3}; - boost::int128::uint128_t y {2}; + boost::int128::uint128 x {3}; + boost::int128::uint128 y {2}; for (unsigned i {2}; i < 127U; ++i) { @@ -105,7 +105,7 @@ void test_bit_floor() void test_countl_one() { BOOST_TEST_EQ(boost::int128::countl_one(0), 0); - boost::int128::uint128_t x {UINT64_MAX, UINT64_MAX}; + boost::int128::uint128 x {UINT64_MAX, UINT64_MAX}; for (int i {128}; i >= 0; --i) { @@ -118,7 +118,7 @@ void test_countr_zero() { BOOST_TEST_EQ(boost::int128::countr_zero(0), 128); - boost::int128::uint128_t x {0x8000000000000000ULL, 0}; + boost::int128::uint128 x {0x8000000000000000ULL, 0}; for (int i {127}; i >= 0; --i) { @@ -131,7 +131,7 @@ void test_countr_one() { BOOST_TEST_EQ(boost::int128::countr_one(0), 0); - boost::int128::uint128_t x {UINT64_MAX, UINT64_MAX}; + boost::int128::uint128 x {UINT64_MAX, UINT64_MAX}; for (int i {128}; i >= 0; --i) { @@ -142,8 +142,8 @@ void test_countr_one() void test_rotl() { - constexpr boost::int128::uint128_t x {1}; - boost::int128::uint128_t y {1}; + constexpr boost::int128::uint128 x {1}; + boost::int128::uint128 y {1}; for (int i {0}; i < 128; ++i) { @@ -154,8 +154,8 @@ void test_rotl() void test_rotr() { - constexpr boost::int128::uint128_t x {0x8000000000000000ULL, 0}; - boost::int128::uint128_t y {0x8000000000000000ULL, 0}; + constexpr boost::int128::uint128 x {0x8000000000000000ULL, 0}; + boost::int128::uint128 y {0x8000000000000000ULL, 0}; for (int i {0}; i < 128; ++i) { @@ -167,7 +167,7 @@ void test_rotr() void test_popcount() { BOOST_TEST_EQ(boost::int128::popcount(0), 0); - boost::int128::uint128_t x {0, 2}; + boost::int128::uint128 x {0, 2}; for (int i {1}; i < 128; ++i) { @@ -179,7 +179,7 @@ void test_popcount() x <<= 1; } - constexpr boost::int128::uint128_t y {1}; + constexpr boost::int128::uint128 y {1}; static_assert(boost::int128::popcount(y) == 1, "Wrong popcount"); } @@ -188,13 +188,13 @@ void test_byteswap() // Test 1: Basic test with specific byte values { // Create a value with distinct byte pattern - boost::int128::uint128_t original{ + boost::int128::uint128 original{ 0x0123456789ABCDEFULL, 0xFEDCBA9876543210ULL }; // Expected result after byteswap - boost::int128::uint128_t expected{ + boost::int128::uint128 expected{ 0x1032547698BADCFEULL, 0xEFCDAB8967452301ULL }; @@ -205,7 +205,7 @@ void test_byteswap() // Test 2: Verify double byteswap returns original { - boost::int128::uint128_t values[] = { + boost::int128::uint128 values[] = { {0, 0}, // All zeros {~0ULL, ~0ULL}, // All ones {0x0123456789ABCDEFULL, 0xFEDCBA9876543210ULL}, // Mixed pattern @@ -222,12 +222,12 @@ void test_byteswap() for (int i = 0; i < 16; ++i) { // Set a single byte to 0xFF - boost::int128::uint128_t input{0, 0}; + boost::int128::uint128 input{0, 0}; auto bytes = reinterpret_cast(&input); bytes[i] = 0xFF; // After byteswap, the 0xFF should be at position (15-i) - boost::int128::uint128_t result = boost::int128::byteswap(input); + boost::int128::uint128 result = boost::int128::byteswap(input); auto result_bytes = reinterpret_cast(&result); for (int j = 0; j < 16; ++j) @@ -246,13 +246,13 @@ void test_byteswap() // Test 4: Check the backup impls { // Create a value with distinct byte pattern - constexpr boost::int128::uint128_t original{ + constexpr boost::int128::uint128 original{ 0x0123456789ABCDEFULL, 0xFEDCBA9876543210ULL }; // Expected result after byteswap - constexpr boost::int128::uint128_t expected{ + constexpr boost::int128::uint128 expected{ 0x1032547698BADCFEULL, 0xEFCDAB8967452301ULL }; diff --git a/test/test_bit_ceil.cu b/test/test_bit_ceil.cu index ea0a1d25..c6565d3e 100644 --- a/test/test_bit_ceil.cu +++ b/test/test_bit_ceil.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, test_type *out, int numElements) { diff --git a/test/test_bit_ceil_sycl.cpp b/test/test_bit_ceil_sycl.cpp index 3ce20af6..4d1e1a55 100644 --- a/test/test_bit_ceil_sycl.cpp +++ b/test/test_bit_ceil_sycl.cpp @@ -4,11 +4,11 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { // Shift right by one so bit_ceil never has to round past 2^127. - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return boost::int128::bit_ceil(a >> 1); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return boost::int128::bit_ceil(a >> 1); }); } diff --git a/test/test_bit_floor.cu b/test/test_bit_floor.cu index 1031b471..298bbe9a 100644 --- a/test/test_bit_floor.cu +++ b/test/test_bit_floor.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, test_type *out, int numElements) { diff --git a/test/test_bit_floor_sycl.cpp b/test/test_bit_floor_sycl.cpp index 44cc6046..23747bcf 100644 --- a/test/test_bit_floor_sycl.cpp +++ b/test/test_bit_floor_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return boost::int128::bit_floor(a); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return boost::int128::bit_floor(a); }); } diff --git a/test/test_bit_width.cu b/test/test_bit_width.cu index 46917d89..96d83f36 100644 --- a/test/test_bit_width.cu +++ b/test/test_bit_width.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, int *out, int numElements) { diff --git a/test/test_bit_width_sycl.cpp b/test/test_bit_width_sycl.cpp index 51f864fb..b7733acd 100644 --- a/test/test_bit_width_sycl.cpp +++ b/test/test_bit_width_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return boost::int128::bit_width(a); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return boost::int128::bit_width(a); }); } diff --git a/test/test_boundaries.cpp b/test/test_boundaries.cpp index 490948a9..403b7663 100644 --- a/test/test_boundaries.cpp +++ b/test/test_boundaries.cpp @@ -7,7 +7,7 @@ #include #include -using boost::int128::int128_t; +using boost::int128::int128; namespace { @@ -24,9 +24,9 @@ std::uint64_t opaque(std::uint64_t v) return s; } -int128_t opaque(int128_t v) +int128 opaque(int128 v) { - return int128_t{opaque(v.signed_high()), opaque(v.low)}; + return int128{opaque(v.signed_high()), opaque(v.low)}; } } // namespace @@ -35,26 +35,26 @@ int main() { const auto int_max {opaque(BOOST_INT128_INT128_MAX)}; const auto int_min {opaque(BOOST_INT128_INT128_MIN)}; - const int128_t one {opaque(int128_t{0, 1})}; + const int128 one {opaque(int128{0, 1})}; // Negating a signed scalar of INT64_MIN must not overflow the scalar type. - // The scalar-operand result must equal promoting the scalar to int128_t first. + // The scalar-operand result must equal promoting the scalar to int128 first. const std::int64_t m {opaque((std::numeric_limits::min)())}; - const int128_t m128 {m}; - const int128_t a {opaque(int128_t{42, 1234})}; - const int128_t b {opaque(int128_t{0, 5})}; + const int128 m128 {m}; + const int128 a {opaque(int128{42, 1234})}; + const int128 b {opaque(int128{0, 5})}; - BOOST_TEST_EQ(a + m, a + m128); // operator+(int128_t, Signed) was int128_imp.hpp:1889 - BOOST_TEST_EQ(m + a, m128 + a); // operator+(Signed, int128_t) was int128_imp.hpp:1895 - BOOST_TEST_EQ(a / m, a / m128); // operator/(int128_t, Signed) was int128_imp.hpp:2295 - BOOST_TEST_EQ(m / b, m128 / b); // operator/(Signed, int128_t) was int128_imp.hpp:2324 + BOOST_TEST_EQ(a + m, a + m128); // operator+(int128, Signed) was int128_imp.hpp:1889 + BOOST_TEST_EQ(m + a, m128 + a); // operator+(Signed, int128) was int128_imp.hpp:1895 + BOOST_TEST_EQ(a / m, a / m128); // operator/(int128, Signed) was int128_imp.hpp:2295 + BOOST_TEST_EQ(m / b, m128 / b); // operator/(Signed, int128) was int128_imp.hpp:2324 // A 128-bit divisor of exactly -2^64 has abs().low == 0; the quotient of any // 64-bit numerator by it is 0 and must not divide by zero. - const int128_t neg_two_pow_64 {opaque(int128_t{-1, 0})}; - BOOST_TEST_EQ(opaque(std::int64_t{5}) / neg_two_pow_64, (int128_t{0, 0})); // operator/(Signed, int128_t) - BOOST_TEST_EQ(opaque(std::int64_t{-5}) / neg_two_pow_64, (int128_t{0, 0})); - BOOST_TEST_EQ(opaque(std::uint64_t{5}) / neg_two_pow_64, (int128_t{0, 0})); // operator/(Unsigned, int128_t) + const int128 neg_two_pow_64 {opaque(int128{-1, 0})}; + BOOST_TEST_EQ(opaque(std::int64_t{5}) / neg_two_pow_64, (int128{0, 0})); // operator/(Signed, int128) + BOOST_TEST_EQ(opaque(std::int64_t{-5}) / neg_two_pow_64, (int128{0, 0})); + BOOST_TEST_EQ(opaque(std::uint64_t{5}) / neg_two_pow_64, (int128{0, 0})); // operator/(Unsigned, int128) // Two's-complement rollover at the range boundaries: no UB, wraps like __int128. BOOST_TEST_EQ(int_max + one, int_min); // MAX + 1 -> MIN @@ -63,7 +63,7 @@ int main() BOOST_TEST_EQ(int_min - opaque(std::int64_t{1}), int_max); // MIN - 1 (scalar) -> MAX BOOST_TEST_EQ(-int_min, int_min); // -MIN wraps to itself BOOST_TEST_EQ(int_min * opaque(std::int64_t{-1}), int_min); // MIN * -1 overflows to MIN - BOOST_TEST_EQ(int_max * opaque(std::int64_t{2}), (-int128_t{0, 2})); // MAX * 2 overflows to -2 + BOOST_TEST_EQ(int_max * opaque(std::int64_t{2}), (-int128{0, 2})); // MAX * 2 overflows to -2 return boost::report_errors(); } diff --git a/test/test_builtin_parity.cpp b/test/test_builtin_parity.cpp index 3f3b25df..5133ae33 100644 --- a/test/test_builtin_parity.cpp +++ b/test/test_builtin_parity.cpp @@ -2,7 +2,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt // -// Verifies that boost::int128::int128_t and boost::int128::uint128_t produce +// Verifies that boost::int128::int128 and boost::int128::uint128 produce // results identical to the built-in __int128 / unsigned __int128 types under // the C++ usual arithmetic conversions, for every operator x type-pair. @@ -21,8 +21,8 @@ # pragma GCC diagnostic ignored "-Wconversion" #endif -using boost::int128::int128_t; -using boost::int128::uint128_t; +using boost::int128::int128; +using boost::int128::uint128; using boost::int128::detail::builtin_i128; using boost::int128::detail::builtin_u128; @@ -48,7 +48,7 @@ builtin_i128 random_value() } // ========================================================================= -// uint128_t vs small signed/unsigned built-in integers +// uint128 vs small signed/unsigned built-in integers // ========================================================================= template @@ -58,7 +58,7 @@ void test_uint128_vs_signed_small() { const auto raw_lhs {random_value()}; const auto raw_rhs {random_value()}; - const uint128_t lib_lhs {raw_lhs}; + const uint128 lib_lhs {raw_lhs}; const SignedT s_rhs {raw_rhs}; // Builtin path: usual arithmetic conversion converts SignedT to unsigned __int128 @@ -81,32 +81,32 @@ void test_uint128_vs_signed_small() BOOST_TEST_EQ(s_rhs >= lib_lhs, oracle_rhs >= oracle_lhs); // Arithmetic - BOOST_TEST_EQ(lib_lhs + s_rhs, uint128_t{oracle_lhs + oracle_rhs}); - BOOST_TEST_EQ(lib_lhs - s_rhs, uint128_t{oracle_lhs - oracle_rhs}); - BOOST_TEST_EQ(lib_lhs * s_rhs, uint128_t{oracle_lhs * oracle_rhs}); + BOOST_TEST_EQ(lib_lhs + s_rhs, uint128{oracle_lhs + oracle_rhs}); + BOOST_TEST_EQ(lib_lhs - s_rhs, uint128{oracle_lhs - oracle_rhs}); + BOOST_TEST_EQ(lib_lhs * s_rhs, uint128{oracle_lhs * oracle_rhs}); if (s_rhs != 0) { - BOOST_TEST_EQ(lib_lhs / s_rhs, uint128_t{oracle_lhs / oracle_rhs}); - BOOST_TEST_EQ(lib_lhs % s_rhs, uint128_t{oracle_lhs % oracle_rhs}); + BOOST_TEST_EQ(lib_lhs / s_rhs, uint128{oracle_lhs / oracle_rhs}); + BOOST_TEST_EQ(lib_lhs % s_rhs, uint128{oracle_lhs % oracle_rhs}); } if (raw_lhs != 0) { - BOOST_TEST_EQ(s_rhs + lib_lhs, uint128_t{oracle_rhs + oracle_lhs}); - BOOST_TEST_EQ(s_rhs - lib_lhs, uint128_t{oracle_rhs - oracle_lhs}); - BOOST_TEST_EQ(s_rhs * lib_lhs, uint128_t{oracle_rhs * oracle_lhs}); - BOOST_TEST_EQ(s_rhs / lib_lhs, uint128_t{oracle_rhs / oracle_lhs}); - BOOST_TEST_EQ(s_rhs % lib_lhs, uint128_t{oracle_rhs % oracle_lhs}); + BOOST_TEST_EQ(s_rhs + lib_lhs, uint128{oracle_rhs + oracle_lhs}); + BOOST_TEST_EQ(s_rhs - lib_lhs, uint128{oracle_rhs - oracle_lhs}); + BOOST_TEST_EQ(s_rhs * lib_lhs, uint128{oracle_rhs * oracle_lhs}); + BOOST_TEST_EQ(s_rhs / lib_lhs, uint128{oracle_rhs / oracle_lhs}); + BOOST_TEST_EQ(s_rhs % lib_lhs, uint128{oracle_rhs % oracle_lhs}); } // Bitwise - BOOST_TEST_EQ(lib_lhs | s_rhs, uint128_t{oracle_lhs | oracle_rhs}); - BOOST_TEST_EQ(lib_lhs & s_rhs, uint128_t{oracle_lhs & oracle_rhs}); - BOOST_TEST_EQ(lib_lhs ^ s_rhs, uint128_t{oracle_lhs ^ oracle_rhs}); + BOOST_TEST_EQ(lib_lhs | s_rhs, uint128{oracle_lhs | oracle_rhs}); + BOOST_TEST_EQ(lib_lhs & s_rhs, uint128{oracle_lhs & oracle_rhs}); + BOOST_TEST_EQ(lib_lhs ^ s_rhs, uint128{oracle_lhs ^ oracle_rhs}); } } // ========================================================================= -// int128_t vs small signed/unsigned built-in integers +// int128 vs small signed/unsigned built-in integers // ========================================================================= template @@ -116,10 +116,10 @@ void test_int128_vs_unsigned_small() { const auto raw_lhs {random_value()}; const auto raw_rhs {random_value()}; - const int128_t lib_lhs {raw_lhs}; + const int128 lib_lhs {raw_lhs}; const UnsignedT u_rhs {raw_rhs}; - // Builtin path: int128_t has higher rank and can represent UnsignedT, + // Builtin path: int128 has higher rank and can represent UnsignedT, // so both promote to __int128 (signed) and the result type is signed. // Comparisons use the signed oracle directly. Arithmetic and bitwise // are performed in the unsigned domain (well-defined wrap-around) and @@ -144,31 +144,31 @@ void test_int128_vs_unsigned_small() BOOST_TEST_EQ(u_rhs > lib_lhs, oracle_rhs > oracle_lhs); BOOST_TEST_EQ(u_rhs >= lib_lhs, oracle_rhs >= oracle_lhs); - BOOST_TEST_EQ(lib_lhs + u_rhs, int128_t{static_cast(oracle_lhs_u + oracle_rhs_u)}); - BOOST_TEST_EQ(lib_lhs - u_rhs, int128_t{static_cast(oracle_lhs_u - oracle_rhs_u)}); - BOOST_TEST_EQ(lib_lhs * u_rhs, int128_t{static_cast(oracle_lhs_u * oracle_rhs_u)}); + BOOST_TEST_EQ(lib_lhs + u_rhs, int128{static_cast(oracle_lhs_u + oracle_rhs_u)}); + BOOST_TEST_EQ(lib_lhs - u_rhs, int128{static_cast(oracle_lhs_u - oracle_rhs_u)}); + BOOST_TEST_EQ(lib_lhs * u_rhs, int128{static_cast(oracle_lhs_u * oracle_rhs_u)}); if (u_rhs != 0) { - BOOST_TEST_EQ(lib_lhs / u_rhs, int128_t{oracle_lhs / oracle_rhs}); - BOOST_TEST_EQ(lib_lhs % u_rhs, int128_t{oracle_lhs % oracle_rhs}); + BOOST_TEST_EQ(lib_lhs / u_rhs, int128{oracle_lhs / oracle_rhs}); + BOOST_TEST_EQ(lib_lhs % u_rhs, int128{oracle_lhs % oracle_rhs}); } if (raw_lhs != 0) { - BOOST_TEST_EQ(u_rhs + lib_lhs, int128_t{static_cast(oracle_rhs_u + oracle_lhs_u)}); - BOOST_TEST_EQ(u_rhs - lib_lhs, int128_t{static_cast(oracle_rhs_u - oracle_lhs_u)}); - BOOST_TEST_EQ(u_rhs * lib_lhs, int128_t{static_cast(oracle_rhs_u * oracle_lhs_u)}); - BOOST_TEST_EQ(u_rhs / lib_lhs, int128_t{oracle_rhs / oracle_lhs}); - BOOST_TEST_EQ(u_rhs % lib_lhs, int128_t{oracle_rhs % oracle_lhs}); + BOOST_TEST_EQ(u_rhs + lib_lhs, int128{static_cast(oracle_rhs_u + oracle_lhs_u)}); + BOOST_TEST_EQ(u_rhs - lib_lhs, int128{static_cast(oracle_rhs_u - oracle_lhs_u)}); + BOOST_TEST_EQ(u_rhs * lib_lhs, int128{static_cast(oracle_rhs_u * oracle_lhs_u)}); + BOOST_TEST_EQ(u_rhs / lib_lhs, int128{oracle_rhs / oracle_lhs}); + BOOST_TEST_EQ(u_rhs % lib_lhs, int128{oracle_rhs % oracle_lhs}); } - BOOST_TEST_EQ(lib_lhs | u_rhs, int128_t{static_cast(oracle_lhs_u | oracle_rhs_u)}); - BOOST_TEST_EQ(lib_lhs & u_rhs, int128_t{static_cast(oracle_lhs_u & oracle_rhs_u)}); - BOOST_TEST_EQ(lib_lhs ^ u_rhs, int128_t{static_cast(oracle_lhs_u ^ oracle_rhs_u)}); + BOOST_TEST_EQ(lib_lhs | u_rhs, int128{static_cast(oracle_lhs_u | oracle_rhs_u)}); + BOOST_TEST_EQ(lib_lhs & u_rhs, int128{static_cast(oracle_lhs_u & oracle_rhs_u)}); + BOOST_TEST_EQ(lib_lhs ^ u_rhs, int128{static_cast(oracle_lhs_u ^ oracle_rhs_u)}); } } // ========================================================================= -// uint128_t vs int128_t (cross-type) +// uint128 vs int128 (cross-type) // ========================================================================= void test_cross_type() @@ -177,8 +177,8 @@ void test_cross_type() { const auto raw_u {random_value()}; const auto raw_i {random_value()}; - const uint128_t lib_u {raw_u}; - const int128_t lib_i {raw_i}; + const uint128 lib_u {raw_u}; + const int128 lib_i {raw_i}; // Both promote to unsigned __int128 (same rank, signed -> unsigned) const builtin_u128 oracle_u {raw_u}; @@ -198,44 +198,44 @@ void test_cross_type() BOOST_TEST_EQ(lib_i > lib_u, oracle_i > oracle_u); BOOST_TEST_EQ(lib_i >= lib_u, oracle_i >= oracle_u); - BOOST_TEST_EQ(lib_u + lib_i, uint128_t{oracle_u + oracle_i}); - BOOST_TEST_EQ(lib_u - lib_i, uint128_t{oracle_u - oracle_i}); - BOOST_TEST_EQ(lib_u * lib_i, uint128_t{oracle_u * oracle_i}); + BOOST_TEST_EQ(lib_u + lib_i, uint128{oracle_u + oracle_i}); + BOOST_TEST_EQ(lib_u - lib_i, uint128{oracle_u - oracle_i}); + BOOST_TEST_EQ(lib_u * lib_i, uint128{oracle_u * oracle_i}); if (oracle_i != 0) { - BOOST_TEST_EQ(lib_u / lib_i, uint128_t{oracle_u / oracle_i}); - BOOST_TEST_EQ(lib_u % lib_i, uint128_t{oracle_u % oracle_i}); + BOOST_TEST_EQ(lib_u / lib_i, uint128{oracle_u / oracle_i}); + BOOST_TEST_EQ(lib_u % lib_i, uint128{oracle_u % oracle_i}); } if (oracle_u != 0) { - BOOST_TEST_EQ(lib_i / lib_u, uint128_t{oracle_i / oracle_u}); - BOOST_TEST_EQ(lib_i % lib_u, uint128_t{oracle_i % oracle_u}); + BOOST_TEST_EQ(lib_i / lib_u, uint128{oracle_i / oracle_u}); + BOOST_TEST_EQ(lib_i % lib_u, uint128{oracle_i % oracle_u}); } - // Bitwise: same-rank, signed -> unsigned, result uint128_t - BOOST_TEST_EQ(lib_u | lib_i, uint128_t{oracle_u | oracle_i}); - BOOST_TEST_EQ(lib_u & lib_i, uint128_t{oracle_u & oracle_i}); - BOOST_TEST_EQ(lib_u ^ lib_i, uint128_t{oracle_u ^ oracle_i}); - BOOST_TEST_EQ(lib_i | lib_u, uint128_t{oracle_i | oracle_u}); - BOOST_TEST_EQ(lib_i & lib_u, uint128_t{oracle_i & oracle_u}); - BOOST_TEST_EQ(lib_i ^ lib_u, uint128_t{oracle_i ^ oracle_u}); + // Bitwise: same-rank, signed -> unsigned, result uint128 + BOOST_TEST_EQ(lib_u | lib_i, uint128{oracle_u | oracle_i}); + BOOST_TEST_EQ(lib_u & lib_i, uint128{oracle_u & oracle_i}); + BOOST_TEST_EQ(lib_u ^ lib_i, uint128{oracle_u ^ oracle_i}); + BOOST_TEST_EQ(lib_i | lib_u, uint128{oracle_i | oracle_u}); + BOOST_TEST_EQ(lib_i & lib_u, uint128{oracle_i & oracle_u}); + BOOST_TEST_EQ(lib_i ^ lib_u, uint128{oracle_i ^ oracle_u}); // Shifts: result type follows LHS. Compute the int128 left-shift via // the unsigned domain (well-defined wrap-around) and reinterpret as // signed to avoid UB when `raw_i` is negative or the result overflows. const std::uint64_t shift_amount {static_cast(rng()) % 128}; - const uint128_t lib_u_shift {shift_amount}; - const int128_t lib_i_shift {static_cast(shift_amount)}; + const uint128 lib_u_shift {shift_amount}; + const int128 lib_i_shift {static_cast(shift_amount)}; const builtin_u128 raw_i_u = static_cast(raw_i); - BOOST_TEST_EQ(lib_i << lib_u_shift, int128_t{static_cast(raw_i_u << shift_amount)}); - BOOST_TEST_EQ(lib_u << lib_i_shift, uint128_t{raw_u << shift_amount}); - BOOST_TEST_EQ(lib_i >> lib_u_shift, int128_t{raw_i >> shift_amount}); - BOOST_TEST_EQ(lib_u >> lib_i_shift, uint128_t{raw_u >> shift_amount}); + BOOST_TEST_EQ(lib_i << lib_u_shift, int128{static_cast(raw_i_u << shift_amount)}); + BOOST_TEST_EQ(lib_u << lib_i_shift, uint128{raw_u << shift_amount}); + BOOST_TEST_EQ(lib_i >> lib_u_shift, int128{raw_i >> shift_amount}); + BOOST_TEST_EQ(lib_u >> lib_i_shift, uint128{raw_u >> shift_amount}); } } // ========================================================================= -// uint128_t vs builtin_i128 +// uint128 vs builtin_i128 // ========================================================================= void test_uint128_vs_builtin_i128() @@ -244,7 +244,7 @@ void test_uint128_vs_builtin_i128() { const auto raw_u {random_value()}; const auto raw_i {random_value()}; - const uint128_t lib_u {raw_u}; + const uint128 lib_u {raw_u}; const builtin_u128 oracle_u {raw_u}; const builtin_u128 oracle_i = static_cast(raw_i); @@ -256,27 +256,27 @@ void test_uint128_vs_builtin_i128() BOOST_TEST_EQ(lib_u > raw_i, oracle_u > oracle_i); BOOST_TEST_EQ(lib_u >= raw_i, oracle_u >= oracle_i); - BOOST_TEST_EQ(lib_u + raw_i, uint128_t{oracle_u + oracle_i}); - BOOST_TEST_EQ(lib_u - raw_i, uint128_t{oracle_u - oracle_i}); - BOOST_TEST_EQ(lib_u * raw_i, uint128_t{oracle_u * oracle_i}); + BOOST_TEST_EQ(lib_u + raw_i, uint128{oracle_u + oracle_i}); + BOOST_TEST_EQ(lib_u - raw_i, uint128{oracle_u - oracle_i}); + BOOST_TEST_EQ(lib_u * raw_i, uint128{oracle_u * oracle_i}); if (oracle_i != 0) { - BOOST_TEST_EQ(lib_u / raw_i, uint128_t{oracle_u / oracle_i}); - BOOST_TEST_EQ(lib_u % raw_i, uint128_t{oracle_u % oracle_i}); + BOOST_TEST_EQ(lib_u / raw_i, uint128{oracle_u / oracle_i}); + BOOST_TEST_EQ(lib_u % raw_i, uint128{oracle_u % oracle_i}); } - BOOST_TEST_EQ(lib_u | raw_i, uint128_t{oracle_u | oracle_i}); - BOOST_TEST_EQ(lib_u & raw_i, uint128_t{oracle_u & oracle_i}); - BOOST_TEST_EQ(lib_u ^ raw_i, uint128_t{oracle_u ^ oracle_i}); + BOOST_TEST_EQ(lib_u | raw_i, uint128{oracle_u | oracle_i}); + BOOST_TEST_EQ(lib_u & raw_i, uint128{oracle_u & oracle_i}); + BOOST_TEST_EQ(lib_u ^ raw_i, uint128{oracle_u ^ oracle_i}); const unsigned shift_amount {static_cast(rng() % 128)}; - BOOST_TEST_EQ(lib_u << shift_amount, uint128_t{oracle_u << shift_amount}); - BOOST_TEST_EQ(lib_u >> shift_amount, uint128_t{oracle_u >> shift_amount}); + BOOST_TEST_EQ(lib_u << shift_amount, uint128{oracle_u << shift_amount}); + BOOST_TEST_EQ(lib_u >> shift_amount, uint128{oracle_u >> shift_amount}); } } // ========================================================================= -// int128_t vs builtin_u128 +// int128 vs builtin_u128 // ========================================================================= void test_int128_vs_builtin_u128() @@ -285,10 +285,10 @@ void test_int128_vs_builtin_u128() { const auto raw_i {random_value()}; const auto raw_u {random_value()}; - const int128_t lib_i {raw_i}; + const int128 lib_i {raw_i}; // Both promote to unsigned __int128 (same rank, signed -> unsigned). - // Result of arithmetic is unsigned __int128 (uint128_t in library form). + // Result of arithmetic is unsigned __int128 (uint128 in library form). const builtin_u128 oracle_i = static_cast(raw_i); const builtin_u128 oracle_u {raw_u}; @@ -299,28 +299,28 @@ void test_int128_vs_builtin_u128() BOOST_TEST_EQ(lib_i > raw_u, oracle_i > oracle_u); BOOST_TEST_EQ(lib_i >= raw_u, oracle_i >= oracle_u); - BOOST_TEST_EQ(lib_i + raw_u, uint128_t{oracle_i + oracle_u}); - BOOST_TEST_EQ(lib_i - raw_u, uint128_t{oracle_i - oracle_u}); - BOOST_TEST_EQ(lib_i * raw_u, uint128_t{oracle_i * oracle_u}); + BOOST_TEST_EQ(lib_i + raw_u, uint128{oracle_i + oracle_u}); + BOOST_TEST_EQ(lib_i - raw_u, uint128{oracle_i - oracle_u}); + BOOST_TEST_EQ(lib_i * raw_u, uint128{oracle_i * oracle_u}); if (oracle_u != 0) { - BOOST_TEST_EQ(lib_i / raw_u, uint128_t{oracle_i / oracle_u}); - BOOST_TEST_EQ(lib_i % raw_u, uint128_t{oracle_i % oracle_u}); + BOOST_TEST_EQ(lib_i / raw_u, uint128{oracle_i / oracle_u}); + BOOST_TEST_EQ(lib_i % raw_u, uint128{oracle_i % oracle_u}); } - BOOST_TEST_EQ(lib_i | raw_u, uint128_t{oracle_i | oracle_u}); - BOOST_TEST_EQ(lib_i & raw_u, uint128_t{oracle_i & oracle_u}); - BOOST_TEST_EQ(lib_i ^ raw_u, uint128_t{oracle_i ^ oracle_u}); + BOOST_TEST_EQ(lib_i | raw_u, uint128{oracle_i | oracle_u}); + BOOST_TEST_EQ(lib_i & raw_u, uint128{oracle_i & oracle_u}); + BOOST_TEST_EQ(lib_i ^ raw_u, uint128{oracle_i ^ oracle_u}); - // Shifts: result type follows LHS (int128_t for `lib_i << count`). + // Shifts: result type follows LHS (int128 for `lib_i << count`). // Left shift: compute via unsigned (well-defined wrap-around) and // reinterpret as signed, since `signed << count` overflowing or // shifting a negative value is UB pre-C++20 (UBSan flags it). // Right shift: keep signed for arithmetic-shift semantics. const unsigned shift_amount {static_cast(rng() % 128)}; const builtin_u128 raw_i_u = static_cast(raw_i); - BOOST_TEST_EQ(lib_i << shift_amount, int128_t{static_cast(raw_i_u << shift_amount)}); - BOOST_TEST_EQ(lib_i >> shift_amount, int128_t{raw_i >> shift_amount}); + BOOST_TEST_EQ(lib_i << shift_amount, int128{static_cast(raw_i_u << shift_amount)}); + BOOST_TEST_EQ(lib_i >> shift_amount, int128{raw_i >> shift_amount}); } } @@ -372,17 +372,17 @@ void test_signed_boundaries() for (std::size_t i {0}; i < count; ++i) { const auto raw_a {values[i]}; - const int128_t a {raw_a}; + const int128 a {raw_a}; // Unary and conversion. - BOOST_TEST_EQ(-a, int128_t{static_cast(0U - static_cast(raw_a))}); - BOOST_TEST_EQ(~a, int128_t{static_cast(~static_cast(raw_a))}); - BOOST_TEST_EQ(int128_t{static_cast(a)}, int128_t{raw_a}); + BOOST_TEST_EQ(-a, int128{static_cast(0U - static_cast(raw_a))}); + BOOST_TEST_EQ(~a, int128{static_cast(~static_cast(raw_a))}); + BOOST_TEST_EQ(int128{static_cast(a)}, int128{raw_a}); BOOST_TEST_EQ(a.signed_high(), static_cast(static_cast(raw_a) >> 64)); // abs(INT128_MIN) has no representable result; it wraps, like the builtin. BOOST_TEST_EQ(boost::int128::abs(a), - int128_t{static_cast(raw_a < 0 ? 0U - static_cast(raw_a) + int128{static_cast(raw_a < 0 ? 0U - static_cast(raw_a) : static_cast(raw_a))}); // Float conversion is the other place the sign is applied by hand. Compared @@ -394,15 +394,15 @@ void test_signed_boundaries() // Arithmetic right shift fills with the sign bit at every distance. for (unsigned shift {0}; shift < 128U; ++shift) { - BOOST_TEST_EQ(a >> shift, int128_t{raw_a >> shift}); + BOOST_TEST_EQ(a >> shift, int128{raw_a >> shift}); BOOST_TEST_EQ(a << shift, - int128_t{static_cast(static_cast(raw_a) << shift)}); + int128{static_cast(static_cast(raw_a) << shift)}); } for (std::size_t j {0}; j < count; ++j) { const auto raw_b {values[j]}; - const int128_t b {raw_b}; + const int128 b {raw_b}; BOOST_TEST_EQ(a == b, raw_a == raw_b); BOOST_TEST_EQ(a != b, raw_a != raw_b); @@ -414,25 +414,25 @@ void test_signed_boundaries() // Computed through the unsigned domain: signed overflow is UB for the oracle. const builtin_u128 ua {static_cast(raw_a)}; const builtin_u128 ub {static_cast(raw_b)}; - BOOST_TEST_EQ(a + b, int128_t{static_cast(ua + ub)}); - BOOST_TEST_EQ(a - b, int128_t{static_cast(ua - ub)}); - BOOST_TEST_EQ(a * b, int128_t{static_cast(ua * ub)}); + BOOST_TEST_EQ(a + b, int128{static_cast(ua + ub)}); + BOOST_TEST_EQ(a - b, int128{static_cast(ua - ub)}); + BOOST_TEST_EQ(a * b, int128{static_cast(ua * ub)}); // INT128_MIN / -1 overflows; the builtin traps on it, so skip that pair. const bool overflowing_div {raw_b == -1 && raw_a == static_cast(top_bit)}; if (raw_b != 0 && !overflowing_div) { - BOOST_TEST_EQ(a / b, int128_t{raw_a / raw_b}); - BOOST_TEST_EQ(a % b, int128_t{raw_a % raw_b}); + BOOST_TEST_EQ(a / b, int128{raw_a / raw_b}); + BOOST_TEST_EQ(a % b, int128{raw_a % raw_b}); const auto qr {boost::int128::div(a, b)}; - BOOST_TEST_EQ(qr.quot, int128_t{raw_a / raw_b}); - BOOST_TEST_EQ(qr.rem, int128_t{raw_a % raw_b}); + BOOST_TEST_EQ(qr.quot, int128{raw_a / raw_b}); + BOOST_TEST_EQ(qr.rem, int128{raw_a % raw_b}); } - BOOST_TEST_EQ(a | b, int128_t{static_cast(ua | ub)}); - BOOST_TEST_EQ(a & b, int128_t{static_cast(ua & ub)}); - BOOST_TEST_EQ(a ^ b, int128_t{static_cast(ua ^ ub)}); + BOOST_TEST_EQ(a | b, int128{static_cast(ua | ub)}); + BOOST_TEST_EQ(a & b, int128{static_cast(ua & ub)}); + BOOST_TEST_EQ(a ^ b, int128{static_cast(ua ^ ub)}); // Saturating arithmetic clamps instead of wrapping. const builtin_i128 sum {static_cast(ua + ub)}; @@ -440,14 +440,14 @@ void test_signed_boundaries() const builtin_i128 expected_add {add_overflowed ? (raw_a < 0 ? static_cast(top_bit) : static_cast(~top_bit)) : sum}; - BOOST_TEST_EQ(boost::int128::saturating_add(a, b), int128_t{expected_add}); + BOOST_TEST_EQ(boost::int128::saturating_add(a, b), int128{expected_add}); const builtin_i128 diff {static_cast(ua - ub)}; const bool sub_overflowed {(raw_a < 0) != (raw_b < 0) && (diff < 0) != (raw_a < 0)}; const builtin_i128 expected_sub {sub_overflowed ? (raw_a < 0 ? static_cast(top_bit) : static_cast(~top_bit)) : diff}; - BOOST_TEST_EQ(boost::int128::saturating_sub(a, b), int128_t{expected_sub}); + BOOST_TEST_EQ(boost::int128::saturating_sub(a, b), int128{expected_sub}); // midpoint rounds toward the first argument. Neither expression below can // overflow: b - a is representable when the signs agree, and a + b is @@ -462,7 +462,7 @@ void test_signed_boundaries() const builtin_i128 straddling_sum {raw_a + raw_b}; mid = (straddling_sum >> 1) + ((straddling_sum & 1) != 0 && raw_a > raw_b ? 1 : 0); } - BOOST_TEST_EQ(boost::int128::midpoint(a, b), int128_t{mid}); + BOOST_TEST_EQ(boost::int128::midpoint(a, b), int128{mid}); } } } diff --git a/test/test_byteswap.cu b/test/test_byteswap.cu index 5fd7094f..449e0974 100644 --- a/test/test_byteswap.cu +++ b/test/test_byteswap.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, test_type *out, int numElements) { diff --git a/test/test_byteswap_sycl.cpp b/test/test_byteswap_sycl.cpp index 87fb124b..feef1851 100644 --- a/test/test_byteswap_sycl.cpp +++ b/test/test_byteswap_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return boost::int128::byteswap(a); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return boost::int128::byteswap(a); }); } diff --git a/test/test_ckd.cpp b/test/test_ckd.cpp index e79343cc..f80d33b2 100644 --- a/test/test_ckd.cpp +++ b/test/test_ckd.cpp @@ -11,8 +11,8 @@ using boost::int128::ckd_add; using boost::int128::ckd_sub; using boost::int128::ckd_mul; -using boost::int128::int128_t; -using boost::int128::uint128_t; +using boost::int128::int128; +using boost::int128::uint128; constexpr std::size_t N {4096}; static std::mt19937_64 rng {42}; @@ -192,14 +192,14 @@ void test_standard_oracle() {} // #if defined(__SIZEOF_INT128__) && (defined(__GNUC__) || defined(__clang__)) -static uint128_t lib_u(const unsigned __int128 v) +static uint128 lib_u(const unsigned __int128 v) { - return uint128_t{static_cast(v >> 64), static_cast(v)}; + return uint128{static_cast(v >> 64), static_cast(v)}; } -static int128_t lib_s(const __int128 v) +static int128 lib_s(const __int128 v) { - return static_cast(lib_u(static_cast(v))); + return static_cast(lib_u(static_cast(v))); } static unsigned __int128 rand_native() @@ -313,41 +313,41 @@ void native_fuzz(Ref ref_overflow, Ckd ckd_overflow) const __int128 sa {static_cast<__int128>(ua)}; const __int128 sb {static_cast<__int128>(ub)}; - // uint128_t target, unsigned operands + // uint128 target, unsigned operands { unsigned __int128 ref {}; const bool ref_of {ref_overflow(ua, ub, &ref)}; - uint128_t got {}; + uint128 got {}; const bool got_of {ckd_overflow(&got, lib_u(ua), lib_u(ub))}; BOOST_TEST_EQ(got_of, ref_of); BOOST_TEST(got == lib_u(ref)); } - // int128_t target, signed operands + // int128 target, signed operands { __int128 ref {}; const bool ref_of {ref_overflow(sa, sb, &ref)}; - int128_t got {}; + int128 got {}; const bool got_of {ckd_overflow(&got, lib_s(sa), lib_s(sb))}; BOOST_TEST_EQ(got_of, ref_of); BOOST_TEST(got == lib_s(ref)); } - // int128_t target, mixed-sign operands (unsigned + signed) + // int128 target, mixed-sign operands (unsigned + signed) { __int128 ref {}; const bool ref_of {ref_overflow(ua, sb, &ref)}; - int128_t got {}; + int128 got {}; const bool got_of {ckd_overflow(&got, lib_u(ua), lib_s(sb))}; BOOST_TEST_EQ(got_of, ref_of); BOOST_TEST(got == lib_s(ref)); } - // uint128_t target, mixed-sign operands (signed + unsigned) + // uint128 target, mixed-sign operands (signed + unsigned) { unsigned __int128 ref {}; const bool ref_of {ref_overflow(sa, ub, &ref)}; - uint128_t got {}; + uint128 got {}; const bool got_of {ckd_overflow(&got, lib_s(sa), lib_u(ub))}; BOOST_TEST_EQ(got_of, ref_of); BOOST_TEST(got == lib_u(ref)); @@ -380,98 +380,98 @@ void test_native_oracle() {} // Hand-verified edge cases that run on every platform, including those without // a native 128-bit type. // -constexpr auto u_max {(std::numeric_limits::max)()}; -constexpr auto i_max {(std::numeric_limits::max)()}; -constexpr auto i_min {(std::numeric_limits::min)()}; +constexpr auto u_max {(std::numeric_limits::max)()}; +constexpr auto i_max {(std::numeric_limits::max)()}; +constexpr auto i_min {(std::numeric_limits::min)()}; void test_add_edges() { - uint128_t u {0}; - BOOST_TEST_EQ(ckd_add(&u, u_max, uint128_t{1}), true); // 2^128 wraps to 0 - BOOST_TEST(u == uint128_t{0}); - BOOST_TEST_EQ(ckd_add(&u, uint128_t{5}, int128_t{-3}), false); - BOOST_TEST(u == uint128_t{2}); - BOOST_TEST_EQ(ckd_add(&u, uint128_t{3}, int128_t{-5}), true); // -2 wraps - BOOST_TEST(u == u_max - uint128_t{1}); + uint128 u {0}; + BOOST_TEST_EQ(ckd_add(&u, u_max, uint128{1}), true); // 2^128 wraps to 0 + BOOST_TEST(u == uint128{0}); + BOOST_TEST_EQ(ckd_add(&u, uint128{5}, int128{-3}), false); + BOOST_TEST(u == uint128{2}); + BOOST_TEST_EQ(ckd_add(&u, uint128{3}, int128{-5}), true); // -2 wraps + BOOST_TEST(u == u_max - uint128{1}); BOOST_TEST_EQ(ckd_add(&u, u_max, u_max), true); // carry past 2^128 - int128_t i {0}; - BOOST_TEST_EQ(ckd_add(&i, i_max, int128_t{1}), true); // INT128_MAX + 1 -> INT128_MIN + int128 i {0}; + BOOST_TEST_EQ(ckd_add(&i, i_max, int128{1}), true); // INT128_MAX + 1 -> INT128_MIN BOOST_TEST(i == i_min); BOOST_TEST_EQ(ckd_add(&i, i_max, i_min), false); - BOOST_TEST(i == int128_t{-1}); - BOOST_TEST_EQ(ckd_add(&i, u_max, uint128_t{0}), true); // 2^128 - 1 unfit in signed - BOOST_TEST(i == int128_t{-1}); + BOOST_TEST(i == int128{-1}); + BOOST_TEST_EQ(ckd_add(&i, u_max, uint128{0}), true); // 2^128 - 1 unfit in signed + BOOST_TEST(i == int128{-1}); } void test_sub_edges() { - uint128_t u {0}; - BOOST_TEST_EQ(ckd_sub(&u, uint128_t{0}, uint128_t{1}), true); // -1 wraps to 2^128 - 1 + uint128 u {0}; + BOOST_TEST_EQ(ckd_sub(&u, uint128{0}, uint128{1}), true); // -1 wraps to 2^128 - 1 BOOST_TEST(u == u_max); - BOOST_TEST_EQ(ckd_sub(&u, uint128_t{5}, uint128_t{3}), false); - BOOST_TEST(u == uint128_t{2}); - BOOST_TEST_EQ(ckd_sub(&u, u_max, int128_t{-1}), true); // 2^128 wraps to 0 - BOOST_TEST(u == uint128_t{0}); + BOOST_TEST_EQ(ckd_sub(&u, uint128{5}, uint128{3}), false); + BOOST_TEST(u == uint128{2}); + BOOST_TEST_EQ(ckd_sub(&u, u_max, int128{-1}), true); // 2^128 wraps to 0 + BOOST_TEST(u == uint128{0}); - int128_t i {0}; - BOOST_TEST_EQ(ckd_sub(&i, i_min, int128_t{1}), true); // INT128_MIN - 1 -> INT128_MAX + int128 i {0}; + BOOST_TEST_EQ(ckd_sub(&i, i_min, int128{1}), true); // INT128_MIN - 1 -> INT128_MAX BOOST_TEST(i == i_max); - BOOST_TEST_EQ(ckd_sub(&i, i_max, int128_t{-1}), true); // -> INT128_MIN + BOOST_TEST_EQ(ckd_sub(&i, i_max, int128{-1}), true); // -> INT128_MIN BOOST_TEST(i == i_min); BOOST_TEST_EQ(ckd_sub(&i, i_max, i_max), false); - BOOST_TEST(i == int128_t{0}); + BOOST_TEST(i == int128{0}); BOOST_TEST_EQ(ckd_sub(&i, i_min, i_min), false); - BOOST_TEST(i == int128_t{0}); + BOOST_TEST(i == int128{0}); // Narrow targets. std::int32_t r32 {0}; - BOOST_TEST_EQ(ckd_sub(&r32, int128_t{1000}, int128_t{2000}), false); + BOOST_TEST_EQ(ckd_sub(&r32, int128{1000}, int128{2000}), false); BOOST_TEST_EQ(r32, -1000); std::uint8_t r8 {0}; - BOOST_TEST_EQ(ckd_sub(&r8, uint128_t{0}, uint128_t{1}), true); + BOOST_TEST_EQ(ckd_sub(&r8, uint128{0}, uint128{1}), true); BOOST_TEST_EQ(static_cast(r8), 255); } void test_mul_edges() { - int128_t i {0}; - BOOST_TEST_EQ(ckd_mul(&i, i_min, int128_t{-1}), true); // 2^127 wraps to INT128_MIN + int128 i {0}; + BOOST_TEST_EQ(ckd_mul(&i, i_min, int128{-1}), true); // 2^127 wraps to INT128_MIN BOOST_TEST(i == i_min); - BOOST_TEST_EQ(ckd_mul(&i, i_max, int128_t{2}), true); // 2^128 - 2 -> -2 - BOOST_TEST(i == int128_t{-2}); - BOOST_TEST_EQ(ckd_mul(&i, i_min, int128_t{1}), false); + BOOST_TEST_EQ(ckd_mul(&i, i_max, int128{2}), true); // 2^128 - 2 -> -2 + BOOST_TEST(i == int128{-2}); + BOOST_TEST_EQ(ckd_mul(&i, i_min, int128{1}), false); BOOST_TEST(i == i_min); - BOOST_TEST_EQ(ckd_mul(&i, int128_t{-3}, int128_t{4}), false); - BOOST_TEST(i == int128_t{-12}); - BOOST_TEST_EQ(ckd_mul(&i, int128_t{0}, int128_t{-7}), false); - BOOST_TEST(i == int128_t{0}); - - uint128_t u {0}; - BOOST_TEST_EQ(ckd_mul(&u, u_max, uint128_t{2}), true); // 2^129 - 2 wraps - BOOST_TEST(u == u_max - uint128_t{1}); - const uint128_t two_64 {1U, 0U}; // 2^64 + BOOST_TEST_EQ(ckd_mul(&i, int128{-3}, int128{4}), false); + BOOST_TEST(i == int128{-12}); + BOOST_TEST_EQ(ckd_mul(&i, int128{0}, int128{-7}), false); + BOOST_TEST(i == int128{0}); + + uint128 u {0}; + BOOST_TEST_EQ(ckd_mul(&u, u_max, uint128{2}), true); // 2^129 - 2 wraps + BOOST_TEST(u == u_max - uint128{1}); + const uint128 two_64 {1U, 0U}; // 2^64 BOOST_TEST_EQ(ckd_mul(&u, two_64, two_64), true); // 2^128 wraps to 0 - BOOST_TEST(u == uint128_t{0}); - BOOST_TEST_EQ(ckd_mul(&u, uint128_t{0}, u_max), false); - BOOST_TEST(u == uint128_t{0}); - BOOST_TEST_EQ(ckd_mul(&u, uint128_t{6}, uint128_t{7}), false); - BOOST_TEST(u == uint128_t{42}); - BOOST_TEST_EQ(ckd_mul(&u, u_max, int128_t{-1}), true); // negative result in unsigned - BOOST_TEST(u == uint128_t{1}); + BOOST_TEST(u == uint128{0}); + BOOST_TEST_EQ(ckd_mul(&u, uint128{0}, u_max), false); + BOOST_TEST(u == uint128{0}); + BOOST_TEST_EQ(ckd_mul(&u, uint128{6}, uint128{7}), false); + BOOST_TEST(u == uint128{42}); + BOOST_TEST_EQ(ckd_mul(&u, u_max, int128{-1}), true); // negative result in unsigned + BOOST_TEST(u == uint128{1}); // Narrow targets. std::int32_t r32 {0}; - BOOST_TEST_EQ(ckd_mul(&r32, int128_t{1000}, int128_t{1000}), false); + BOOST_TEST_EQ(ckd_mul(&r32, int128{1000}, int128{1000}), false); BOOST_TEST_EQ(r32, 1000000); std::uint8_t r8 {0}; - BOOST_TEST_EQ(ckd_mul(&r8, uint128_t{20}, uint128_t{20}), true); // 400 wraps mod 256 + BOOST_TEST_EQ(ckd_mul(&r8, uint128{20}, uint128{20}), true); // 400 wraps mod 256 BOOST_TEST_EQ(static_cast(r8), 144); std::int8_t r8s {0}; - BOOST_TEST_EQ(ckd_mul(&r8s, int128_t{-5}, int128_t{20}), false); + BOOST_TEST_EQ(ckd_mul(&r8s, int128{-5}, int128{20}), false); BOOST_TEST_EQ(static_cast(r8s), -100); } @@ -480,7 +480,7 @@ void test_mul_edges() // #if defined(__GNUC__) && __GNUC__ <= 7 && !defined(__clang__) && !defined(__SIZEOF_INT128__) -# define BOOST_INT128_TEST_CKD_NO_CONSTEXPR_128 +# define BOOST_int128EST_CKD_NO_CONSTEXPR_128 #endif constexpr bool add_overflows_int_max() @@ -517,11 +517,11 @@ constexpr int mul_value() constexpr bool mul_overflows_i128_min() { - int128_t r {0}; - return ckd_mul(&r, (std::numeric_limits::min)(), int128_t{-1}); + int128 r {0}; + return ckd_mul(&r, (std::numeric_limits::min)(), int128{-1}); } -#ifndef BOOST_INT128_TEST_CKD_NO_CONSTEXPR_128 +#ifndef BOOST_int128EST_CKD_NO_CONSTEXPR_128 // MSVC 14.1 warns of integral overflow #ifdef _MSC_VER @@ -536,7 +536,7 @@ void test_constexpr() static_assert(mul_overflows_int_max(), "INT_MAX * 2 overflows int"); static_assert(sub_value() == 2, "5 - 3 == 2"); static_assert(mul_value() == 42, "6 * 7 == 42"); - static_assert(mul_overflows_i128_min(), "INT128_MIN * -1 overflows int128_t"); + static_assert(mul_overflows_i128_min(), "INT128_MIN * -1 overflows int128"); } #ifdef _MSC_VER @@ -553,7 +553,7 @@ int main() test_sub_edges(); test_mul_edges(); - #ifndef BOOST_INT128_TEST_CKD_NO_CONSTEXPR_128 + #ifndef BOOST_int128EST_CKD_NO_CONSTEXPR_128 test_constexpr(); #endif diff --git a/test/test_climits.cpp b/test/test_climits.cpp index 9f030990..e03adc0a 100644 --- a/test/test_climits.cpp +++ b/test/test_climits.cpp @@ -7,9 +7,9 @@ int main() { - static_assert(BOOST_INT128_UINT128_MAX == std::numeric_limits::max(), "Should be equal"); - static_assert(BOOST_INT128_INT128_MAX == std::numeric_limits::max(), "Should be equal"); - static_assert(BOOST_INT128_INT128_MIN == std::numeric_limits::min(), "Should be equal"); + static_assert(BOOST_INT128_UINT128_MAX == std::numeric_limits::max(), "Should be equal"); + static_assert(BOOST_INT128_INT128_MAX == std::numeric_limits::max(), "Should be equal"); + static_assert(BOOST_INT128_INT128_MIN == std::numeric_limits::min(), "Should be equal"); return 0; } diff --git a/test/test_consteval_funcs.cpp b/test/test_consteval_funcs.cpp index 64f1e79d..72aead80 100644 --- a/test/test_consteval_funcs.cpp +++ b/test/test_consteval_funcs.cpp @@ -30,7 +30,7 @@ from ./boost/int128.hpp:8, from libs/decimal/test/test_consteval_funcs.cpp:6: libs/decimal/test/test_consteval_funcs.cpp:39:25: in constexpr expansion of 'boost::int128::operator*(x, 2)' ./boost/int128/detail/uint128_imp.hpp:2276:31: in constexpr expansion of 'boost::int128::detail::default_mul(lhs, ((uint64_t)rhs))' -./boost/int128/detail/uint128_imp.hpp:2211:37: in constexpr expansion of 'boost::int128::detail::knuth_multiply(((const uint32_t (&)[4])(& lhs_words)), ((const uint32_t (&)[2])(& rhs_words)))' +./boost/int128/detail/uint128_imp.hpp:2211:37: in constexpr expansion of 'boost::int128::detail::knuth_multiply(((const uint32_t (&)[4])(& lhs_words)), ((const uint32_t (&)[2])(& rhs_words)))' ./boost/int128/detail/common_mul.hpp:38:9: error: constexpr loop iteration count exceeds limit of 262144 (use -fconstexpr-loop-limit= to increase the limit) for (std::size_t i {}; i < u_size; ++i) ^~~ @@ -102,8 +102,8 @@ BOOST_INT128_CONSTEVAL bool test() int main() { - static_assert(test(), ""); - static_assert(test(), ""); + static_assert(test(), ""); + static_assert(test(), ""); return 0; } diff --git a/test/test_constexpr_boundaries.cpp b/test/test_constexpr_boundaries.cpp index f98295b1..8b88fedb 100644 --- a/test/test_constexpr_boundaries.cpp +++ b/test/test_constexpr_boundaries.cpp @@ -16,33 +16,33 @@ # pragma warning(disable : 4146) // unary minus operator applied to unsigned type, result still unsigned #endif -using boost::int128::int128_t; +using boost::int128::int128; namespace { constexpr auto int_max {BOOST_INT128_INT128_MAX}; constexpr auto int_min {BOOST_INT128_INT128_MIN}; -constexpr int128_t one {0, 1}; +constexpr int128 one {0, 1}; constexpr std::int64_t m {(std::numeric_limits::min)()}; -constexpr int128_t m128 {m}; -constexpr int128_t a {42, 1234}; -constexpr int128_t b {0, 5}; -constexpr int128_t neg_two_pow_64 {-1, 0}; +constexpr int128 m128 {m}; +constexpr int128 a {42, 1234}; +constexpr int128 b {0, 5}; +constexpr int128 neg_two_pow_64 {-1, 0}; // Signed-scalar negation paths (INT64_MIN) must be UB-free and must agree with -// promoting the scalar to int128_t first. -static_assert(a + m == a + m128, "operator+(int128_t, Signed)"); -static_assert(m + a == m128 + a, "operator+(Signed, int128_t)"); -static_assert(a / m == a / m128, "operator/(int128_t, Signed)"); -static_assert(m / b == m128 / b, "operator/(Signed, int128_t)"); +// promoting the scalar to int128 first. +static_assert(a + m == a + m128, "operator+(int128, Signed)"); +static_assert(m + a == m128 + a, "operator+(Signed, int128)"); +static_assert(a / m == a / m128, "operator/(int128, Signed)"); +static_assert(m / b == m128 / b, "operator/(Signed, int128)"); // A 128-bit divisor of exactly -2^64 has abs().low == 0; the quotient is 0 and // must not divide by zero. -static_assert(std::int64_t{5} / neg_two_pow_64 == int128_t{0, 0}, "operator/(Signed, int128_t) -2^64"); -static_assert(std::int64_t{-5} / neg_two_pow_64 == int128_t{0, 0}, "operator/(Signed, int128_t) -2^64 negative"); -static_assert(std::uint64_t{5} / neg_two_pow_64 == int128_t{0, 0}, "operator/(Unsigned, int128_t) -2^64"); +static_assert(std::int64_t{5} / neg_two_pow_64 == int128{0, 0}, "operator/(Signed, int128) -2^64"); +static_assert(std::int64_t{-5} / neg_two_pow_64 == int128{0, 0}, "operator/(Signed, int128) -2^64 negative"); +static_assert(std::uint64_t{5} / neg_two_pow_64 == int128{0, 0}, "operator/(Unsigned, int128) -2^64"); // Two's-complement rollover at the range boundaries: no UB, wraps like __int128. static_assert(int_max + one == int_min, "MAX + 1 -> MIN"); @@ -51,7 +51,7 @@ static_assert(int_max + 1 == int_min, "MAX + 1 (scalar) -> MIN"); static_assert(int_min - 1 == int_max, "MIN - 1 (scalar) -> MAX"); static_assert(-int_min == int_min, "-MIN wraps to itself"); static_assert(int_min * -1 == int_min, "MIN * -1 overflows to MIN"); -static_assert(int_max * 2 == -int128_t{0, 2}, "MAX * 2 overflows to -2"); +static_assert(int_max * 2 == -int128{0, 2}, "MAX * 2 overflows to -2"); } // namespace diff --git a/test/test_container_hash.cpp b/test/test_container_hash.cpp index a648ff91..ebb0a094 100644 --- a/test/test_container_hash.cpp +++ b/test/test_container_hash.cpp @@ -34,26 +34,26 @@ // turn delegates to std::hash. All three entry points must agree. void test_boost_hash_matches_std_and_hash_value() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; - const boost::hash u_hasher {}; - const std::hash u_std {}; + const boost::hash u_hasher {}; + const std::hash u_std {}; std::mt19937_64 rng {42}; for (int i {0}; i < 1024; ++i) { - const uint128_t v {rng(), rng()}; + const uint128 v {rng(), rng()}; BOOST_TEST_EQ(u_hasher(v), boost::int128::hash_value(v)); BOOST_TEST_EQ(u_hasher(v), u_std(v)); } - const boost::hash s_hasher {}; - const std::hash s_std {}; + const boost::hash s_hasher {}; + const std::hash s_std {}; for (int i {0}; i < 1024; ++i) { - const int128_t v {static_cast(rng()), rng()}; + const int128 v {static_cast(rng()), rng()}; BOOST_TEST_EQ(s_hasher(v), boost::int128::hash_value(v)); BOOST_TEST_EQ(s_hasher(v), s_std(v)); } @@ -62,25 +62,25 @@ void test_boost_hash_matches_std_and_hash_value() // Equal values must hash equal through boost::hash. void test_boost_hash_equal_values() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; - const boost::hash u_hasher {}; - const uint128_t ua {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE12345678)}; - const uint128_t ub {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE12345678)}; + const boost::hash u_hasher {}; + const uint128 ua {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE12345678)}; + const uint128 ub {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE12345678)}; BOOST_TEST_EQ(u_hasher(ua), u_hasher(ub)); - const boost::hash s_hasher {}; - const int128_t sa {INT64_C(-1), UINT64_C(0xCAFEBABE)}; - const int128_t sb {INT64_C(-1), UINT64_C(0xCAFEBABE)}; + const boost::hash s_hasher {}; + const int128 sa {INT64_C(-1), UINT64_C(0xCAFEBABE)}; + const int128 sb {INT64_C(-1), UINT64_C(0xCAFEBABE)}; BOOST_TEST_EQ(s_hasher(sa), s_hasher(sb)); // A value and its negation must not collide. - const boost::hash hasher {}; + const boost::hash hasher {}; for (std::int64_t i {1}; i <= 512; ++i) { - const int128_t pos {i}; - const int128_t neg {-i}; + const int128 pos {i}; + const int128 neg {-i}; BOOST_TEST_NE(hasher(pos), hasher(neg)); } } @@ -88,10 +88,10 @@ void test_boost_hash_equal_values() // boost::hash_combine must be deterministic and order sensitive. void test_hash_combine() { - using boost::int128::uint128_t; + using boost::int128::uint128; - const uint128_t a {UINT64_C(1), UINT64_C(2)}; - const uint128_t b {UINT64_C(3), UINT64_C(4)}; + const uint128 a {UINT64_C(1), UINT64_C(2)}; + const uint128 b {UINT64_C(3), UINT64_C(4)}; std::size_t seed1 {0}; boost::hash_combine(seed1, a); @@ -115,11 +115,11 @@ void test_hash_combine() // boost::hash_range over a container of 128-bit values. void test_hash_range() { - using boost::int128::uint128_t; + using boost::int128::uint128; - const std::vector v1 {uint128_t{0, 1}, uint128_t{1, 0}, uint128_t{UINT64_MAX, UINT64_MAX}}; - const std::vector v2 {uint128_t{0, 1}, uint128_t{1, 0}, uint128_t{UINT64_MAX, UINT64_MAX}}; - const std::vector v3 {uint128_t{1, 0}, uint128_t{0, 1}, uint128_t{UINT64_MAX, UINT64_MAX}}; + const std::vector v1 {uint128{0, 1}, uint128{1, 0}, uint128{UINT64_MAX, UINT64_MAX}}; + const std::vector v2 {uint128{0, 1}, uint128{1, 0}, uint128{UINT64_MAX, UINT64_MAX}}; + const std::vector v3 {uint128{1, 0}, uint128{0, 1}, uint128{UINT64_MAX, UINT64_MAX}}; // Equal ranges hash equal. BOOST_TEST_EQ(boost::hash_range(v1.begin(), v1.end()), boost::hash_range(v2.begin(), v2.end())); @@ -132,48 +132,48 @@ void test_hash_range() // with no explicit hasher. void test_unordered_map_default_hash() { - using boost::int128::uint128_t; - using boost::int128::int128_t; - - boost::unordered_map umap {}; - umap[uint128_t{0, 1}] = 1; - umap[uint128_t{0, 2}] = 2; - umap[uint128_t{1, 0}] = 3; - umap[uint128_t{UINT64_MAX, UINT64_MAX}] = 4; - - BOOST_TEST_EQ((umap[uint128_t{0, 1}]), 1); - BOOST_TEST_EQ((umap[uint128_t{0, 2}]), 2); - BOOST_TEST_EQ((umap[uint128_t{1, 0}]), 3); - BOOST_TEST_EQ((umap[uint128_t{UINT64_MAX, UINT64_MAX}]), 4); + using boost::int128::uint128; + using boost::int128::int128; + + boost::unordered_map umap {}; + umap[uint128{0, 1}] = 1; + umap[uint128{0, 2}] = 2; + umap[uint128{1, 0}] = 3; + umap[uint128{UINT64_MAX, UINT64_MAX}] = 4; + + BOOST_TEST_EQ((umap[uint128{0, 1}]), 1); + BOOST_TEST_EQ((umap[uint128{0, 2}]), 2); + BOOST_TEST_EQ((umap[uint128{1, 0}]), 3); + BOOST_TEST_EQ((umap[uint128{UINT64_MAX, UINT64_MAX}]), 4); BOOST_TEST_EQ(umap.size(), (std::size_t {4})); - boost::unordered_map smap {}; - smap[int128_t{0, 1}] = 1; - smap[int128_t{-1, UINT64_MAX}] = 2; - smap[int128_t{1, 0}] = 3; - smap[int128_t{-1, 0}] = 4; + boost::unordered_map smap {}; + smap[int128{0, 1}] = 1; + smap[int128{-1, UINT64_MAX}] = 2; + smap[int128{1, 0}] = 3; + smap[int128{-1, 0}] = 4; - BOOST_TEST_EQ((smap[int128_t{0, 1}]), 1); - BOOST_TEST_EQ((smap[int128_t{-1, UINT64_MAX}]), 2); - BOOST_TEST_EQ((smap[int128_t{1, 0}]), 3); - BOOST_TEST_EQ((smap[int128_t{-1, 0}]), 4); + BOOST_TEST_EQ((smap[int128{0, 1}]), 1); + BOOST_TEST_EQ((smap[int128{-1, UINT64_MAX}]), 2); + BOOST_TEST_EQ((smap[int128{1, 0}]), 3); + BOOST_TEST_EQ((smap[int128{-1, 0}]), 4); BOOST_TEST_EQ(smap.size(), (std::size_t {4})); } // boost::unordered_set likewise deduplicates via boost::hash. void test_unordered_set_default_hash() { - using boost::int128::uint128_t; + using boost::int128::uint128; - boost::unordered_set set {}; - set.insert(uint128_t{0, 1}); - set.insert(uint128_t{0, 1}); // duplicate - set.insert(uint128_t{1, 0}); + boost::unordered_set set {}; + set.insert(uint128{0, 1}); + set.insert(uint128{0, 1}); // duplicate + set.insert(uint128{1, 0}); BOOST_TEST_EQ(set.size(), (std::size_t {2})); - BOOST_TEST(set.find(uint128_t{0, 1}) != set.end()); - BOOST_TEST(set.find(uint128_t{1, 0}) != set.end()); - BOOST_TEST(set.find(uint128_t{9, 9}) == set.end()); + BOOST_TEST(set.find(uint128{0, 1}) != set.end()); + BOOST_TEST(set.find(uint128{1, 0}) != set.end()); + BOOST_TEST(set.find(uint128{9, 9}) == set.end()); } int main() diff --git a/test/test_countl_one.cu b/test/test_countl_one.cu index 9bf23038..b8e3d3a9 100644 --- a/test/test_countl_one.cu +++ b/test/test_countl_one.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, int *out, int numElements) { diff --git a/test/test_countl_one_sycl.cpp b/test/test_countl_one_sycl.cpp index 4fc726e8..981d994c 100644 --- a/test/test_countl_one_sycl.cpp +++ b/test/test_countl_one_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return boost::int128::countl_one(a); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return boost::int128::countl_one(a); }); } diff --git a/test/test_countl_zero.cu b/test/test_countl_zero.cu index 6f211909..bc8061d1 100644 --- a/test/test_countl_zero.cu +++ b/test/test_countl_zero.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, int *out, int numElements) { diff --git a/test/test_countl_zero_sycl.cpp b/test/test_countl_zero_sycl.cpp index 32b8e969..106ceb15 100644 --- a/test/test_countl_zero_sycl.cpp +++ b/test/test_countl_zero_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return boost::int128::countl_zero(a); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return boost::int128::countl_zero(a); }); } diff --git a/test/test_countr_one.cu b/test/test_countr_one.cu index 8f9c0439..e1665c80 100644 --- a/test/test_countr_one.cu +++ b/test/test_countr_one.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, int *out, int numElements) { diff --git a/test/test_countr_one_sycl.cpp b/test/test_countr_one_sycl.cpp index cb337e3f..f0ad51cc 100644 --- a/test/test_countr_one_sycl.cpp +++ b/test/test_countr_one_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return boost::int128::countr_one(a); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return boost::int128::countr_one(a); }); } diff --git a/test/test_countr_zero.cu b/test/test_countr_zero.cu index 4c6e5b34..1c3d87a1 100644 --- a/test/test_countr_zero.cu +++ b/test/test_countr_zero.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, int *out, int numElements) { diff --git a/test/test_countr_zero_sycl.cpp b/test/test_countr_zero_sycl.cpp index 543d2f88..cf6b97bb 100644 --- a/test/test_countr_zero_sycl.cpp +++ b/test/test_countr_zero_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return boost::int128::countr_zero(a); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return boost::int128::countr_zero(a); }); } diff --git a/test/test_cross_type_assign.cpp b/test/test_cross_type_assign.cpp index f3274c59..d75b5a11 100644 --- a/test/test_cross_type_assign.cpp +++ b/test/test_cross_type_assign.cpp @@ -13,37 +13,37 @@ using namespace boost::int128; void test_implicit_conversion_traits() { - static_assert(std::is_convertible::value, "int128_t -> uint128_t should be implicit"); - static_assert(std::is_convertible::value, "uint128_t -> int128_t should be implicit"); - static_assert(std::is_assignable::value, "uint128_t should be assignable to int128_t"); - static_assert(std::is_assignable::value, "int128_t should be assignable to uint128_t"); + static_assert(std::is_convertible::value, "int128 -> uint128 should be implicit"); + static_assert(std::is_convertible::value, "uint128 -> int128 should be implicit"); + static_assert(std::is_assignable::value, "uint128 should be assignable to int128"); + static_assert(std::is_assignable::value, "int128 should be assignable to uint128"); // Implicit conversions to builtin integer types (matches __int128 behavior) - static_assert(std::is_convertible::value, "int128_t -> int should be implicit"); - static_assert(std::is_convertible::value, "int128_t -> unsigned int should be implicit"); - static_assert(std::is_convertible::value, "int128_t -> int64_t should be implicit"); - static_assert(std::is_convertible::value, "int128_t -> uint64_t should be implicit"); - static_assert(std::is_convertible::value, "uint128_t -> int should be implicit"); - static_assert(std::is_convertible::value, "uint128_t -> unsigned int should be implicit"); + static_assert(std::is_convertible::value, "int128 -> int should be implicit"); + static_assert(std::is_convertible::value, "int128 -> unsigned int should be implicit"); + static_assert(std::is_convertible::value, "int128 -> int64_t should be implicit"); + static_assert(std::is_convertible::value, "int128 -> uint64_t should be implicit"); + static_assert(std::is_convertible::value, "uint128 -> int should be implicit"); + static_assert(std::is_convertible::value, "uint128 -> unsigned int should be implicit"); // Implicit conversions to floating-point types - static_assert(std::is_convertible::value, "int128_t -> float should be implicit"); - static_assert(std::is_convertible::value, "int128_t -> double should be implicit"); - static_assert(std::is_convertible::value, "uint128_t -> float should be implicit"); - static_assert(std::is_convertible::value, "uint128_t -> double should be implicit"); + static_assert(std::is_convertible::value, "int128 -> float should be implicit"); + static_assert(std::is_convertible::value, "int128 -> double should be implicit"); + static_assert(std::is_convertible::value, "uint128 -> float should be implicit"); + static_assert(std::is_convertible::value, "uint128 -> double should be implicit"); #if defined(BOOST_INT128_HAS_INT128) // Implicit conversions to builtin __int128 - static_assert(std::is_convertible::value, "int128_t -> __int128 should be implicit"); - static_assert(std::is_convertible::value, "int128_t -> unsigned __int128 should be implicit"); - static_assert(std::is_convertible::value, "uint128_t -> __int128 should be implicit"); - static_assert(std::is_convertible::value, "uint128_t -> unsigned __int128 should be implicit"); + static_assert(std::is_convertible::value, "int128 -> __int128 should be implicit"); + static_assert(std::is_convertible::value, "int128 -> unsigned __int128 should be implicit"); + static_assert(std::is_convertible::value, "uint128 -> __int128 should be implicit"); + static_assert(std::is_convertible::value, "uint128 -> unsigned __int128 should be implicit"); #endif } void test_implicit_conversions_runtime() { - const int128_t i {0, 42U}; + const int128 i {0, 42U}; const int as_int = i; BOOST_TEST_EQ(as_int, 42); @@ -54,7 +54,7 @@ void test_implicit_conversions_runtime() const double as_double = i; BOOST_TEST_EQ(static_cast(as_double), 42); - const uint128_t u {0U, 100U}; + const uint128 u {0U, 100U}; const unsigned int as_uint = u; BOOST_TEST_EQ(as_uint, 100U); @@ -62,93 +62,93 @@ void test_implicit_conversions_runtime() BOOST_TEST_EQ(static_cast(as_float), 100); #if defined(BOOST_INT128_HAS_INT128) - const detail::builtin_i128 as_native_i = int128_t{1, 2U}; + const detail::builtin_i128 as_native_i = int128{1, 2U}; BOOST_TEST(as_native_i == ((static_cast(1) << 64) | 2)); - const detail::builtin_u128 as_native_u = uint128_t{3U, 4U}; + const detail::builtin_u128 as_native_u = uint128{3U, 4U}; BOOST_TEST(as_native_u == ((static_cast(3) << 64) | 4)); #endif } void test_uint_to_int_construction() { - const uint128_t u {1U, 42U}; + const uint128 u {1U, 42U}; // Copy construction with braces - const int128_t a {u}; + const int128 a {u}; BOOST_TEST_EQ(a.low, u.low); BOOST_TEST_EQ(a.high, u.high); // Copy-initialization (implicit conversion) - const int128_t b = u; + const int128 b = u; BOOST_TEST_EQ(b.low, u.low); BOOST_TEST_EQ(b.high, u.high); // Move construction - uint128_t u_movable {1U, 42U}; - const int128_t c {std::move(u_movable)}; + uint128 u_movable {1U, 42U}; + const int128 c {std::move(u_movable)}; BOOST_TEST_EQ(c.low, 42U); BOOST_TEST_EQ(c.high, UINT64_C(1)); } void test_int_to_uint_construction() { - const int128_t i {-1, 0xFFFFFFFFFFFFFFFFULL}; + const int128 i {-1, 0xFFFFFFFFFFFFFFFFULL}; - const uint128_t a {i}; + const uint128 a {i}; BOOST_TEST_EQ(a.low, i.low); BOOST_TEST_EQ(a.high, i.high); - const uint128_t b = i; + const uint128 b = i; BOOST_TEST_EQ(b.low, i.low); BOOST_TEST_EQ(b.high, i.high); - int128_t i_movable {-1, 0xFFFFFFFFFFFFFFFFULL}; - const uint128_t c {std::move(i_movable)}; + int128 i_movable {-1, 0xFFFFFFFFFFFFFFFFULL}; + const uint128 c {std::move(i_movable)}; BOOST_TEST_EQ(c.high, 0xFFFFFFFFFFFFFFFFULL); BOOST_TEST_EQ(c.low, 0xFFFFFFFFFFFFFFFFULL); } void test_uint_to_int_assignment() { - const uint128_t u {7U, 99U}; + const uint128 u {7U, 99U}; // Copy assignment via implicit conversion - int128_t a {}; + int128 a {}; a = u; BOOST_TEST_EQ(a.low, 99U); BOOST_TEST_EQ(a.high, 7); // Move assignment via implicit conversion - int128_t b {}; - b = uint128_t{7U, 99U}; + int128 b {}; + b = uint128{7U, 99U}; BOOST_TEST_EQ(b.low, 99U); BOOST_TEST_EQ(b.high, 7); } void test_int_to_uint_assignment() { - const int128_t i {-2, 0x1234U}; + const int128 i {-2, 0x1234U}; - uint128_t a {}; + uint128 a {}; a = i; BOOST_TEST_EQ(a.low, 0x1234U); BOOST_TEST_EQ(a.high, static_cast(-2)); - uint128_t b {}; - b = int128_t{-2, 0x1234U}; + uint128 b {}; + b = int128{-2, 0x1234U}; BOOST_TEST_EQ(b.low, 0x1234U); BOOST_TEST_EQ(b.high, static_cast(-2)); } void test_constexpr_cross_type() { - constexpr uint128_t u {1U, 42U}; - constexpr int128_t a {u}; + constexpr uint128 u {1U, 42U}; + constexpr int128 a {u}; static_assert(a.low == 42U, "constexpr cross-type construction"); - constexpr int128_t i {-1, 7U}; - constexpr uint128_t b {i}; + constexpr int128 i {-1, 7U}; + constexpr uint128 b {i}; static_assert(b.low == 7U, "constexpr cross-type construction"); } @@ -156,41 +156,41 @@ template void test_uint_from_float() { // Basic positive values - BOOST_TEST_EQ(uint128_t{Float{0}}.low, 0U); - BOOST_TEST_EQ(uint128_t{Float{0}}.high, 0U); - BOOST_TEST_EQ(uint128_t{Float{42}}.low, 42U); - BOOST_TEST_EQ(uint128_t{Float{42}}.high, 0U); + BOOST_TEST_EQ(uint128{Float{0}}.low, 0U); + BOOST_TEST_EQ(uint128{Float{0}}.high, 0U); + BOOST_TEST_EQ(uint128{Float{42}}.low, 42U); + BOOST_TEST_EQ(uint128{Float{42}}.high, 0U); // Truncation toward zero. Use Float{N}/Float{D} rather than a double literal // so the test compiles cleanly for float and long double without precision warnings. - BOOST_TEST_EQ((uint128_t{Float{37} / Float{10}}.low), 3U); // ~3.7 -> 3 - BOOST_TEST_EQ((uint128_t{Float{99} / Float{100}}.low), 0U); // ~0.99 -> 0 + BOOST_TEST_EQ((uint128{Float{37} / Float{10}}.low), 3U); // ~3.7 -> 3 + BOOST_TEST_EQ((uint128{Float{99} / Float{100}}.low), 0U); // ~0.99 -> 0 // NaN -> 0 const Float nan {std::numeric_limits::quiet_NaN()}; - BOOST_TEST_EQ(uint128_t{nan}.low, 0U); - BOOST_TEST_EQ(uint128_t{nan}.high, 0U); + BOOST_TEST_EQ(uint128{nan}.low, 0U); + BOOST_TEST_EQ(uint128{nan}.high, 0U); // Negative -> 0 (matches libgcc) - BOOST_TEST_EQ(uint128_t{Float{-1}}.low, 0U); - BOOST_TEST_EQ(uint128_t{Float{-1}}.high, 0U); + BOOST_TEST_EQ(uint128{Float{-1}}.low, 0U); + BOOST_TEST_EQ(uint128{Float{-1}}.high, 0U); // Saturation on overflow: infinity (or any value >= 2^128) -> UINT128_MAX. // For float, 2^128 itself is +infinity since the 8-bit exponent saturates. const Float two_64 {static_cast(UINT64_C(1) << 32) * static_cast(UINT64_C(1) << 32)}; - const uint128_t saturated {std::numeric_limits::infinity()}; + const uint128 saturated {std::numeric_limits::infinity()}; BOOST_TEST_EQ(saturated.low, UINT64_MAX); BOOST_TEST_EQ(saturated.high, UINT64_MAX); // 2^127 should fit (representable in float, double, long double) const Float two_127 {two_64 * static_cast(UINT64_C(1) << 63)}; - const uint128_t large {two_127}; + const uint128 large {two_127}; BOOST_TEST_EQ(large.low, 0U); BOOST_TEST_EQ(large.high, UINT64_C(1) << 63); // Round-trip for an exactly representable mid-range value const Float round_trip_src {two_64}; // 2^64 - const uint128_t round_trip {round_trip_src}; + const uint128 round_trip {round_trip_src}; BOOST_TEST_EQ(round_trip.low, 0U); BOOST_TEST_EQ(round_trip.high, 1U); } @@ -199,50 +199,50 @@ template void test_int_from_float() { // Basic positive and negative - BOOST_TEST_EQ(int128_t{Float{0}}.low, 0U); - BOOST_TEST_EQ(int128_t{Float{0}}.signed_high(), INT64_C(0)); - BOOST_TEST_EQ(int128_t{Float{42}}.low, 42U); - BOOST_TEST_EQ(int128_t{Float{-42}}.low, static_cast(-42)); - BOOST_TEST_EQ(int128_t{Float{-42}}.signed_high(), INT64_C(-1)); + BOOST_TEST_EQ(int128{Float{0}}.low, 0U); + BOOST_TEST_EQ(int128{Float{0}}.signed_high(), INT64_C(0)); + BOOST_TEST_EQ(int128{Float{42}}.low, 42U); + BOOST_TEST_EQ(int128{Float{-42}}.low, static_cast(-42)); + BOOST_TEST_EQ(int128{Float{-42}}.signed_high(), INT64_C(-1)); // Truncation toward zero (see note in test_uint_from_float on the literal style). - BOOST_TEST_EQ((int128_t{Float{37} / Float{10}}.low), 3U); // ~3.7 -> 3 - BOOST_TEST_EQ((int128_t{Float{-37} / Float{10}}.low), static_cast(-3)); // ~-3.7 -> -3 + BOOST_TEST_EQ((int128{Float{37} / Float{10}}.low), 3U); // ~3.7 -> 3 + BOOST_TEST_EQ((int128{Float{-37} / Float{10}}.low), static_cast(-3)); // ~-3.7 -> -3 // NaN -> 0 const Float nan {std::numeric_limits::quiet_NaN()}; - BOOST_TEST_EQ(int128_t{nan}.low, 0U); - BOOST_TEST_EQ(int128_t{nan}.signed_high(), INT64_C(0)); + BOOST_TEST_EQ(int128{nan}.low, 0U); + BOOST_TEST_EQ(int128{nan}.signed_high(), INT64_C(0)); // Positive saturation: f >= 2^127 -> INT128_MAX const Float two_64 {static_cast(UINT64_C(1) << 32) * static_cast(UINT64_C(1) << 32)}; const Float two_127 {two_64 * static_cast(UINT64_C(1) << 63)}; - const int128_t pos_sat {two_127}; + const int128 pos_sat {two_127}; BOOST_TEST_EQ(pos_sat.signed_high(), (std::numeric_limits::max)()); BOOST_TEST_EQ(pos_sat.low, UINT64_MAX); // Negative saturation: f <= -2^127 -> INT128_MIN - const int128_t neg_sat {-two_127}; + const int128 neg_sat {-two_127}; BOOST_TEST_EQ(neg_sat.signed_high(), (std::numeric_limits::min)()); BOOST_TEST_EQ(neg_sat.low, 0U); // Just below the positive boundary should not saturate. - const int128_t near_max {two_127 / Float{2}}; // 2^126 + const int128 near_max {two_127 / Float{2}}; // 2^126 BOOST_TEST_EQ(near_max.high, UINT64_C(1) << 62); BOOST_TEST_EQ(near_max.low, 0U); // Round-trip a negative power of two through the two's-complement path - const int128_t neg_round_trip {-two_64}; // -2^64 + const int128 neg_round_trip {-two_64}; // -2^64 BOOST_TEST_EQ(neg_round_trip.low, 0U); BOOST_TEST_EQ(neg_round_trip.signed_high(), INT64_C(-1)); } void test_constexpr_float_construction() { - constexpr uint128_t u {42.5}; + constexpr uint128 u {42.5}; static_assert(u.low == 42U, "constexpr uint from double"); - constexpr int128_t i {-7.9}; + constexpr int128 i {-7.9}; static_assert(i.signed_high() == -1, "constexpr int from double sign"); // NaN -> 0 is exercised at runtime in test_uint_from_float / test_int_from_float. diff --git a/test/test_div.cpp b/test/test_div.cpp index 252929b8..1e24106f 100644 --- a/test/test_div.cpp +++ b/test/test_div.cpp @@ -37,26 +37,26 @@ void test_unsigned_div() { for (std::size_t i {}; i < N; ++i) { - uint128_t lhs; - uint128_t rhs; + uint128 lhs; + uint128 rhs; switch (layout) { case 0U: - lhs = uint128_t {dist(rng), dist(rng)}; - rhs = uint128_t {dist(rng), dist(rng)}; + lhs = uint128 {dist(rng), dist(rng)}; + rhs = uint128 {dist(rng), dist(rng)}; break; case 1U: - lhs = uint128_t {dist(rng)}; - rhs = uint128_t {dist(rng), dist(rng)}; + lhs = uint128 {dist(rng)}; + rhs = uint128 {dist(rng), dist(rng)}; break; case 2U: - lhs = uint128_t {dist(rng), dist(rng)}; - rhs = uint128_t {dist(rng)}; + lhs = uint128 {dist(rng), dist(rng)}; + rhs = uint128 {dist(rng)}; break; case 3U: - lhs = uint128_t {dist(rng)}; - rhs = uint128_t {dist(rng)}; + lhs = uint128 {dist(rng)}; + rhs = uint128 {dist(rng)}; break; default: // LCOV_EXCL_LINE BOOST_INT128_UNREACHABLE; // LCOV_EXCL_LINE @@ -71,8 +71,8 @@ void test_unsigned_div() BOOST_TEST_EQ(inv_div_res.rem, rhs % lhs); } - uint128_t lhs {dist(rng), dist(rng)}; - uint128_t zero {dist(rng) * 0U, dist(rng) * 0U}; + uint128 lhs {dist(rng), dist(rng)}; + uint128 zero {dist(rng) * 0U, dist(rng) * 0U}; const auto lhs_num {boost::int128::div(lhs, zero)}; BOOST_TEST_EQ(lhs_num.quot, 0U); BOOST_TEST_EQ(lhs_num.rem, 0U); @@ -87,26 +87,26 @@ void test_signed_div() { for (std::size_t i {}; i < N; ++i) { - int128_t lhs; - int128_t rhs; + int128 lhs; + int128 rhs; switch (layout) { case 0U: - lhs = int128_t {idist(rng), dist(rng)}; - rhs = int128_t {idist(rng), dist(rng)}; + lhs = int128 {idist(rng), dist(rng)}; + rhs = int128 {idist(rng), dist(rng)}; break; case 1U: - lhs = int128_t {idist(rng)}; - rhs = int128_t {idist(rng), dist(rng)}; + lhs = int128 {idist(rng)}; + rhs = int128 {idist(rng), dist(rng)}; break; case 2U: - lhs = int128_t {idist(rng), dist(rng)}; - rhs = int128_t {idist(rng)}; + lhs = int128 {idist(rng), dist(rng)}; + rhs = int128 {idist(rng)}; break; case 3U: - lhs = int128_t {idist(rng)}; - rhs = int128_t {idist(rng)}; + lhs = int128 {idist(rng)}; + rhs = int128 {idist(rng)}; break; default: // LCOV_EXCL_LINE BOOST_INT128_UNREACHABLE; // LCOV_EXCL_LINE @@ -121,8 +121,8 @@ void test_signed_div() BOOST_TEST_EQ(inv_div_res.rem, rhs % lhs); } - int128_t lhs {idist(rng), dist(rng)}; - int128_t zero {idist(rng) * 0, dist(rng) * 0U}; + int128 lhs {idist(rng), dist(rng)}; + int128 zero {idist(rng) * 0, dist(rng) * 0U}; const auto lhs_num {boost::int128::div(lhs, zero)}; BOOST_TEST_EQ(lhs_num.quot, 0); BOOST_TEST_EQ(lhs_num.rem, 0); diff --git a/test/test_div_primitives.cpp b/test/test_div_primitives.cpp index 694f0fef..e75b7045 100644 --- a/test/test_div_primitives.cpp +++ b/test/test_div_primitives.cpp @@ -27,14 +27,14 @@ static std::uniform_int_distribution dist(0, UINT64_MAX); // Knuth Algorithm D that the library retains. Returns quotient and remainder. static void knuth_oracle(const std::uint64_t uh, const std::uint64_t ul, const std::uint64_t vh, const std::uint64_t vl, - uint128_t& quot, uint128_t& rem) + uint128& quot, uint128& rem) { - const uint128_t u_val {uh, ul}; - const uint128_t v_val {vh, vl}; + const uint128 u_val {uh, ul}; + const uint128 v_val {vh, vl}; if (u_val < v_val) { - quot = uint128_t{UINT64_C(0)}; + quot = uint128{UINT64_C(0)}; rem = u_val; return; } @@ -48,8 +48,8 @@ static void knuth_oracle(const std::uint64_t uh, const std::uint64_t ul, detail::impl::knuth_divide(u, m, v, n, q); - quot = detail::impl::from_words(q); - rem = detail::impl::from_words(u); + quot = detail::impl::from_words(q); + rem = detail::impl::from_words(u); } static void check_div3by2(const std::uint64_t uh, const std::uint64_t ul, @@ -59,14 +59,14 @@ static void check_div3by2(const std::uint64_t uh, const std::uint64_t ul, std::uint64_t rem_lo {}; const auto q {detail::div3by2(uh, ul, vh, vl, rem_hi, rem_lo)}; - uint128_t expected_q {}; - uint128_t expected_r {}; + uint128 expected_q {}; + uint128 expected_r {}; knuth_oracle(uh, ul, vh, vl, expected_q, expected_r); // The quotient always fits in 64 bits when the divisor is >= 2^64 BOOST_TEST_EQ(expected_q.high, UINT64_C(0)); BOOST_TEST_EQ(q, expected_q.low); - BOOST_TEST_EQ(uint128_t(rem_hi, rem_lo), expected_r); + BOOST_TEST_EQ(uint128(rem_hi, rem_lo), expected_r); } static void test_div3by2_random() @@ -179,7 +179,7 @@ static void test_div3by2_boundary() const auto got_q {detail::div3by2(uh, ul, vh, vl, rem_hi, rem_lo)}; BOOST_TEST_EQ(got_q, static_cast(u_val / v_val)); - BOOST_TEST_EQ(uint128_t(rem_hi, rem_lo), static_cast(u_val % v_val)); + BOOST_TEST_EQ(uint128(rem_hi, rem_lo), static_cast(u_val % v_val)); } } } diff --git a/test/test_fmt_format.cpp b/test/test_fmt_format.cpp index 3115de79..6696c2a2 100644 --- a/test/test_fmt_format.cpp +++ b/test/test_fmt_format.cpp @@ -194,30 +194,30 @@ void test_alignment_negative() int main() { - test_empty(); - test_empty(); - test_empty_negative(); + test_empty(); + test_empty(); + test_empty_negative(); - test_binary(); - test_binary(); + test_binary(); + test_binary(); - test_octal(); - test_octal(); + test_octal(); + test_octal(); - test_decimal(); - test_decimal(); - test_decimal_negative(); + test_decimal(); + test_decimal(); + test_decimal_negative(); - test_hex(); - test_hex(); - test_hex_negative(); + test_hex(); + test_hex(); + test_hex_negative(); - test_string_insertion(); - test_string_insertion(); + test_string_insertion(); + test_string_insertion(); - test_alignment(); - test_alignment(); - test_alignment_negative(); + test_alignment(); + test_alignment(); + test_alignment_negative(); return boost::report_errors(); } diff --git a/test/test_format.cpp b/test/test_format.cpp index 98462ceb..622927e4 100644 --- a/test/test_format.cpp +++ b/test/test_format.cpp @@ -19,7 +19,7 @@ void test_empty() BOOST_TEST_CSTR_EQ(std::format("{}", T{22222}).c_str(), "22222"); BOOST_TEST_CSTR_EQ(std::format("{}", T{222222}).c_str(), "222222"); - if constexpr (std::is_same_v) + if constexpr (std::is_same_v) { BOOST_TEST_CSTR_EQ(std::format("{}", T{-2}).c_str(), "-2"); BOOST_TEST_CSTR_EQ(std::format("{}", T{-22}).c_str(), "-22"); @@ -74,7 +74,7 @@ void test_decimal() BOOST_TEST_CSTR_EQ(std::format("{:-3d}", T{42}).c_str(), " 42"); BOOST_TEST_CSTR_EQ(std::format("{:-#3d}", T{42}).c_str(), " 42"); - if constexpr (std::is_same_v) + if constexpr (std::is_same_v) { BOOST_TEST_CSTR_EQ(std::format("{: 3d}", T{42}).c_str(), " 42"); BOOST_TEST_CSTR_EQ(std::format("{: #3d}", T{42}).c_str(), " 42"); @@ -104,7 +104,7 @@ void test_hex() BOOST_TEST_CSTR_EQ(std::format("{:+X}", T{42}).c_str(), "+2A"); BOOST_TEST_CSTR_EQ(std::format("{:+#X}", T{42}).c_str(), "+0X2A"); - if constexpr (std::is_same_v) + if constexpr (std::is_same_v) { BOOST_TEST_CSTR_EQ(std::format("{:-X}", T{-42}).c_str(), "-2A"); BOOST_TEST_CSTR_EQ(std::format("{:-#X}", T{-42}).c_str(), "-0X2A"); @@ -194,27 +194,27 @@ static_assert(std::format("num: {}", 1234_u128) == "num: 1234"); int main() { - test_empty(); - test_empty(); + test_empty(); + test_empty(); - test_binary(); - test_binary(); + test_binary(); + test_binary(); - test_octal(); - test_octal(); + test_octal(); + test_octal(); - test_decimal(); - test_decimal(); + test_decimal(); + test_decimal(); - test_hex(); - test_hex(); + test_hex(); + test_hex(); - test_string_insertion(); - test_string_insertion(); + test_string_insertion(); + test_string_insertion(); - test_alignment(); - test_alignment(); - test_alignment_negative(); + test_alignment(); + test_alignment(); + test_alignment_negative(); return boost::report_errors(); } diff --git a/test/test_from_chars_bases.cpp b/test/test_from_chars_bases.cpp index 4e637c3a..269465cd 100644 --- a/test/test_from_chars_bases.cpp +++ b/test/test_from_chars_bases.cpp @@ -3,7 +3,7 @@ // https://www.boost.org/LICENSE_1_0.txt // Exercises boost::int128::detail::from_chars across every base it supports -// (2..36) for both int128_t and uint128_t. Locks in the fix to the per-iteration +// (2..36) for both int128 and uint128. Locks in the fix to the per-iteration // overflow threshold (the spurious overflow_value <<= 1 was masking MAX+1 // overflow in mini_from_chars). @@ -27,21 +27,21 @@ import boost.int128; namespace { -using boost::int128::int128_t; -using boost::int128::uint128_t; +using boost::int128::int128; +using boost::int128::uint128; -// Format a uint128_t into a base-N string (lowercase). Self-contained so the +// Format a uint128 into a base-N string (lowercase). Self-contained so the // test does not pull in boost::charconv just to generate inputs. -std::string format_unsigned(uint128_t value, int base) +std::string format_unsigned(uint128 value, int base) { - if (value == uint128_t{0U}) + if (value == uint128{0U}) { return "0"; } const auto ubase {static_cast(base)}; std::string out; - while (value != uint128_t{0U}) + while (value != uint128{0U}) { const auto digit {static_cast(value % ubase)}; const char c {digit < 10U ? static_cast('0' + digit) @@ -53,38 +53,38 @@ std::string format_unsigned(uint128_t value, int base) return out; } -std::string format_signed(int128_t value, int base) +std::string format_signed(int128 value, int base) { - if (value == int128_t{0}) + if (value == int128{0}) { return "0"; } - if (value == (std::numeric_limits::min)()) + if (value == (std::numeric_limits::min)()) { - // |INT128_MIN| does not fit in int128_t; do the magnitude in uint128_t. - const uint128_t magnitude {uint128_t{1} << 127U}; + // |INT128_MIN| does not fit in int128; do the magnitude in uint128. + const uint128 magnitude {uint128{1} << 127U}; std::string out {format_unsigned(magnitude, base)}; out.insert(out.begin(), '-'); return out; } - if (value < int128_t{0}) + if (value < int128{0}) { - std::string out {format_unsigned(static_cast(-value), base)}; + std::string out {format_unsigned(static_cast(-value), base)}; out.insert(out.begin(), '-'); return out; } - return format_unsigned(static_cast(value), base); + return format_unsigned(static_cast(value), base); } -inline std::string format_value(int128_t value, int base) +inline std::string format_value(int128 value, int base) { return format_signed(value, base); } -inline std::string format_value(uint128_t value, int base) +inline std::string format_value(uint128 value, int base) { return format_unsigned(value, base); } @@ -112,57 +112,57 @@ void check_overflow(const std::string& s, int base) void test_uint128_all_bases() { - constexpr auto max_value {(std::numeric_limits::max)()}; + constexpr auto max_value {(std::numeric_limits::max)()}; for (int base {2}; base <= 36; ++base) { // Canonical small values. - check_roundtrip(uint128_t{0U}, base); - check_roundtrip(uint128_t{1U}, base); - check_roundtrip(static_cast(static_cast(base) - 1U), base); - check_roundtrip(static_cast(static_cast(base)), base); + check_roundtrip(uint128{0U}, base); + check_roundtrip(uint128{1U}, base); + check_roundtrip(static_cast(static_cast(base) - 1U), base); + check_roundtrip(static_cast(static_cast(base)), base); // A handful of mid-range values that span the per-base digit window. - check_roundtrip(uint128_t{42U}, base); - check_roundtrip(uint128_t{1234567890U}, base); - check_roundtrip(uint128_t{0xFFFFFFFFFFFFFFFFULL}, base); - check_roundtrip(uint128_t{1U} << 100U, base); + check_roundtrip(uint128{42U}, base); + check_roundtrip(uint128{1234567890U}, base); + check_roundtrip(uint128{0xFFFFFFFFFFFFFFFFULL}, base); + check_roundtrip(uint128{1U} << 100U, base); // The boundary itself parses correctly. - check_roundtrip(max_value, base); + check_roundtrip(max_value, base); // MAX with any extra digit appended is at least MAX * base, which - // overflows uint128_t for every base in [2, 36]. + // overflows uint128 for every base in [2, 36]. const auto max_str {format_unsigned(max_value, base)}; - check_overflow(max_str + "0", base); + check_overflow(max_str + "0", base); } } void test_int128_all_bases() { - constexpr auto max_value {(std::numeric_limits::max)()}; - constexpr auto min_value {(std::numeric_limits::min)()}; + constexpr auto max_value {(std::numeric_limits::max)()}; + constexpr auto min_value {(std::numeric_limits::min)()}; for (int base {2}; base <= 36; ++base) { - check_roundtrip(int128_t{0}, base); - check_roundtrip(int128_t{1}, base); - check_roundtrip(int128_t{-1}, base); - check_roundtrip(int128_t{42}, base); - check_roundtrip(int128_t{-42}, base); - check_roundtrip(int128_t{1234567890}, base); - check_roundtrip(int128_t{-1234567890}, base); + check_roundtrip(int128{0}, base); + check_roundtrip(int128{1}, base); + check_roundtrip(int128{-1}, base); + check_roundtrip(int128{42}, base); + check_roundtrip(int128{-42}, base); + check_roundtrip(int128{1234567890}, base); + check_roundtrip(int128{-1234567890}, base); // Both signed boundaries parse correctly. - check_roundtrip(max_value, base); - check_roundtrip(min_value, base); + check_roundtrip(max_value, base); + check_roundtrip(min_value, base); // Append a digit to push past the magnitude bound on each side. const auto max_str {format_signed(max_value, base)}; - check_overflow(max_str + "0", base); + check_overflow(max_str + "0", base); const auto min_str {format_signed(min_value, base)}; - check_overflow(min_str + "0", base); + check_overflow(min_str + "0", base); } } @@ -174,38 +174,38 @@ void test_decimal_boundaries() // UINT128_MAX exactly. { const std::string s {"340282366920938463463374607431768211455"}; - uint128_t v {}; + uint128 v {}; const auto r {boost::int128::detail::from_chars(s.data(), s.data() + s.size(), v)}; BOOST_TEST_LT(r, 0); - BOOST_TEST(v == (std::numeric_limits::max)()); + BOOST_TEST(v == (std::numeric_limits::max)()); } // UINT128_MAX + 1. - check_overflow("340282366920938463463374607431768211456", 10); + check_overflow("340282366920938463463374607431768211456", 10); // INT128_MAX exactly. { const std::string s {"170141183460469231731687303715884105727"}; - int128_t v {}; + int128 v {}; const auto r {boost::int128::detail::from_chars(s.data(), s.data() + s.size(), v)}; BOOST_TEST_LT(r, 0); - BOOST_TEST(v == (std::numeric_limits::max)()); + BOOST_TEST(v == (std::numeric_limits::max)()); } // INT128_MAX + 1. - check_overflow("170141183460469231731687303715884105728", 10); + check_overflow("170141183460469231731687303715884105728", 10); // INT128_MIN exactly. { const std::string s {"-170141183460469231731687303715884105728"}; - int128_t v {}; + int128 v {}; const auto r {boost::int128::detail::from_chars(s.data(), s.data() + s.size(), v)}; BOOST_TEST_LT(r, 0); - BOOST_TEST(v == (std::numeric_limits::min)()); + BOOST_TEST(v == (std::numeric_limits::min)()); } // INT128_MIN - 1. - check_overflow("-170141183460469231731687303715884105729", 10); + check_overflow("-170141183460469231731687303715884105729", 10); } void test_invalid_inputs() @@ -213,7 +213,7 @@ void test_invalid_inputs() // Empty range is EINVAL. { const char* s {""}; - uint128_t v {}; + uint128 v {}; const auto r {boost::int128::detail::from_chars(s, s, v)}; BOOST_TEST_EQ(r, EINVAL); } @@ -221,7 +221,7 @@ void test_invalid_inputs() // Lone sign is EINVAL. { const std::string s {"-"}; - int128_t v {}; + int128 v {}; const auto r {boost::int128::detail::from_chars(s.data(), s.data() + s.size(), v)}; BOOST_TEST_EQ(r, EINVAL); } @@ -229,7 +229,7 @@ void test_invalid_inputs() // Leading sign on the unsigned overload is EINVAL. { const std::string s {"-1"}; - uint128_t v {}; + uint128 v {}; const auto r {boost::int128::detail::from_chars(s.data(), s.data() + s.size(), v)}; BOOST_TEST_EQ(r, EINVAL); } diff --git a/test/test_gcd_lcm.cpp b/test/test_gcd_lcm.cpp index 7d645c4c..bf0b390b 100644 --- a/test/test_gcd_lcm.cpp +++ b/test/test_gcd_lcm.cpp @@ -152,19 +152,19 @@ void test_negative_value() // These should always return positive values // Also exercises our constexpr-ness - constexpr int128_t p {2 * 2 * 3}; - constexpr int128_t q {2 * 3 * 3}; + constexpr int128 p {2 * 2 * 3}; + constexpr int128 q {2 * 3 * 3}; static_assert(2 * 3 == gcd(p, q), "Wrong"); - static_assert(gcd(int128_t{6}, int128_t{10}) == 2, "Wrong"); - static_assert(gcd(int128_t{6}, int128_t{-10}) == 2, "Wrong"); - static_assert(gcd(int128_t{-6}, int128_t{-10}) == 2, "Wrong"); + static_assert(gcd(int128{6}, int128{10}) == 2, "Wrong"); + static_assert(gcd(int128{6}, int128{-10}) == 2, "Wrong"); + static_assert(gcd(int128{-6}, int128{-10}) == 2, "Wrong"); - static_assert(gcd(int128_t{24}, int128_t{0}) == 24, "Wrong"); - static_assert(gcd(int128_t{-24}, int128_t{0}) == 24, "Wrong"); + static_assert(gcd(int128{24}, int128{0}) == 24, "Wrong"); + static_assert(gcd(int128{-24}, int128{0}) == 24, "Wrong"); - static_assert(gcd(int128_t{0}, int128_t{24}) == 24, "Wrong"); - static_assert(gcd(int128_t{0}, int128_t{-24}) == 24, "Wrong"); + static_assert(gcd(int128{0}, int128{24}) == 24, "Wrong"); + static_assert(gcd(int128{0}, int128{-24}) == 24, "Wrong"); } #ifdef _MSC_VER @@ -173,13 +173,13 @@ void test_negative_value() int main() { - test_gcd(); - test_lcm(); - test_gcd_lcm_properties(); + test_gcd(); + test_lcm(); + test_gcd_lcm_properties(); - test_gcd(); - test_lcm(); - test_gcd_lcm_properties(); + test_gcd(); + test_lcm(); + test_gcd_lcm_properties(); test_negative_value(); return boost::report_errors(); diff --git a/test/test_has_single_bit.cu b/test/test_has_single_bit.cu index 3dd4985a..b141a694 100644 --- a/test/test_has_single_bit.cu +++ b/test/test_has_single_bit.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, bool *out, int numElements) { diff --git a/test/test_has_single_bit_sycl.cpp b/test/test_has_single_bit_sycl.cpp index 53089127..6bee28ba 100644 --- a/test/test_has_single_bit_sycl.cpp +++ b/test/test_has_single_bit_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return static_cast(boost::int128::has_single_bit(a)); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return static_cast(boost::int128::has_single_bit(a)); }); } diff --git a/test/test_hash.cpp b/test/test_hash.cpp index a3b54c5e..69db781e 100644 --- a/test/test_hash.cpp +++ b/test/test_hash.cpp @@ -23,89 +23,89 @@ import boost.int128; void test_uint128_equivalent_hashes() { - using boost::int128::uint128_t; + using boost::int128::uint128; - std::hash hasher {}; + std::hash hasher {}; // Same value built different ways must hash identically - const uint128_t a {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE)}; - const uint128_t b {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE)}; + const uint128 a {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE)}; + const uint128 b {UINT64_C(0xDEADBEEF), UINT64_C(0xCAFEBABE)}; BOOST_TEST_EQ(hasher(a), hasher(b)); // Equality across assignment - uint128_t c {}; + uint128 c {}; c = a; BOOST_TEST_EQ(hasher(a), hasher(c)); // Zero hashes to a stable value - const uint128_t zero1 {}; - const uint128_t zero2 {0}; + const uint128 zero1 {}; + const uint128 zero2 {0}; BOOST_TEST_EQ(hasher(zero1), hasher(zero2)); // Values constructed from a small integer match equivalent two-word form - const uint128_t small_a {42}; - const uint128_t small_b {0, 42}; + const uint128 small_a {42}; + const uint128 small_b {0, 42}; BOOST_TEST_EQ(hasher(small_a), hasher(small_b)); } void test_int128_equivalent_hashes() { - using boost::int128::int128_t; + using boost::int128::int128; - std::hash hasher {}; + std::hash hasher {}; - const int128_t a {INT64_C(-1), UINT64_C(0xCAFEBABE)}; - const int128_t b {INT64_C(-1), UINT64_C(0xCAFEBABE)}; + const int128 a {INT64_C(-1), UINT64_C(0xCAFEBABE)}; + const int128 b {INT64_C(-1), UINT64_C(0xCAFEBABE)}; BOOST_TEST_EQ(hasher(a), hasher(b)); - int128_t c {}; + int128 c {}; c = a; BOOST_TEST_EQ(hasher(a), hasher(c)); - const int128_t zero1 {}; - const int128_t zero2 {0}; + const int128 zero1 {}; + const int128 zero2 {0}; BOOST_TEST_EQ(hasher(zero1), hasher(zero2)); - const int128_t pos_a {42}; - const int128_t pos_b {0, 42}; + const int128 pos_a {42}; + const int128 pos_b {0, 42}; BOOST_TEST_EQ(hasher(pos_a), hasher(pos_b)); } void test_int128_negative_no_collision_with_absolute() { - using boost::int128::int128_t; + using boost::int128::int128; - std::hash hasher {}; + std::hash hasher {}; // hash(-x) must not equal hash(x) for non-zero x for (std::int64_t i {1}; i <= 1024; ++i) { - const int128_t pos {i}; - const int128_t neg {-i}; + const int128 pos {i}; + const int128 neg {-i}; BOOST_TEST_NE(hasher(pos), hasher(neg)); } // Larger magnitudes including values that span beyond 64 bits - const int128_t big_pos {INT64_C(0x0000000100000000), UINT64_C(0)}; - const int128_t big_neg {-big_pos}; + const int128 big_pos {INT64_C(0x0000000100000000), UINT64_C(0)}; + const int128 big_neg {-big_pos}; BOOST_TEST_NE(hasher(big_pos), hasher(big_neg)); // Values whose low word matches their negation's low word arithmetic (mod 2^64) are still distinct - const int128_t one {1}; - const int128_t minus_one {-1}; + const int128 one {1}; + const int128 minus_one {-1}; BOOST_TEST_NE(hasher(one), hasher(minus_one)); // INT128_MIN and a value with the same low word but opposite high word - const int128_t edge_pos {1}; - const int128_t edge_neg {-1}; + const int128 edge_pos {1}; + const int128 edge_neg {-1}; BOOST_TEST_NE(hasher(edge_pos), hasher(edge_neg)); } void test_hash_distribution_uint128() { - using boost::int128::uint128_t; + using boost::int128::uint128; - std::hash hasher {}; + std::hash hasher {}; std::unordered_set seen {}; // A few thousand random values should produce nearly distinct hashes @@ -113,7 +113,7 @@ void test_hash_distribution_uint128() constexpr int num_samples {4096}; for (int i {0}; i < num_samples; ++i) { - const uint128_t v {rng(), rng()}; + const uint128 v {rng(), rng()}; seen.insert(hasher(v)); } @@ -123,16 +123,16 @@ void test_hash_distribution_uint128() void test_hash_distribution_int128() { - using boost::int128::int128_t; + using boost::int128::int128; - std::hash hasher {}; + std::hash hasher {}; std::unordered_set seen {}; std::mt19937_64 rng {123}; constexpr int num_samples {4096}; for (int i {0}; i < num_samples; ++i) { - const int128_t v {static_cast(rng()), rng()}; + const int128 v {static_cast(rng()), rng()}; seen.insert(hasher(v)); } @@ -141,47 +141,47 @@ void test_hash_distribution_int128() void test_use_in_unordered_map_uint128() { - using boost::int128::uint128_t; - - std::unordered_map map {}; - map[uint128_t{0, 1}] = 1; - map[uint128_t{0, 2}] = 2; - map[uint128_t{1, 0}] = 3; - map[uint128_t{UINT64_MAX, UINT64_MAX}] = 4; - - BOOST_TEST_EQ((map[uint128_t{0, 1}]), 1); - BOOST_TEST_EQ((map[uint128_t{0, 2}]), 2); - BOOST_TEST_EQ((map[uint128_t{1, 0}]), 3); - BOOST_TEST_EQ((map[uint128_t{UINT64_MAX, UINT64_MAX}]), 4); + using boost::int128::uint128; + + std::unordered_map map {}; + map[uint128{0, 1}] = 1; + map[uint128{0, 2}] = 2; + map[uint128{1, 0}] = 3; + map[uint128{UINT64_MAX, UINT64_MAX}] = 4; + + BOOST_TEST_EQ((map[uint128{0, 1}]), 1); + BOOST_TEST_EQ((map[uint128{0, 2}]), 2); + BOOST_TEST_EQ((map[uint128{1, 0}]), 3); + BOOST_TEST_EQ((map[uint128{UINT64_MAX, UINT64_MAX}]), 4); BOOST_TEST_EQ(map.size(), (std::size_t {4})); } void test_use_in_unordered_map_int128() { - using boost::int128::int128_t; - - std::unordered_map map {}; - map[int128_t{0, 1}] = 1; - map[int128_t{-1, UINT64_MAX}] = 2; - map[int128_t{1, 0}] = 3; - map[int128_t{-1, 0}] = 4; - - BOOST_TEST_EQ((map[int128_t{0, 1}]), 1); - BOOST_TEST_EQ((map[int128_t{-1, UINT64_MAX}]), 2); - BOOST_TEST_EQ((map[int128_t{1, 0}]), 3); - BOOST_TEST_EQ((map[int128_t{-1, 0}]), 4); + using boost::int128::int128; + + std::unordered_map map {}; + map[int128{0, 1}] = 1; + map[int128{-1, UINT64_MAX}] = 2; + map[int128{1, 0}] = 3; + map[int128{-1, 0}] = 4; + + BOOST_TEST_EQ((map[int128{0, 1}]), 1); + BOOST_TEST_EQ((map[int128{-1, UINT64_MAX}]), 2); + BOOST_TEST_EQ((map[int128{1, 0}]), 3); + BOOST_TEST_EQ((map[int128{-1, 0}]), 4); BOOST_TEST_EQ(map.size(), (std::size_t {4})); } void test_high_low_swap_not_colliding() { - using boost::int128::uint128_t; + using boost::int128::uint128; - std::hash hasher {}; + std::hash hasher {}; // hash({a, b}) should not equal hash({b, a}) in general - const uint128_t a {UINT64_C(0x1111), UINT64_C(0x2222)}; - const uint128_t b {UINT64_C(0x2222), UINT64_C(0x1111)}; + const uint128 a {UINT64_C(0x1111), UINT64_C(0x2222)}; + const uint128 b {UINT64_C(0x2222), UINT64_C(0x1111)}; BOOST_TEST_NE(hasher(a), hasher(b)); } diff --git a/test/test_i128.cpp b/test/test_i128.cpp index ad053d68..facd2241 100644 --- a/test/test_i128.cpp +++ b/test/test_i128.cpp @@ -161,7 +161,7 @@ void test_arithmetic_constructor() { const IntType value {dist(rng)}; builtin_i128 builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; builtin_i128 emulated_bits; std::memcpy(&emulated_bits, &emulated_value, sizeof(builtin_i128)); @@ -181,7 +181,7 @@ void test_assignment_operators() const IntType value {dist(rng)}; builtin_i128 builtin_value; builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {}; + boost::int128::int128 emulated_value {}; emulated_value = value; builtin_i128 emulated_bits; @@ -202,7 +202,7 @@ void test_integer_conversion_operators() const IntType value {dist(rng)}; builtin_i128 builtin_value; builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {}; + boost::int128::int128 emulated_value {}; emulated_value = value; const auto builtin_value_return = static_cast(builtin_value); @@ -214,7 +214,7 @@ void test_integer_conversion_operators() if (builtin_value) { BOOST_TEST(emulated_value); - const boost::int128::int128_t high_only {static_cast(builtin_value), 0}; + const boost::int128::int128 high_only {static_cast(builtin_value), 0}; BOOST_TEST(high_only); } } @@ -239,7 +239,7 @@ void test_float_conversion_operators() const auto value {dist(rng)}; // LCOV_EXCL_LINE builtin_i128 builtin_value; builtin_value = static_cast(value) << 64 | static_cast(value); - boost::int128::int128_t emulated_value {static_cast(value), value}; + boost::int128::int128 emulated_value {static_cast(value), value}; // Converts the value and then normalizes the range const auto builtin_value_return = static_cast(builtin_value) / static_cast(1e27L); @@ -258,7 +258,7 @@ void test_float_conversion_operators() const auto value {dist(rng)}; // LCOV_EXCL_LINE builtin_u128 builtin_value; builtin_value = value; - boost::int128::int128_t emulated_value {}; + boost::int128::int128 emulated_value {}; emulated_value = value; const auto builtin_value_return = static_cast(builtin_value); @@ -283,7 +283,7 @@ void test_unary_plus() const IntType value {dist(rng)}; builtin_i128 builtin_value = static_cast(value); builtin_value = +builtin_value; - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; emulated_value = +emulated_value; builtin_i128 emulated_bits; @@ -304,7 +304,7 @@ void test_unary_minus() const IntType value {dist(rng)}; auto builtin_value = static_cast(value); builtin_value = -builtin_value; - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; emulated_value = -emulated_value; builtin_i128 emulated_bits; @@ -325,7 +325,7 @@ void test_operator_equality() { const IntType value {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value == emulated_value) == (emulated_value == value)) == ((value == builtin_value) == (builtin_value == value))); @@ -337,26 +337,26 @@ void test_operator_equality() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 == emulated_value) == (emulated_value == value2)) == ((value2 == builtin_value) == (builtin_value == value2))); } // Never equal - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128)) { for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::int128_t emulated_value {1, static_cast(value)}; + boost::int128::int128 emulated_value {1, static_cast(value)}; BOOST_TEST((value == emulated_value) == (emulated_value == value)); } } - const boost::int128::int128_t bool_val {dist(rng)}; + const boost::int128::int128 bool_val {dist(rng)}; BOOST_TEST((true == bool_val) == (bool_val == true)); - const boost::int128::int128_t bool_val2 {static_cast(dist(rng)), 0}; + const boost::int128::int128 bool_val2 {static_cast(dist(rng)), 0}; BOOST_TEST((true == bool_val2) == (bool_val2 == true)); BOOST_TEST(!(bool_val == bool_val2)); BOOST_TEST(bool_val == bool_val); @@ -376,7 +376,7 @@ void test_operator_inequality() { const IntType value {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value != emulated_value) == (emulated_value != value)) == ((value != builtin_value) == (builtin_value != value))); @@ -388,26 +388,26 @@ void test_operator_inequality() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 != emulated_value) == (emulated_value != value2)) == ((value2 != builtin_value) == (builtin_value != value2))); } // Never equal - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128)) { for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::int128_t emulated_value {1, static_cast(value)}; + boost::int128::int128 emulated_value {1, static_cast(value)}; BOOST_TEST((value != emulated_value) == (emulated_value != value)); } } - const boost::int128::int128_t bool_val {dist(rng)}; + const boost::int128::int128 bool_val {dist(rng)}; BOOST_TEST((true != bool_val) == (bool_val != true)); - const boost::int128::int128_t bool_val2 {static_cast(dist(rng)), 0}; + const boost::int128::int128 bool_val2 {static_cast(dist(rng)), 0}; BOOST_TEST((true != bool_val2) == (bool_val2 != true)); BOOST_TEST(bool_val != bool_val2); BOOST_TEST(!(bool_val != bool_val)); @@ -427,18 +427,18 @@ void test_operator_less() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 < emulated_value) == (value2 < builtin_value)) == ((emulated_value < value2) == (builtin_value < value2))); } - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128_t) && std::is_unsigned::value) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128) && std::is_unsigned::value) { for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::int128_t emulated_value {-1, static_cast(value)}; + boost::int128::int128 emulated_value {-1, static_cast(value)}; BOOST_TEST((value < emulated_value) != (emulated_value < value)); } } @@ -455,18 +455,18 @@ void test_operator_greater() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 > emulated_value) == (value2 > builtin_value)) == ((emulated_value > value2) == (builtin_value > value2))); } - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128_t) && std::is_unsigned::value) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128) && std::is_unsigned::value) { for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::int128_t emulated_value {-1, static_cast(value)}; + boost::int128::int128 emulated_value {-1, static_cast(value)}; BOOST_TEST((value > emulated_value) != (emulated_value > value)); } } @@ -483,7 +483,7 @@ void test_operator_le() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 <= emulated_value) == (value2 <= builtin_value)) == ((emulated_value <= value2) == (builtin_value <= value2))); @@ -501,7 +501,7 @@ void test_operator_ge() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 >= emulated_value) == (value2 >= builtin_value)) == ((emulated_value >= value2) == (builtin_value >= value2))); @@ -518,7 +518,7 @@ void test_operator_not() { const IntType value {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(~emulated_value == ~builtin_value); } @@ -535,7 +535,7 @@ void test_operator_or() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value |= value2; @@ -570,7 +570,7 @@ void test_operator_and() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value &= value2; @@ -605,7 +605,7 @@ void test_operator_xor() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value ^= value2; @@ -642,7 +642,7 @@ void test_operator_left_shift() const IntType value {dist(rng)}; const unsigned shift_value {shift_dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; // Test 1: Test the <<= operator auto builtin_copy = builtin_value; @@ -678,7 +678,7 @@ void test_operator_left_shift() // documentation), so only the well-defined in-range counts are exercised. // The constant-evaluated (default_ls_impl) path must agree with the runtime // path for every in-range count. - const boost::int128::int128_t val {UINT64_MAX}; + const boost::int128::int128 val {UINT64_MAX}; BOOST_TEST((val << 0) == val); for (unsigned s {}; s < 128U; ++s) { @@ -699,7 +699,7 @@ void test_operator_right_shift() const IntType value {dist(rng)}; const unsigned shift_value {shift_dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; // Test 1: Test the >>= operator auto builtin_copy = builtin_value; @@ -735,8 +735,8 @@ void test_operator_right_shift() // documentation), so only the well-defined in-range counts are exercised. // Both a positive and a negative value are checked so the arithmetic // (sign-extending) right shift is covered for every in-range count. - const boost::int128::int128_t val {UINT64_MAX}; - const boost::int128::int128_t neg {-(boost::int128::int128_t{1} << 96)}; + const boost::int128::int128 val {UINT64_MAX}; + const boost::int128::int128 neg {-(boost::int128::int128{1} << 96)}; BOOST_TEST((val >> 0) == val); for (unsigned s {}; s < 128U; ++s) { @@ -747,7 +747,7 @@ void test_operator_right_shift() void test_increment_operator() { - boost::int128::int128_t emulated_value {INT64_MAX - N/2}; + boost::int128::int128 emulated_value {INT64_MAX - N/2}; builtin_i128 builtin_value {INT64_MAX - N/2}; for (std::size_t i {}; i < N; ++i) @@ -778,7 +778,7 @@ void test_operator_add() } auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value += value2; @@ -788,7 +788,7 @@ void test_operator_add() // Edge case where we go from low word to high word builtin_i128 builtin_value = UINT64_MAX - 2U; - boost::int128::int128_t emulated_value = UINT64_MAX - 2U; + boost::int128::int128 emulated_value = UINT64_MAX - 2U; for (std::size_t i {}; i < N; ++i) { @@ -815,7 +815,7 @@ void test_operator_sub() } auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; // Avoid UB from signed rollover if (value > value2) @@ -833,7 +833,7 @@ void test_operator_sub() // Edge case where we go from high word to low word builtin_i128 builtin_value = UINT64_MAX; builtin_value += 10; - boost::int128::int128_t emulated_value = UINT64_MAX; + boost::int128::int128 emulated_value = UINT64_MAX; emulated_value += 10; for (std::size_t i {}; i < N; ++i) @@ -853,7 +853,7 @@ void test_operator_mul() IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value *= value2; @@ -874,7 +874,7 @@ void test_operator_div() BOOST_INT128_IF_CONSTEXPR(std::is_same::value) { IntType value {24}; - boost::int128::int128_t emulated_value {48}; + boost::int128::int128 emulated_value {48}; BOOST_TEST(emulated_value / value == 2); BOOST_TEST(value / emulated_value == 0); emulated_value /= value; @@ -901,7 +901,7 @@ void test_operator_div() } auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value /= value2; @@ -917,7 +917,7 @@ void test_operator_div() } // Test 2 word by 1 word and 1 word by 2 word - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t) && sizeof(IntType) > sizeof(char)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128) && sizeof(IntType) > sizeof(char)) { for (std::size_t i {}; i < N; ++i) { @@ -934,9 +934,9 @@ void test_operator_div() value2 = dist(rng); // LCOV_EXCL_LINE } - const boost::int128::int128_t emulated_value {static_cast(value), static_cast(value)}; + const boost::int128::int128 emulated_value {static_cast(value), static_cast(value)}; const auto builtin_value = static_cast(emulated_value); - const boost::int128::int128_t small_emulated_value {0, static_cast(value)}; + const boost::int128::int128 small_emulated_value {0, static_cast(value)}; auto check_1_value {emulated_value}; check_1_value /= value2; @@ -951,7 +951,7 @@ void test_operator_div() BOOST_TEST((value2 / emulated_value) == (value2 / builtin_value)); // Forces decision process - const boost::int128::int128_t check_2_value {value2}; + const boost::int128::int128 check_2_value {value2}; BOOST_TEST(check_1_value == (emulated_value / check_2_value)); // Division by zero is undefined behavior (matching the builtin __int128 types), so it is not tested. @@ -963,9 +963,9 @@ void test_operator_div() } // Check large value - constexpr auto lhs {(std::numeric_limits::max)()}; - constexpr boost::int128::int128_t rhs {0x1, UINT64_MAX}; - constexpr boost::int128::int128_t res {UINT64_C(0x4000000000000000)}; + constexpr auto lhs {(std::numeric_limits::max)()}; + constexpr boost::int128::int128 rhs {0x1, UINT64_MAX}; + constexpr boost::int128::int128 res {UINT64_C(0x4000000000000000)}; BOOST_TEST(lhs / rhs == res); } @@ -983,7 +983,7 @@ void test_operator_mod() BOOST_INT128_IF_CONSTEXPR(std::is_same::value) { IntType value {24}; - boost::int128::int128_t emulated_value {48}; + boost::int128::int128 emulated_value {48}; BOOST_TEST(emulated_value % value == 0); BOOST_TEST(value % emulated_value == 24); emulated_value %= value; @@ -1010,14 +1010,14 @@ void test_operator_mod() } // With too large an unsigned __int128 value we end up with bitwise equal but signed results - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) == sizeof(boost::int128::int128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) == sizeof(boost::int128::int128)) { value >>= 2; value2 >>= 2; } auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value %= value2; @@ -1033,7 +1033,7 @@ void test_operator_mod() } // Test 2 word by 1 word and 1 word by 2 word - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t) && sizeof(IntType) > sizeof(char)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128) && sizeof(IntType) > sizeof(char)) { for (std::size_t i {}; i < N; ++i) { @@ -1050,9 +1050,9 @@ void test_operator_mod() value2 = dist(rng); // LCOV_EXCL_LINE } - const boost::int128::int128_t emulated_value {static_cast(value), static_cast(value)}; + const boost::int128::int128 emulated_value {static_cast(value), static_cast(value)}; const auto builtin_value = static_cast(emulated_value); - const boost::int128::int128_t small_emulated_value {0, static_cast(value)}; + const boost::int128::int128 small_emulated_value {0, static_cast(value)}; auto check_1_value {emulated_value}; check_1_value %= value2; @@ -1067,7 +1067,7 @@ void test_operator_mod() BOOST_TEST((value2 % emulated_value) == (value2 % builtin_value)); // Forces decision process - const boost::int128::int128_t check_2_value {value2}; + const boost::int128::int128 check_2_value {value2}; BOOST_TEST(check_1_value == (emulated_value % check_2_value)); // Remainder by zero is undefined behavior (matching the builtin __int128 types), so it is not tested. @@ -1088,7 +1088,7 @@ void test_abs() for (std::size_t i {}; i < N; ++i) { const auto value {dist(rng)}; - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto builtin_value = static_cast(value); if (value < 0) @@ -1120,7 +1120,7 @@ void test_abs() value /= 100; } - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto builtin_value = static_cast(value); BOOST_TEST(abs(emulated_value) == emulated_value); @@ -1132,7 +1132,7 @@ template void test_spot_mod(const IntType value, const IntType value2) { auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value{value}; + boost::int128::int128 emulated_value{value}; auto check_1_value{emulated_value}; check_1_value %= value2; @@ -1258,7 +1258,7 @@ void test_operator_equality() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value == emulated_value) == (emulated_value == value))); } @@ -1268,25 +1268,25 @@ void test_operator_equality() { const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 == emulated_value) == (emulated_value == value2))); } // Never equal - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128)) { for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::int128_t emulated_value {1, static_cast(value)}; + boost::int128::int128 emulated_value {1, static_cast(value)}; BOOST_TEST((value == emulated_value) == (emulated_value == value)); } } - const boost::int128::int128_t bool_val {dist(rng)}; + const boost::int128::int128 bool_val {dist(rng)}; BOOST_TEST((true == bool_val) == (bool_val == true)); - const boost::int128::int128_t bool_val2 {static_cast(dist(rng)), 0}; + const boost::int128::int128 bool_val2 {static_cast(dist(rng)), 0}; BOOST_TEST((true == bool_val2) == (bool_val2 == true)); BOOST_TEST(!(bool_val == bool_val2)); BOOST_TEST(bool_val == bool_val); @@ -1305,7 +1305,7 @@ void test_operator_inequality() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value != emulated_value) == (emulated_value != value))); } @@ -1315,25 +1315,25 @@ void test_operator_inequality() { const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 != emulated_value) == (emulated_value != value2))); } // Never equal - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::int128)) { for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::int128_t emulated_value {1, static_cast(value)}; + boost::int128::int128 emulated_value {1, static_cast(value)}; BOOST_TEST((value != emulated_value) == (emulated_value != value)); } } - const boost::int128::int128_t bool_val {dist(rng)}; + const boost::int128::int128 bool_val {dist(rng)}; BOOST_TEST((true != bool_val) == (bool_val != true)); - const boost::int128::int128_t bool_val2 {static_cast(dist(rng)), 0}; + const boost::int128::int128 bool_val2 {static_cast(dist(rng)), 0}; BOOST_TEST((true != bool_val2) == (bool_val2 != true)); BOOST_TEST(bool_val != bool_val2); BOOST_TEST(!(bool_val != bool_val)); @@ -1358,7 +1358,7 @@ void test_operator_less() value2 = dist(rng); } - const boost::int128::int128_t emulated_value {value}; + const boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 < emulated_value) != (emulated_value < value2))); } @@ -1367,7 +1367,7 @@ void test_operator_less() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - const boost::int128::int128_t emulated_value {value}; + const boost::int128::int128 emulated_value {value}; BOOST_TEST(((value < emulated_value) == (emulated_value < value))); } @@ -1389,7 +1389,7 @@ void test_operator_greater() value2 = dist(rng); } - const boost::int128::int128_t emulated_value {value}; + const boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 > emulated_value) != (emulated_value > value2))); } @@ -1398,7 +1398,7 @@ void test_operator_greater() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - const boost::int128::int128_t emulated_value {value}; + const boost::int128::int128 emulated_value {value}; BOOST_TEST(((value > emulated_value) == (emulated_value > value))); } @@ -1415,7 +1415,7 @@ void test_operator_le() { const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; - const boost::int128::int128_t emulated_value {value}; + const boost::int128::int128 emulated_value {value}; if (value == value2) { @@ -1431,7 +1431,7 @@ void test_operator_le() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - const boost::int128::int128_t emulated_value {value}; + const boost::int128::int128 emulated_value {value}; BOOST_TEST(((value <= emulated_value) == (emulated_value <= value))); } @@ -1447,7 +1447,7 @@ void test_operator_ge() { const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; - const boost::int128::int128_t emulated_value {value}; + const boost::int128::int128 emulated_value {value}; if (value == value2) { @@ -1463,7 +1463,7 @@ void test_operator_ge() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - const boost::int128::int128_t emulated_value {value}; + const boost::int128::int128 emulated_value {value}; BOOST_TEST(((value >= emulated_value) == (emulated_value >= value))); } @@ -1480,8 +1480,8 @@ void test_operator_add() const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE const IntType res = value + value2; - boost::int128::int128_t test_value {value}; - const boost::int128::int128_t test_value2 {value2}; + boost::int128::int128 test_value {value}; + const boost::int128::int128 test_value2 {value2}; BOOST_TEST(test_value + test_value2 == res); // LCOV_EXCL_LINE test_value += value2; @@ -1489,8 +1489,8 @@ void test_operator_add() } // Known Values - boost::int128::int128_t test_value {UINT64_MAX}; - boost::int128::int128_t correct_value {1, 0}; + boost::int128::int128 test_value {UINT64_MAX}; + boost::int128::int128 correct_value {1, 0}; BOOST_TEST_EQ(test_value + 1, correct_value); BOOST_TEST_EQ(test_value + UINT64_MAX, correct_value + (UINT64_MAX - 1U)); @@ -1514,8 +1514,8 @@ void test_operator_sub() const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE const IntType res = value - value2; - boost::int128::int128_t test_value {value}; - const boost::int128::int128_t test_value2 {value2}; + boost::int128::int128 test_value {value}; + const boost::int128::int128 test_value2 {value2}; BOOST_TEST(test_value - test_value2 == res); // LCOV_EXCL_LINE test_value -= value2; @@ -1523,8 +1523,8 @@ void test_operator_sub() } // Known Values - boost::int128::int128_t correct_value {UINT64_MAX}; - boost::int128::int128_t test_value {1, 0}; + boost::int128::int128 correct_value {UINT64_MAX}; + boost::int128::int128 test_value {1, 0}; BOOST_TEST_EQ(test_value - 1, correct_value); BOOST_TEST_EQ(test_value - INT64_MAX, correct_value - (INT64_MAX - 1U)); @@ -1546,8 +1546,8 @@ void test_operator_mul() const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE const IntType res = value * value2; - boost::int128::int128_t test_value {value}; - const boost::int128::int128_t test_value2 {value2}; + boost::int128::int128 test_value {value}; + const boost::int128::int128 test_value2 {value2}; BOOST_TEST(test_value * test_value2 == res); // LCOV_EXCL_LINE @@ -1555,8 +1555,8 @@ void test_operator_mul() BOOST_TEST(test_value == res); // LCOV_EXCL_LINE } - boost::int128::int128_t shift_val {1}; - boost::int128::int128_t mul_val {1}; + boost::int128::int128 shift_val {1}; + boost::int128::int128 mul_val {1}; for (std::size_t i {1}; i < 127; ++i) { @@ -1593,8 +1593,8 @@ void test_operator_div() const IntType res = value / value2; - boost::int128::int128_t test_value {value}; - const boost::int128::int128_t test_value2 {value2}; + boost::int128::int128 test_value {value}; + const boost::int128::int128 test_value2 {value2}; BOOST_TEST(test_value / test_value2 == res); // LCOV_EXCL_LINE @@ -1602,21 +1602,21 @@ void test_operator_div() BOOST_TEST(test_value == res); // LCOV_EXCL_LINE } - boost::int128::int128_t shift_val {INT64_MAX, UINT64_MAX}; - boost::int128::int128_t mul_val {INT64_MAX, UINT64_MAX}; + boost::int128::int128 shift_val {INT64_MAX, UINT64_MAX}; + boost::int128::int128 mul_val {INT64_MAX, UINT64_MAX}; for (std::size_t i {2}; i < 126; ++i) { const auto current_shift_val {shift_val >> i}; - const auto current_mul_val {mul_val / (boost::int128::int128_t{2} << (i-1))}; + const auto current_mul_val {mul_val / (boost::int128::int128{2} << (i-1))}; BOOST_TEST(current_shift_val == current_mul_val); // LCOV_EXCL_LINE } // Check large value - constexpr auto lhs {(std::numeric_limits::max)()}; - constexpr boost::int128::int128_t rhs {0x1, UINT64_MAX}; - constexpr boost::int128::int128_t res {UINT64_C(0x4000000000000000)}; + constexpr auto lhs {(std::numeric_limits::max)()}; + constexpr boost::int128::int128 rhs {0x1, UINT64_MAX}; + constexpr boost::int128::int128 res {UINT64_C(0x4000000000000000)}; BOOST_TEST(lhs / rhs == res); } diff --git a/test/test_i128_no_sign_conv.cpp b/test/test_i128_no_sign_conv.cpp index 299156f2..71751650 100644 --- a/test/test_i128_no_sign_conv.cpp +++ b/test/test_i128_no_sign_conv.cpp @@ -151,7 +151,7 @@ void test_arithmetic_constructor() { const IntType value {dist(rng)}; // LCOV_EXCL_LINE builtin_i128 builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; builtin_i128 emulated_bits; std::memcpy(&emulated_bits, &emulated_value, sizeof(builtin_i128)); @@ -171,7 +171,7 @@ void test_assignment_operators() const IntType value {dist(rng)}; // LCOV_EXCL_LINE builtin_i128 builtin_value; builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {}; + boost::int128::int128 emulated_value {}; emulated_value = value; builtin_i128 emulated_bits; @@ -192,7 +192,7 @@ void test_integer_conversion_operators() const IntType value {dist(rng)}; // LCOV_EXCL_LINE builtin_i128 builtin_value; builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {}; + boost::int128::int128 emulated_value {}; emulated_value = value; const auto builtin_value_return = static_cast(builtin_value); @@ -227,7 +227,7 @@ void test_float_conversion_operators() const auto value {dist(rng)}; // LCOV_EXCL_LINE builtin_i128 builtin_value; builtin_value = static_cast(value) << 64 | static_cast(value); - boost::int128::int128_t emulated_value {static_cast(value), value}; + boost::int128::int128 emulated_value {static_cast(value), value}; // Converts the value and then normalizes the range const auto builtin_value_return = static_cast(builtin_value) / static_cast(1e27L); @@ -246,7 +246,7 @@ void test_float_conversion_operators() const auto value {dist(rng)}; // LCOV_EXCL_LINE builtin_u128 builtin_value; builtin_value = value; - boost::int128::int128_t emulated_value {}; + boost::int128::int128 emulated_value {}; emulated_value = value; const auto builtin_value_return = static_cast(builtin_value); @@ -271,7 +271,7 @@ void test_unary_plus() const IntType value {dist(rng)}; // LCOV_EXCL_LINE builtin_i128 builtin_value = static_cast(value); builtin_value = +builtin_value; - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; emulated_value = +emulated_value; builtin_i128 emulated_bits; @@ -292,7 +292,7 @@ void test_unary_minus() const IntType value {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); builtin_value = -builtin_value; - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; emulated_value = -emulated_value; builtin_i128 emulated_bits; @@ -313,7 +313,7 @@ void test_operator_equality() { const IntType value {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value == emulated_value) == (emulated_value == value)) == ((value == builtin_value) == (builtin_value == value))); // LCOV_EXCL_LINE } @@ -324,12 +324,12 @@ void test_operator_equality() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 == emulated_value) == (emulated_value == value2)) == ((value2 == builtin_value) == (builtin_value == value2))); // LCOV_EXCL_LINE } - const boost::int128::int128_t bool_val {dist(rng)}; // LCOV_EXCL_LINE + const boost::int128::int128 bool_val {dist(rng)}; // LCOV_EXCL_LINE BOOST_TEST((true == bool_val) == (bool_val == true)); // LCOV_EXCL_LINE } @@ -344,7 +344,7 @@ void test_operator_inequality() { const IntType value {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value != emulated_value) == (emulated_value != value)) == ((value != builtin_value) == (builtin_value != value))); // LCOV_EXCL_LINE } @@ -355,12 +355,12 @@ void test_operator_inequality() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 != emulated_value) == (emulated_value != value2)) == ((value2 != builtin_value) == (builtin_value != value2))); // LCOV_EXCL_LINE } - const boost::int128::int128_t bool_val {dist(rng)}; // LCOV_EXCL_LINE + const boost::int128::int128 bool_val {dist(rng)}; // LCOV_EXCL_LINE BOOST_TEST((true != bool_val) == (bool_val != true)); // LCOV_EXCL_LINE } @@ -375,7 +375,7 @@ void test_operator_less() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 < emulated_value) == (value2 < builtin_value)) == ((emulated_value < value2) == (builtin_value < value2))); // LCOV_EXCL_LINE } @@ -392,7 +392,7 @@ void test_operator_greater() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 > emulated_value) == (value2 > builtin_value)) == ((emulated_value > value2) == (builtin_value > value2))); // LCOV_EXCL_LINE } @@ -409,7 +409,7 @@ void test_operator_le() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 <= emulated_value) == (value2 <= builtin_value)) == ((emulated_value <= value2) == (builtin_value <= value2))); // LCOV_EXCL_LINE } @@ -426,7 +426,7 @@ void test_operator_ge() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(((value2 >= emulated_value) == (value2 >= builtin_value)) == ((emulated_value >= value2) == (builtin_value >= value2))); // LCOV_EXCL_LINE } @@ -442,7 +442,7 @@ void test_operator_not() { const IntType value {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; BOOST_TEST(~emulated_value == ~builtin_value); // LCOV_EXCL_LINE } @@ -459,7 +459,7 @@ void test_operator_or() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value |= value2; @@ -494,7 +494,7 @@ void test_operator_and() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value &= value2; @@ -529,7 +529,7 @@ void test_operator_xor() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value ^= value2; @@ -566,7 +566,7 @@ void test_operator_left_shift() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const unsigned shift_value {shift_dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; // Test 1: Test the <<= operator auto builtin_copy = builtin_value; @@ -607,7 +607,7 @@ void test_operator_right_shift() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const unsigned shift_value {shift_dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; // Test 1: Test the >>= operator auto builtin_copy = builtin_value; @@ -637,7 +637,7 @@ void test_operator_right_shift() void test_increment_operator() { - boost::int128::int128_t emulated_value {INT64_MAX - N/2}; + boost::int128::int128 emulated_value {INT64_MAX - N/2}; builtin_i128 builtin_value {INT64_MAX - N/2}; for (std::size_t i {}; i < N; ++i) @@ -668,7 +668,7 @@ void test_operator_add() } auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value += value2; @@ -678,7 +678,7 @@ void test_operator_add() // Edge case where we go from low word to high word builtin_i128 builtin_value = UINT64_MAX - 2U; - boost::int128::int128_t emulated_value = UINT64_MAX - 2U; + boost::int128::int128 emulated_value = UINT64_MAX - 2U; for (std::size_t i {}; i < N; ++i) { @@ -705,7 +705,7 @@ void test_operator_sub() } auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; // Avoid UB from signed rollover if (value > value2) @@ -723,7 +723,7 @@ void test_operator_sub() // Edge case where we go from high word to low word builtin_i128 builtin_value = UINT64_MAX; builtin_value += 10; - boost::int128::int128_t emulated_value = UINT64_MAX; + boost::int128::int128 emulated_value = UINT64_MAX; emulated_value += 10; for (std::size_t i {}; i < N; ++i) @@ -744,7 +744,7 @@ void test_operator_mul() IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value *= value2; @@ -775,7 +775,7 @@ void test_operator_div() } auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value /= value2; @@ -791,7 +791,7 @@ void test_operator_div() } // Test 2 word by 1 word and 1 word by 2 word - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128)) { for (std::size_t i {}; i < N; ++i) { @@ -808,7 +808,7 @@ void test_operator_div() value2 = dist(rng); // LCOV_EXCL_LINE } - const boost::int128::int128_t emulated_value {static_cast(value), static_cast(value)}; + const boost::int128::int128 emulated_value {static_cast(value), static_cast(value)}; const auto builtin_value = static_cast(emulated_value); auto check_1_value {emulated_value}; @@ -824,7 +824,7 @@ void test_operator_div() BOOST_TEST((value2 / emulated_value) == (value2 / builtin_value)); // LCOV_EXCL_LINE // Forces decision process - const boost::int128::int128_t check_2_value {value2}; + const boost::int128::int128 check_2_value {value2}; BOOST_TEST(check_1_value == (emulated_value / check_2_value)); // LCOV_EXCL_LINE } } @@ -852,14 +852,14 @@ void test_operator_mod() } // With too large an unsigned __int128 value we end up with bitwise equal but signed results - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) == sizeof(boost::int128::int128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) == sizeof(boost::int128::int128)) { value >>= 2; value2 >>= 2; } auto builtin_value = static_cast(value); - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value %= value2; @@ -875,7 +875,7 @@ void test_operator_mod() } // Test 2 word by 1 word and 1 word by 2 word - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128)) { for (std::size_t i {}; i < N; ++i) { @@ -892,7 +892,7 @@ void test_operator_mod() value2 = dist(rng); // LCOV_EXCL_LINE } - const boost::int128::int128_t emulated_value {static_cast(value), static_cast(value)}; + const boost::int128::int128 emulated_value {static_cast(value), static_cast(value)}; const auto builtin_value = static_cast(emulated_value); auto check_1_value {emulated_value}; @@ -908,7 +908,7 @@ void test_operator_mod() BOOST_TEST((value2 % emulated_value) == (value2 % builtin_value)); // LCOV_EXCL_LINE // Forces decision process - const boost::int128::int128_t check_2_value {value2}; + const boost::int128::int128 check_2_value {value2}; BOOST_TEST(check_1_value == (emulated_value % check_2_value)); // LCOV_EXCL_LINE } } @@ -925,7 +925,7 @@ void test_abs() for (std::size_t i {}; i < N; ++i) { const auto value {dist(rng)}; // LCOV_EXCL_LINE - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto builtin_value = static_cast(value); if (value < 0) @@ -957,7 +957,7 @@ void test_abs() value /= 100; } - boost::int128::int128_t emulated_value {value}; + boost::int128::int128 emulated_value {value}; auto builtin_value = static_cast(value); BOOST_TEST(abs(emulated_value) == emulated_value); // LCOV_EXCL_LINE diff --git a/test/test_int_div.cpp b/test/test_int_div.cpp index cfb2aba6..a995630a 100644 --- a/test/test_int_div.cpp +++ b/test/test_int_div.cpp @@ -107,10 +107,10 @@ struct mode_entry { const char* name; long long (*reference)(long long, long long); - int128_t (*signed_quotient)(int128_t, int128_t); - div_result (*signed_div_rem)(int128_t, int128_t); - uint128_t (*unsigned_quotient)(uint128_t, uint128_t); - div_result (*unsigned_div_rem)(uint128_t, uint128_t); + int128 (*signed_quotient)(int128, int128); + div_result (*signed_div_rem)(int128, int128); + uint128 (*unsigned_quotient)(uint128, uint128); + div_result (*unsigned_div_rem)(uint128, uint128); bool nearest; }; @@ -148,23 +148,23 @@ static void test_signed_sweep() for (const auto& mode : modes) { - const int128_t wide_x {x}; - const int128_t wide_y {y}; + const int128 wide_x {x}; + const int128 wide_y {y}; const auto expected {mode.reference(x, y)}; - if (!BOOST_TEST_EQ(mode.signed_quotient(wide_x, wide_y), int128_t{expected})) + if (!BOOST_TEST_EQ(mode.signed_quotient(wide_x, wide_y), int128{expected})) { context(mode, x, y); } const auto res {mode.signed_div_rem(wide_x, wide_y)}; - if (!BOOST_TEST_EQ(res.quotient, int128_t{expected})) + if (!BOOST_TEST_EQ(res.quotient, int128{expected})) { context(mode, x, y); } - if (!BOOST_TEST_EQ(res.remainder, int128_t{x - expected * y})) + if (!BOOST_TEST_EQ(res.remainder, int128{x - expected * y})) { context(mode, x, y); } @@ -172,7 +172,7 @@ static void test_signed_sweep() const auto rem {x % y}; const auto expected_rem {rem < 0 ? rem + (y < 0 ? -y : y) : rem}; - BOOST_TEST_EQ(rem_euclid(int128_t{x}, int128_t{y}), int128_t{expected_rem}); + BOOST_TEST_EQ(rem_euclid(int128{x}, int128{y}), int128{expected_rem}); } } } @@ -186,10 +186,10 @@ static void test_unsigned_sweep() { for (const auto& mode : modes) { - const uint128_t wide_x {static_cast(x)}; - const uint128_t wide_y {static_cast(y)}; + const uint128 wide_x {static_cast(x)}; + const uint128 wide_y {static_cast(y)}; const auto expected {mode.reference(x, y)}; - const uint128_t wide_expected {static_cast(expected)}; + const uint128 wide_expected {static_cast(expected)}; if (!BOOST_TEST_EQ(mode.unsigned_quotient(wide_x, wide_y), wide_expected)) { @@ -205,14 +205,14 @@ static void test_unsigned_sweep() // The remainder of a rounded up unsigned quotient is negative, and is // returned reduced modulo 2^128 - if (!BOOST_TEST_EQ(res.remainder, uint128_t{wide_x - wide_expected * wide_y})) + if (!BOOST_TEST_EQ(res.remainder, uint128{wide_x - wide_expected * wide_y})) { context(mode, x, y); } } - BOOST_TEST_EQ(rem_euclid(uint128_t{static_cast(x)}, uint128_t{static_cast(y)}), - uint128_t{static_cast(x % y)}); + BOOST_TEST_EQ(rem_euclid(uint128{static_cast(x)}, uint128{static_cast(y)}), + uint128{static_cast(x % y)}); } } } @@ -221,7 +221,7 @@ static void test_unsigned_sweep() // which puts the full 128-bit division path under the same reference static void test_scaled_sweep() { - const int128_t scale {int128_t{1} << 70}; + const int128 scale {int128{1} << 70}; for (long long x {-40}; x <= 40; ++x) { @@ -234,17 +234,17 @@ static void test_scaled_sweep() for (const auto& mode : modes) { - const int128_t wide_x {int128_t{x} * scale}; - const int128_t wide_y {int128_t{y} * scale}; + const int128 wide_x {int128{x} * scale}; + const int128 wide_y {int128{y} * scale}; const auto expected {mode.reference(x, y)}; const auto res {mode.signed_div_rem(wide_x, wide_y)}; - if (!BOOST_TEST_EQ(res.quotient, int128_t{expected})) + if (!BOOST_TEST_EQ(res.quotient, int128{expected})) { context(mode, x, y); } - if (!BOOST_TEST_EQ(res.remainder, wide_x - int128_t{expected} * wide_y)) + if (!BOOST_TEST_EQ(res.remainder, wide_x - int128{expected} * wide_y)) { context(mode, x, y); } @@ -256,22 +256,22 @@ static void test_scaled_sweep() // Properties that hold for arbitrary operands, checked on values with no small equivalent static void test_signed_invariants() { - constexpr auto int_min {(std::numeric_limits::min)()}; - constexpr auto int_max {(std::numeric_limits::max)()}; + constexpr auto int_min {(std::numeric_limits::min)()}; + constexpr auto int_max {(std::numeric_limits::max)()}; - const int128_t dividends[] + const int128 dividends[] { int_max, int_min, int_min + 1, int_max - 1, BOOST_INT128_INT128_C(-170141183460469231731687303715884105727), BOOST_INT128_INT128_C(99999999999999999999999999999999999999), BOOST_INT128_INT128_C(-12345678901234567890123456789012345678), - int128_t{1} << 100, -(int128_t{1} << 100) + int128{1} << 100, -(int128{1} << 100) }; - const int128_t divisors[] + const int128 divisors[] { - int128_t{1}, int128_t{-1}, int128_t{2}, int128_t{-2}, int128_t{3}, int128_t{-3}, - int128_t{1} << 64, -(int128_t{1} << 64), int_max, int_min, + int128{1}, int128{-1}, int128{2}, int128{-2}, int128{3}, int128{-3}, + int128{1} << 64, -(int128{1} << 64), int_max, int_min, BOOST_INT128_INT128_C(1000000000000000000000000000000000000) }; @@ -299,16 +299,16 @@ static void test_signed_invariants() // x == quotient * y + remainder, evaluated modulo 2^128 so that no // intermediate overflows - const uint128_t unsigned_x {x.high, x.low}; - const uint128_t unsigned_y {y.high, y.low}; - const uint128_t unsigned_quot {res.quotient.high, res.quotient.low}; - const uint128_t unsigned_rem {res.remainder.high, res.remainder.low}; - const uint128_t reconstructed {unsigned_quot * unsigned_y + unsigned_rem}; + const uint128 unsigned_x {x.high, x.low}; + const uint128 unsigned_y {y.high, y.low}; + const uint128 unsigned_quot {res.quotient.high, res.quotient.low}; + const uint128 unsigned_rem {res.remainder.high, res.remainder.low}; + const uint128 reconstructed {unsigned_quot * unsigned_y + unsigned_rem}; BOOST_TEST_EQ(unsigned_x, reconstructed); // abs(remainder) < abs(y) - const auto abs_rem {static_cast(boost::int128::abs(res.remainder))}; - const auto abs_y {static_cast(boost::int128::abs(y))}; + const auto abs_rem {static_cast(boost::int128::abs(res.remainder))}; + const auto abs_y {static_cast(boost::int128::abs(y))}; BOOST_TEST(abs_rem < abs_y); // A nearest mode never leaves more than half the divisor behind @@ -327,7 +327,7 @@ static void test_signed_invariants() // The Euclidean remainder is always non-negative and below abs(y) const auto euclid_rem {rem_euclid(x, y)}; BOOST_TEST(euclid_rem >= 0); - BOOST_TEST(static_cast(euclid_rem) < static_cast(boost::int128::abs(y))); + BOOST_TEST(static_cast(euclid_rem) < static_cast(boost::int128::abs(y))); BOOST_TEST_EQ(euclid_rem, div_rem_euclid(x, y).remainder); } } @@ -335,18 +335,18 @@ static void test_signed_invariants() static void test_unsigned_invariants() { - constexpr auto uint_max {(std::numeric_limits::max)()}; + constexpr auto uint_max {(std::numeric_limits::max)()}; - const uint128_t dividends[] + const uint128 dividends[] { - uint_max, uint_max - 1U, uint128_t{1} << 127U, uint128_t{1} << 100U, + uint_max, uint_max - 1U, uint128{1} << 127U, uint128{1} << 100U, BOOST_INT128_UINT128_C(340282366920938463463374607431768211451), BOOST_INT128_UINT128_C(99999999999999999999999999999999999999) }; - const uint128_t divisors[] + const uint128 divisors[] { - uint128_t{1}, uint128_t{2}, uint128_t{3}, uint128_t{1} << 64U, uint_max, + uint128{1}, uint128{2}, uint128{3}, uint128{1} << 64U, uint_max, BOOST_INT128_UINT128_C(1000000000000000000000000000000000000) }; @@ -367,7 +367,7 @@ static void test_unsigned_invariants() // x == quotient * y + remainder modulo 2^128, including when the // remainder has wrapped - const uint128_t reconstructed {res.quotient * y + res.remainder}; + const uint128 reconstructed {res.quotient * y + res.remainder}; BOOST_TEST_EQ(x, reconstructed); if (res.quotient == truncated.quot) @@ -390,136 +390,136 @@ static void test_unsigned_invariants() } } -// The divisor whose magnitude is not representable as a positive int128_t +// The divisor whose magnitude is not representable as a positive int128 static void test_int128_min_divisor() { - constexpr auto int_min {(std::numeric_limits::min)()}; - constexpr auto int_max {(std::numeric_limits::max)()}; + constexpr auto int_min {(std::numeric_limits::min)()}; + constexpr auto int_max {(std::numeric_limits::max)()}; // -3 / INT128_MIN is a tiny positive fraction: only the modes that round up in // magnitude leave zero - BOOST_TEST_EQ(div_to_zero(int128_t{-3}, int_min), int128_t{0}); - BOOST_TEST_EQ(div_away_zero(int128_t{-3}, int_min), int128_t{1}); - BOOST_TEST_EQ(div_to_pos_inf(int128_t{-3}, int_min), int128_t{1}); - BOOST_TEST_EQ(div_to_neg_inf(int128_t{-3}, int_min), int128_t{0}); - BOOST_TEST_EQ(div_euclid(int128_t{-3}, int_min), int128_t{1}); - BOOST_TEST_EQ(div_ties_to_zero(int128_t{-3}, int_min), int128_t{0}); - BOOST_TEST_EQ(div_ties_away_zero(int128_t{-3}, int_min), int128_t{0}); - BOOST_TEST_EQ(div_ties_to_even(int128_t{-3}, int_min), int128_t{0}); + BOOST_TEST_EQ(div_to_zero(int128{-3}, int_min), int128{0}); + BOOST_TEST_EQ(div_away_zero(int128{-3}, int_min), int128{1}); + BOOST_TEST_EQ(div_to_pos_inf(int128{-3}, int_min), int128{1}); + BOOST_TEST_EQ(div_to_neg_inf(int128{-3}, int_min), int128{0}); + BOOST_TEST_EQ(div_euclid(int128{-3}, int_min), int128{1}); + BOOST_TEST_EQ(div_ties_to_zero(int128{-3}, int_min), int128{0}); + BOOST_TEST_EQ(div_ties_away_zero(int128{-3}, int_min), int128{0}); + BOOST_TEST_EQ(div_ties_to_even(int128{-3}, int_min), int128{0}); // The matching remainder is -3 - 1 * INT128_MIN, which is 2^127 - 3 - BOOST_TEST_EQ(div_rem_euclid(int128_t{-3}, int_min).remainder, int_max - 2); - BOOST_TEST_EQ(rem_euclid(int128_t{-3}, int_min), int_max - 2); - BOOST_TEST_EQ(div_rem_to_zero(int128_t{-3}, int_min).remainder, int128_t{-3}); + BOOST_TEST_EQ(div_rem_euclid(int128{-3}, int_min).remainder, int_max - 2); + BOOST_TEST_EQ(rem_euclid(int128{-3}, int_min), int_max - 2); + BOOST_TEST_EQ(div_rem_to_zero(int128{-3}, int_min).remainder, int128{-3}); // INT128_MIN / 2 is exact, so no mode adjusts it for (const auto& mode : modes) { - BOOST_TEST_EQ(mode.signed_quotient(int_min, int128_t{2}), int_min / 2); - BOOST_TEST_EQ(mode.signed_div_rem(int_min, int128_t{2}).remainder, int128_t{0}); + BOOST_TEST_EQ(mode.signed_quotient(int_min, int128{2}), int_min / 2); + BOOST_TEST_EQ(mode.signed_div_rem(int_min, int128{2}).remainder, int128{0}); } // A quotient at the limits of the type is never rounded further for (const auto& mode : modes) { - BOOST_TEST_EQ(mode.signed_quotient(int_max, int128_t{1}), int_max); - BOOST_TEST_EQ(mode.signed_quotient(int_min, int128_t{1}), int_min); - BOOST_TEST_EQ(mode.signed_quotient(int_max, int128_t{-1}), -int_max); + BOOST_TEST_EQ(mode.signed_quotient(int_max, int128{1}), int_max); + BOOST_TEST_EQ(mode.signed_quotient(int_min, int128{1}), int_min); + BOOST_TEST_EQ(mode.signed_quotient(int_max, int128{-1}), -int_max); } // 2^127 is congruent to 2 modulo 7, so INT128_MIN is congruent to 5 - BOOST_TEST_EQ(rem_euclid(int_min, int128_t{7}), int128_t{5}); - BOOST_TEST_EQ(rem_euclid(int_min, int128_t{-7}), int128_t{5}); + BOOST_TEST_EQ(rem_euclid(int_min, int128{7}), int128{5}); + BOOST_TEST_EQ(rem_euclid(int_min, int128{-7}), int128{5}); } static void test_unsigned_limits() { - constexpr auto uint_max {(std::numeric_limits::max)()}; + constexpr auto uint_max {(std::numeric_limits::max)()}; // No mode overflows a quotient that is already the maximum for (const auto& mode : modes) { - BOOST_TEST_EQ(mode.unsigned_quotient(uint_max, uint128_t{1}), uint_max); + BOOST_TEST_EQ(mode.unsigned_quotient(uint_max, uint128{1}), uint_max); } // UINT128_MAX is odd, so halving it is a tie in neither direction - BOOST_TEST_EQ(div_ties_to_zero(uint_max, uint128_t{2}), uint_max / 2U); - BOOST_TEST_EQ(div_ties_away_zero(uint_max, uint128_t{2}), uint_max / 2U + 1U); - BOOST_TEST_EQ(div_away_zero(uint_max, uint128_t{2}), uint_max / 2U + 1U); - BOOST_TEST_EQ(div_to_zero(uint_max, uint128_t{2}), uint_max / 2U); + BOOST_TEST_EQ(div_ties_to_zero(uint_max, uint128{2}), uint_max / 2U); + BOOST_TEST_EQ(div_ties_away_zero(uint_max, uint128{2}), uint_max / 2U + 1U); + BOOST_TEST_EQ(div_away_zero(uint_max, uint128{2}), uint_max / 2U + 1U); + BOOST_TEST_EQ(div_to_zero(uint_max, uint128{2}), uint_max / 2U); // A tie against an even divisor at the top of the range - const uint128_t even_tie {uint_max - 1U}; - BOOST_TEST_EQ(div_ties_to_zero(even_tie, uint128_t{2}), even_tie / 2U); - BOOST_TEST_EQ(div_ties_away_zero(even_tie, uint128_t{2}), even_tie / 2U); + const uint128 even_tie {uint_max - 1U}; + BOOST_TEST_EQ(div_ties_to_zero(even_tie, uint128{2}), even_tie / 2U); + BOOST_TEST_EQ(div_ties_away_zero(even_tie, uint128{2}), even_tie / 2U); } // The worked example from P3724 static void test_paper_example() { - const int128_t x {-12}; - const int128_t y {5}; - - BOOST_TEST_EQ(div_to_zero(x, y), int128_t{-2}); - BOOST_TEST_EQ(div_away_zero(x, y), int128_t{-3}); - BOOST_TEST_EQ(div_to_pos_inf(x, y), int128_t{-2}); - BOOST_TEST_EQ(div_to_neg_inf(x, y), int128_t{-3}); - BOOST_TEST_EQ(div_euclid(x, y), int128_t{-3}); - BOOST_TEST_EQ(div_ties_to_zero(x, y), int128_t{-2}); - BOOST_TEST_EQ(div_ties_away_zero(x, y), int128_t{-2}); - BOOST_TEST_EQ(div_ties_to_pos_inf(x, y), int128_t{-2}); - BOOST_TEST_EQ(div_ties_to_neg_inf(x, y), int128_t{-2}); - BOOST_TEST_EQ(div_ties_to_odd(x, y), int128_t{-2}); - BOOST_TEST_EQ(div_ties_to_even(x, y), int128_t{-2}); - - BOOST_TEST_EQ(div_rem_to_zero(x, y).remainder, int128_t{-2}); - BOOST_TEST_EQ(div_rem_to_neg_inf(x, y).remainder, int128_t{3}); - BOOST_TEST_EQ(rem_euclid(x, y), int128_t{3}); + const int128 x {-12}; + const int128 y {5}; + + BOOST_TEST_EQ(div_to_zero(x, y), int128{-2}); + BOOST_TEST_EQ(div_away_zero(x, y), int128{-3}); + BOOST_TEST_EQ(div_to_pos_inf(x, y), int128{-2}); + BOOST_TEST_EQ(div_to_neg_inf(x, y), int128{-3}); + BOOST_TEST_EQ(div_euclid(x, y), int128{-3}); + BOOST_TEST_EQ(div_ties_to_zero(x, y), int128{-2}); + BOOST_TEST_EQ(div_ties_away_zero(x, y), int128{-2}); + BOOST_TEST_EQ(div_ties_to_pos_inf(x, y), int128{-2}); + BOOST_TEST_EQ(div_ties_to_neg_inf(x, y), int128{-2}); + BOOST_TEST_EQ(div_ties_to_odd(x, y), int128{-2}); + BOOST_TEST_EQ(div_ties_to_even(x, y), int128{-2}); + + BOOST_TEST_EQ(div_rem_to_zero(x, y).remainder, int128{-2}); + BOOST_TEST_EQ(div_rem_to_neg_inf(x, y).remainder, int128{3}); + BOOST_TEST_EQ(rem_euclid(x, y), int128{3}); } // Every tie-breaking rule on the same exact tie static void test_tie_breaking() { // 7 / 2 and -7 / 2 are ties, and the truncated quotients are 3 and -3 - BOOST_TEST_EQ(div_ties_to_zero(int128_t{7}, int128_t{2}), int128_t{3}); - BOOST_TEST_EQ(div_ties_away_zero(int128_t{7}, int128_t{2}), int128_t{4}); - BOOST_TEST_EQ(div_ties_to_pos_inf(int128_t{7}, int128_t{2}), int128_t{4}); - BOOST_TEST_EQ(div_ties_to_neg_inf(int128_t{7}, int128_t{2}), int128_t{3}); - BOOST_TEST_EQ(div_ties_to_odd(int128_t{7}, int128_t{2}), int128_t{3}); - BOOST_TEST_EQ(div_ties_to_even(int128_t{7}, int128_t{2}), int128_t{4}); - - BOOST_TEST_EQ(div_ties_to_zero(int128_t{-7}, int128_t{2}), int128_t{-3}); - BOOST_TEST_EQ(div_ties_away_zero(int128_t{-7}, int128_t{2}), int128_t{-4}); - BOOST_TEST_EQ(div_ties_to_pos_inf(int128_t{-7}, int128_t{2}), int128_t{-3}); - BOOST_TEST_EQ(div_ties_to_neg_inf(int128_t{-7}, int128_t{2}), int128_t{-4}); - BOOST_TEST_EQ(div_ties_to_odd(int128_t{-7}, int128_t{2}), int128_t{-3}); - BOOST_TEST_EQ(div_ties_to_even(int128_t{-7}, int128_t{2}), int128_t{-4}); + BOOST_TEST_EQ(div_ties_to_zero(int128{7}, int128{2}), int128{3}); + BOOST_TEST_EQ(div_ties_away_zero(int128{7}, int128{2}), int128{4}); + BOOST_TEST_EQ(div_ties_to_pos_inf(int128{7}, int128{2}), int128{4}); + BOOST_TEST_EQ(div_ties_to_neg_inf(int128{7}, int128{2}), int128{3}); + BOOST_TEST_EQ(div_ties_to_odd(int128{7}, int128{2}), int128{3}); + BOOST_TEST_EQ(div_ties_to_even(int128{7}, int128{2}), int128{4}); + + BOOST_TEST_EQ(div_ties_to_zero(int128{-7}, int128{2}), int128{-3}); + BOOST_TEST_EQ(div_ties_away_zero(int128{-7}, int128{2}), int128{-4}); + BOOST_TEST_EQ(div_ties_to_pos_inf(int128{-7}, int128{2}), int128{-3}); + BOOST_TEST_EQ(div_ties_to_neg_inf(int128{-7}, int128{2}), int128{-4}); + BOOST_TEST_EQ(div_ties_to_odd(int128{-7}, int128{2}), int128{-3}); + BOOST_TEST_EQ(div_ties_to_even(int128{-7}, int128{2}), int128{-4}); // 5 / 2 has an even quotient after rounding away from zero - BOOST_TEST_EQ(div_ties_to_odd(int128_t{5}, int128_t{2}), int128_t{3}); - BOOST_TEST_EQ(div_ties_to_even(int128_t{5}, int128_t{2}), int128_t{2}); - - BOOST_TEST_EQ(div_ties_to_zero(uint128_t{7}, uint128_t{2}), uint128_t{3}); - BOOST_TEST_EQ(div_ties_away_zero(uint128_t{7}, uint128_t{2}), uint128_t{4}); - BOOST_TEST_EQ(div_ties_to_pos_inf(uint128_t{7}, uint128_t{2}), uint128_t{4}); - BOOST_TEST_EQ(div_ties_to_neg_inf(uint128_t{7}, uint128_t{2}), uint128_t{3}); - BOOST_TEST_EQ(div_ties_to_odd(uint128_t{7}, uint128_t{2}), uint128_t{3}); - BOOST_TEST_EQ(div_ties_to_even(uint128_t{7}, uint128_t{2}), uint128_t{4}); + BOOST_TEST_EQ(div_ties_to_odd(int128{5}, int128{2}), int128{3}); + BOOST_TEST_EQ(div_ties_to_even(int128{5}, int128{2}), int128{2}); + + BOOST_TEST_EQ(div_ties_to_zero(uint128{7}, uint128{2}), uint128{3}); + BOOST_TEST_EQ(div_ties_away_zero(uint128{7}, uint128{2}), uint128{4}); + BOOST_TEST_EQ(div_ties_to_pos_inf(uint128{7}, uint128{2}), uint128{4}); + BOOST_TEST_EQ(div_ties_to_neg_inf(uint128{7}, uint128{2}), uint128{3}); + BOOST_TEST_EQ(div_ties_to_odd(uint128{7}, uint128{2}), uint128{3}); + BOOST_TEST_EQ(div_ties_to_even(uint128{7}, uint128{2}), uint128{4}); } static void test_div_result() { - const div_result a {int128_t{3}, int128_t{1}}; - const div_result b {int128_t{3}, int128_t{2}}; - const div_result c {int128_t{4}, int128_t{1}}; + const div_result a {int128{3}, int128{1}}; + const div_result b {int128{3}, int128{2}}; + const div_result c {int128{4}, int128{1}}; BOOST_TEST(a == a); BOOST_TEST(a != b); BOOST_TEST(!(a == b)); - BOOST_TEST(a == div_rem_to_zero(int128_t{10}, int128_t{3})); + BOOST_TEST(a == div_rem_to_zero(int128{10}, int128{3})); - const div_result ua {uint128_t{3}, uint128_t{1}}; - BOOST_TEST(ua == div_rem_to_zero(uint128_t{10}, uint128_t{3})); + const div_result ua {uint128{3}, uint128{1}}; + BOOST_TEST(ua == div_rem_to_zero(uint128{10}, uint128{3})); #ifdef BOOST_INT128_HAS_SPACESHIP_OPERATOR @@ -528,7 +528,7 @@ static void test_div_result() BOOST_TEST(c > a); BOOST_TEST(a <= a); BOOST_TEST((a <=> a) == std::strong_ordering::equal); - BOOST_TEST((ua <=> div_result{uint128_t{3}, uint128_t{2}}) == std::strong_ordering::less); + BOOST_TEST((ua <=> div_result{uint128{3}, uint128{2}}) == std::strong_ordering::less); #else @@ -539,27 +539,27 @@ static void test_div_result() static void test_constexpr() { - static_assert(div_to_zero(int128_t{-7}, int128_t{2}) == -3, "div_to_zero"); - static_assert(div_away_zero(int128_t{-7}, int128_t{2}) == -4, "div_away_zero"); - static_assert(div_to_pos_inf(int128_t{-7}, int128_t{2}) == -3, "div_to_pos_inf"); - static_assert(div_to_neg_inf(int128_t{-7}, int128_t{2}) == -4, "div_to_neg_inf"); - static_assert(div_euclid(int128_t{-7}, int128_t{2}) == -4, "div_euclid"); - static_assert(div_ties_to_zero(int128_t{-7}, int128_t{2}) == -3, "div_ties_to_zero"); - static_assert(div_ties_away_zero(int128_t{-7}, int128_t{2}) == -4, "div_ties_away_zero"); - static_assert(div_ties_to_pos_inf(int128_t{-7}, int128_t{2}) == -3, "div_ties_to_pos_inf"); - static_assert(div_ties_to_neg_inf(int128_t{-7}, int128_t{2}) == -4, "div_ties_to_neg_inf"); - static_assert(div_ties_to_odd(int128_t{-7}, int128_t{2}) == -3, "div_ties_to_odd"); - static_assert(div_ties_to_even(int128_t{-7}, int128_t{2}) == -4, "div_ties_to_even"); - static_assert(rem_euclid(int128_t{-7}, int128_t{2}) == 1, "rem_euclid"); - - static_assert(div_rem_to_neg_inf(int128_t{-7}, int128_t{2}).remainder == 1, "div_rem_to_neg_inf"); - static_assert(div_rem_euclid(int128_t{-7}, int128_t{2}).quotient == -4, "div_rem_euclid"); - - static_assert(div_to_zero(uint128_t{7}, uint128_t{2}) == 3U, "unsigned div_to_zero"); - static_assert(div_away_zero(uint128_t{7}, uint128_t{2}) == 4U, "unsigned div_away_zero"); - static_assert(div_euclid(uint128_t{7}, uint128_t{2}) == 3U, "unsigned div_euclid"); - static_assert(rem_euclid(uint128_t{7}, uint128_t{2}) == 1U, "unsigned rem_euclid"); - static_assert(div_rem_ties_to_even(uint128_t{7}, uint128_t{2}).quotient == 4U, "unsigned ties_to_even"); + static_assert(div_to_zero(int128{-7}, int128{2}) == -3, "div_to_zero"); + static_assert(div_away_zero(int128{-7}, int128{2}) == -4, "div_away_zero"); + static_assert(div_to_pos_inf(int128{-7}, int128{2}) == -3, "div_to_pos_inf"); + static_assert(div_to_neg_inf(int128{-7}, int128{2}) == -4, "div_to_neg_inf"); + static_assert(div_euclid(int128{-7}, int128{2}) == -4, "div_euclid"); + static_assert(div_ties_to_zero(int128{-7}, int128{2}) == -3, "div_ties_to_zero"); + static_assert(div_ties_away_zero(int128{-7}, int128{2}) == -4, "div_ties_away_zero"); + static_assert(div_ties_to_pos_inf(int128{-7}, int128{2}) == -3, "div_ties_to_pos_inf"); + static_assert(div_ties_to_neg_inf(int128{-7}, int128{2}) == -4, "div_ties_to_neg_inf"); + static_assert(div_ties_to_odd(int128{-7}, int128{2}) == -3, "div_ties_to_odd"); + static_assert(div_ties_to_even(int128{-7}, int128{2}) == -4, "div_ties_to_even"); + static_assert(rem_euclid(int128{-7}, int128{2}) == 1, "rem_euclid"); + + static_assert(div_rem_to_neg_inf(int128{-7}, int128{2}).remainder == 1, "div_rem_to_neg_inf"); + static_assert(div_rem_euclid(int128{-7}, int128{2}).quotient == -4, "div_rem_euclid"); + + static_assert(div_to_zero(uint128{7}, uint128{2}) == 3U, "unsigned div_to_zero"); + static_assert(div_away_zero(uint128{7}, uint128{2}) == 4U, "unsigned div_away_zero"); + static_assert(div_euclid(uint128{7}, uint128{2}) == 3U, "unsigned div_euclid"); + static_assert(rem_euclid(uint128{7}, uint128{2}) == 1U, "unsigned rem_euclid"); + static_assert(div_rem_ties_to_even(uint128{7}, uint128{2}).quotient == 4U, "unsigned ties_to_even"); } #ifdef _MSC_VER diff --git a/test/test_integer_comparison.cpp b/test/test_integer_comparison.cpp index 1eb01ec3..b4b85e10 100644 --- a/test/test_integer_comparison.cpp +++ b/test/test_integer_comparison.cpp @@ -9,8 +9,8 @@ #include #include -using boost::int128::int128_t; -using boost::int128::uint128_t; +using boost::int128::int128; +using boost::int128::uint128; using boost::int128::cmp_equal; using boost::int128::cmp_not_equal; using boost::int128::cmp_less; @@ -25,73 +25,73 @@ using boost::int128::in_range; // void test_known_answers() { - constexpr auto u_max {(std::numeric_limits::max)()}; - constexpr auto i_max {(std::numeric_limits::max)()}; - constexpr auto i_min {(std::numeric_limits::min)()}; + constexpr auto u_max {(std::numeric_limits::max)()}; + constexpr auto i_max {(std::numeric_limits::max)()}; + constexpr auto i_min {(std::numeric_limits::min)()}; // The signature case: a large unsigned value against a negative signed one. // The built-in operators would convert -1 to 2^128-1 and report equal; the // cmp_* functions compare the true mathematical values. - BOOST_TEST(!cmp_equal(u_max, int128_t{-1})); - BOOST_TEST(cmp_not_equal(u_max, int128_t{-1})); - BOOST_TEST(cmp_greater(u_max, int128_t{-1})); - BOOST_TEST(!cmp_less(u_max, int128_t{-1})); - BOOST_TEST(cmp_less(int128_t{-1}, u_max)); - BOOST_TEST(cmp_greater_equal(u_max, int128_t{-1})); - BOOST_TEST(cmp_less_equal(int128_t{-1}, u_max)); - - // uint128_t vs builtin - BOOST_TEST(cmp_equal(uint128_t{5}, 5)); - BOOST_TEST(cmp_equal(uint128_t{5}, 5U)); - BOOST_TEST(!cmp_equal(uint128_t{5}, -5)); - BOOST_TEST(cmp_not_equal(uint128_t{5}, -5)); - BOOST_TEST(cmp_greater(uint128_t{5}, -5)); - BOOST_TEST(!cmp_less(uint128_t{0}, -1)); - BOOST_TEST(cmp_greater(uint128_t{0}, -1)); - BOOST_TEST(cmp_less(uint128_t{5}, 10)); - BOOST_TEST(cmp_less_equal(uint128_t{5}, 5)); - BOOST_TEST(cmp_greater_equal(uint128_t{5}, 5)); - - // int128_t vs builtin, both signs - BOOST_TEST(cmp_less(int128_t{-5}, 0U)); - BOOST_TEST(cmp_less(int128_t{-5}, -3)); - BOOST_TEST(cmp_greater(int128_t{-3}, -5)); - BOOST_TEST(cmp_equal(int128_t{-5}, -5)); - BOOST_TEST(!cmp_equal(int128_t{-5}, 5U)); - BOOST_TEST(cmp_less(int128_t{-1}, 0U)); - BOOST_TEST(cmp_greater_equal(int128_t{5}, -5)); - BOOST_TEST(cmp_less_equal(int128_t{-5}, 5U)); + BOOST_TEST(!cmp_equal(u_max, int128{-1})); + BOOST_TEST(cmp_not_equal(u_max, int128{-1})); + BOOST_TEST(cmp_greater(u_max, int128{-1})); + BOOST_TEST(!cmp_less(u_max, int128{-1})); + BOOST_TEST(cmp_less(int128{-1}, u_max)); + BOOST_TEST(cmp_greater_equal(u_max, int128{-1})); + BOOST_TEST(cmp_less_equal(int128{-1}, u_max)); + + // uint128 vs builtin + BOOST_TEST(cmp_equal(uint128{5}, 5)); + BOOST_TEST(cmp_equal(uint128{5}, 5U)); + BOOST_TEST(!cmp_equal(uint128{5}, -5)); + BOOST_TEST(cmp_not_equal(uint128{5}, -5)); + BOOST_TEST(cmp_greater(uint128{5}, -5)); + BOOST_TEST(!cmp_less(uint128{0}, -1)); + BOOST_TEST(cmp_greater(uint128{0}, -1)); + BOOST_TEST(cmp_less(uint128{5}, 10)); + BOOST_TEST(cmp_less_equal(uint128{5}, 5)); + BOOST_TEST(cmp_greater_equal(uint128{5}, 5)); + + // int128 vs builtin, both signs + BOOST_TEST(cmp_less(int128{-5}, 0U)); + BOOST_TEST(cmp_less(int128{-5}, -3)); + BOOST_TEST(cmp_greater(int128{-3}, -5)); + BOOST_TEST(cmp_equal(int128{-5}, -5)); + BOOST_TEST(!cmp_equal(int128{-5}, 5U)); + BOOST_TEST(cmp_less(int128{-1}, 0U)); + BOOST_TEST(cmp_greater_equal(int128{5}, -5)); + BOOST_TEST(cmp_less_equal(int128{-5}, 5U)); // builtin on the left BOOST_TEST(cmp_less(-1, u_max)); - BOOST_TEST(!cmp_greater(-1, uint128_t{0})); - BOOST_TEST(cmp_less(-1, uint128_t{0})); + BOOST_TEST(!cmp_greater(-1, uint128{0})); + BOOST_TEST(cmp_less(-1, uint128{0})); BOOST_TEST(!cmp_equal(-1, u_max)); - BOOST_TEST(cmp_greater(5, int128_t{-5})); - BOOST_TEST(cmp_equal(5U, uint128_t{5})); + BOOST_TEST(cmp_greater(5, int128{-5})); + BOOST_TEST(cmp_equal(5U, uint128{5})); // same-type 128-bit - BOOST_TEST(cmp_equal(uint128_t{7}, uint128_t{7})); - BOOST_TEST(cmp_not_equal(uint128_t{7}, uint128_t{8})); - BOOST_TEST(cmp_less(uint128_t{7}, uint128_t{8})); - BOOST_TEST(cmp_equal(int128_t{-7}, int128_t{-7})); - BOOST_TEST(cmp_less(int128_t{-7}, int128_t{-3})); - BOOST_TEST(cmp_greater(int128_t{-3}, int128_t{-7})); + BOOST_TEST(cmp_equal(uint128{7}, uint128{7})); + BOOST_TEST(cmp_not_equal(uint128{7}, uint128{8})); + BOOST_TEST(cmp_less(uint128{7}, uint128{8})); + BOOST_TEST(cmp_equal(int128{-7}, int128{-7})); + BOOST_TEST(cmp_less(int128{-7}, int128{-3})); + BOOST_TEST(cmp_greater(int128{-3}, int128{-7})); // extremes across the two 128-bit types BOOST_TEST(cmp_less(i_max, u_max)); BOOST_TEST(cmp_greater(u_max, i_max)); - BOOST_TEST(cmp_less(i_min, uint128_t{0})); - BOOST_TEST(cmp_greater(uint128_t{0}, i_min)); - BOOST_TEST(cmp_equal(uint128_t{i_max}, i_max)); + BOOST_TEST(cmp_less(i_min, uint128{0})); + BOOST_TEST(cmp_greater(uint128{0}, i_min)); + BOOST_TEST(cmp_equal(uint128{i_max}, i_max)); BOOST_TEST(!cmp_equal(u_max, i_max)); // zero comparisons - BOOST_TEST(cmp_equal(uint128_t{0}, 0)); - BOOST_TEST(cmp_equal(int128_t{0}, 0U)); - BOOST_TEST(cmp_equal(int128_t{0}, uint128_t{0})); - BOOST_TEST(cmp_greater_equal(uint128_t{0}, int128_t{0})); - BOOST_TEST(cmp_less_equal(uint128_t{0}, int128_t{0})); + BOOST_TEST(cmp_equal(uint128{0}, 0)); + BOOST_TEST(cmp_equal(int128{0}, 0U)); + BOOST_TEST(cmp_equal(int128{0}, uint128{0})); + BOOST_TEST(cmp_greater_equal(uint128{0}, int128{0})); + BOOST_TEST(cmp_less_equal(uint128{0}, int128{0})); } // @@ -100,41 +100,41 @@ void test_known_answers() // void test_in_range() { - constexpr auto u_max {(std::numeric_limits::max)()}; - constexpr auto i_max {(std::numeric_limits::max)()}; - constexpr auto i_min {(std::numeric_limits::min)()}; + constexpr auto u_max {(std::numeric_limits::max)()}; + constexpr auto i_max {(std::numeric_limits::max)()}; + constexpr auto i_min {(std::numeric_limits::min)()}; // library value -> narrow builtin target - BOOST_TEST(in_range(int128_t{127})); - BOOST_TEST(!in_range(int128_t{128})); - BOOST_TEST(in_range(int128_t{-128})); - BOOST_TEST(!in_range(int128_t{-129})); - BOOST_TEST(!in_range(int128_t{-1})); - BOOST_TEST(in_range(uint128_t{255})); - BOOST_TEST(!in_range(uint128_t{256})); + BOOST_TEST(in_range(int128{127})); + BOOST_TEST(!in_range(int128{128})); + BOOST_TEST(in_range(int128{-128})); + BOOST_TEST(!in_range(int128{-129})); + BOOST_TEST(!in_range(int128{-1})); + BOOST_TEST(in_range(uint128{255})); + BOOST_TEST(!in_range(uint128{256})); // library value -> wide builtin target BOOST_TEST(!in_range(u_max)); - BOOST_TEST(in_range(uint128_t{(std::numeric_limits::max)()})); + BOOST_TEST(in_range(uint128{(std::numeric_limits::max)()})); BOOST_TEST(!in_range(i_max)); - BOOST_TEST(in_range(int128_t{(std::numeric_limits::max)()})); + BOOST_TEST(in_range(int128{(std::numeric_limits::max)()})); BOOST_TEST(!in_range(u_max)); // builtin value -> library target (every builtin fits, except negatives in // an unsigned target) - BOOST_TEST(!in_range(-1)); - BOOST_TEST(in_range(5)); - BOOST_TEST(in_range(-5)); - BOOST_TEST(in_range((std::numeric_limits::min)())); - BOOST_TEST(in_range((std::numeric_limits::max)())); + BOOST_TEST(!in_range(-1)); + BOOST_TEST(in_range(5)); + BOOST_TEST(in_range(-5)); + BOOST_TEST(in_range((std::numeric_limits::min)())); + BOOST_TEST(in_range((std::numeric_limits::max)())); // library value -> library target - BOOST_TEST(!in_range(u_max)); - BOOST_TEST(in_range(uint128_t{i_max})); - BOOST_TEST(!in_range(int128_t{-1})); - BOOST_TEST(in_range(i_max)); - BOOST_TEST(in_range(u_max)); - BOOST_TEST(in_range(i_min)); + BOOST_TEST(!in_range(u_max)); + BOOST_TEST(in_range(uint128{i_max})); + BOOST_TEST(!in_range(int128{-1})); + BOOST_TEST(in_range(i_max)); + BOOST_TEST(in_range(u_max)); + BOOST_TEST(in_range(i_min)); } // @@ -159,8 +159,8 @@ void test_constraints() static_assert(!is_valid_comparison_type_v, "char32_t is not permitted"); static_assert(!is_valid_comparison_type_v, "wchar_t is not permitted"); static_assert(!is_valid_comparison_type_v, "double is not permitted"); - static_assert(!is_valid_comparison_type_v, "int128_t is handled by its own overloads"); - static_assert(!is_valid_comparison_type_v, "uint128_t is handled by its own overloads"); + static_assert(!is_valid_comparison_type_v, "int128 is handled by its own overloads"); + static_assert(!is_valid_comparison_type_v, "uint128 is handled by its own overloads"); #if defined(__cpp_char8_t) static_assert(!is_valid_comparison_type_v, "char8_t is not permitted"); @@ -172,20 +172,20 @@ void test_constraints() // void test_constexpr() { - constexpr auto u_max {(std::numeric_limits::max)()}; - - static_assert(cmp_equal(uint128_t{5}, 5), ""); - static_assert(cmp_not_equal(u_max, int128_t{-1}), ""); - static_assert(cmp_less(int128_t{-1}, uint128_t{0}), ""); - static_assert(cmp_greater(uint128_t{0}, int128_t{-1}), ""); - static_assert(cmp_less_equal(int128_t{-1}, u_max), ""); - static_assert(cmp_greater_equal(uint128_t{5}, int128_t{5}), ""); - static_assert(!cmp_equal(u_max, int128_t{-1}), ""); - - static_assert(in_range(int128_t{127}), ""); - static_assert(!in_range(int128_t{-1}), ""); - static_assert(in_range(5), ""); - static_assert(!in_range(u_max), ""); + constexpr auto u_max {(std::numeric_limits::max)()}; + + static_assert(cmp_equal(uint128{5}, 5), ""); + static_assert(cmp_not_equal(u_max, int128{-1}), ""); + static_assert(cmp_less(int128{-1}, uint128{0}), ""); + static_assert(cmp_greater(uint128{0}, int128{-1}), ""); + static_assert(cmp_less_equal(int128{-1}, u_max), ""); + static_assert(cmp_greater_equal(uint128{5}, int128{5}), ""); + static_assert(!cmp_equal(u_max, int128{-1}), ""); + + static_assert(in_range(int128{127}), ""); + static_assert(!in_range(int128{-1}), ""); + static_assert(in_range(5), ""); + static_assert(!in_range(u_max), ""); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) @@ -219,13 +219,13 @@ static void ref_sign_mag(builtin_u128 v, bool& neg, builtin_u128& mag) noexcept mag = v; } -static void ref_sign_mag(uint128_t v, bool& neg, builtin_u128& mag) noexcept +static void ref_sign_mag(uint128 v, bool& neg, builtin_u128& mag) noexcept { neg = false; mag = static_cast(v); } -static void ref_sign_mag(int128_t v, bool& neg, builtin_u128& mag) noexcept +static void ref_sign_mag(int128 v, bool& neg, builtin_u128& mag) noexcept { ref_sign_mag(static_cast(v), neg, mag); } @@ -292,10 +292,10 @@ void test_random_oracle() const std::uint64_t hi2 {u_dist(rng)}; const std::uint64_t lo2 {u_dist(rng)}; - const uint128_t ua {hi, lo}; - const uint128_t ub {hi2, lo2}; - const int128_t ia {static_cast(hi), lo}; - const int128_t ib {static_cast(hi2), lo2}; + const uint128 ua {hi, lo}; + const uint128 ub {hi2, lo2}; + const int128 ia {static_cast(hi), lo}; + const int128 ib {static_cast(hi2), lo2}; const std::int64_t si {i_dist(rng)}; const std::uint64_t su {u_dist(rng)}; @@ -341,8 +341,8 @@ void test_builtin_128() const builtin_i128 bi_5 {5}; const builtin_u128 bu_5 {5}; - constexpr auto u_max {(std::numeric_limits::max)()}; - constexpr auto i_max {(std::numeric_limits::max)()}; + constexpr auto u_max {(std::numeric_limits::max)()}; + constexpr auto i_max {(std::numeric_limits::max)()}; // trait classification static_assert(boost::int128::detail::is_int128_type_v, "builtin signed is a 128-bit type"); @@ -352,10 +352,10 @@ void test_builtin_128() // library 128-bit vs builtin 128-bit BOOST_TEST(!boost::int128::cmp_equal(u_max, bi_neg1)); - BOOST_TEST(!boost::int128::cmp_equal(bu_max, int128_t{-1})); - BOOST_TEST(boost::int128::cmp_less(bi_neg1, uint128_t{0})); - BOOST_TEST(boost::int128::cmp_greater(uint128_t{0}, bi_neg1)); - BOOST_TEST(boost::int128::cmp_equal(uint128_t{bu_max}, bu_max)); + BOOST_TEST(!boost::int128::cmp_equal(bu_max, int128{-1})); + BOOST_TEST(boost::int128::cmp_less(bi_neg1, uint128{0})); + BOOST_TEST(boost::int128::cmp_greater(uint128{0}, bi_neg1)); + BOOST_TEST(boost::int128::cmp_equal(uint128{bu_max}, bu_max)); // builtin 128-bit vs builtin 128-bit, cross signedness BOOST_TEST(!boost::int128::cmp_equal(bu_max, bi_neg1)); @@ -373,7 +373,7 @@ void test_builtin_128() // in_range with a builtin 128-bit target and/or value BOOST_TEST(!boost::int128::in_range(u_max)); - BOOST_TEST(!boost::int128::in_range(int128_t{-1})); + BOOST_TEST(!boost::int128::in_range(int128{-1})); BOOST_TEST(!boost::int128::in_range(bu_max)); BOOST_TEST(boost::int128::in_range(bi_neg1)); BOOST_TEST(boost::int128::in_range(bi_5)); diff --git a/test/test_ipow.cpp b/test/test_ipow.cpp index ec30c452..872f42bc 100644 --- a/test/test_ipow.cpp +++ b/test/test_ipow.cpp @@ -46,21 +46,21 @@ constexpr T ipow_ref(T base, std::uint64_t exp) noexcept void test_uint128_ipow_basic() { - BOOST_TEST_EQ(ipow(uint128_t{0}, 0U), uint128_t{1}); - BOOST_TEST_EQ(ipow(uint128_t{1}, 0U), uint128_t{1}); - BOOST_TEST_EQ(ipow(uint128_t{42}, 0U), uint128_t{1}); - BOOST_TEST_EQ(ipow(uint128_t{0}, 1U), uint128_t{0}); - BOOST_TEST_EQ(ipow(uint128_t{0}, 5U), uint128_t{0}); - BOOST_TEST_EQ(ipow(uint128_t{1}, 1000U), uint128_t{1}); - BOOST_TEST_EQ(ipow(uint128_t{42}, 1U), uint128_t{42}); - - BOOST_TEST_EQ(ipow(uint128_t{2}, 0U), uint128_t{1}); - BOOST_TEST_EQ(ipow(uint128_t{2}, 1U), uint128_t{2}); - BOOST_TEST_EQ(ipow(uint128_t{2}, 2U), uint128_t{4}); - BOOST_TEST_EQ(ipow(uint128_t{2}, 10U), uint128_t{1024}); - BOOST_TEST_EQ(ipow(uint128_t{3}, 5U), uint128_t{243}); - BOOST_TEST_EQ(ipow(uint128_t{10}, 9U), uint128_t{UINT64_C(1000000000)}); - BOOST_TEST_EQ(ipow(uint128_t{10}, 18U), uint128_t{UINT64_C(1000000000000000000)}); + BOOST_TEST_EQ(ipow(uint128{0}, 0U), uint128{1}); + BOOST_TEST_EQ(ipow(uint128{1}, 0U), uint128{1}); + BOOST_TEST_EQ(ipow(uint128{42}, 0U), uint128{1}); + BOOST_TEST_EQ(ipow(uint128{0}, 1U), uint128{0}); + BOOST_TEST_EQ(ipow(uint128{0}, 5U), uint128{0}); + BOOST_TEST_EQ(ipow(uint128{1}, 1000U), uint128{1}); + BOOST_TEST_EQ(ipow(uint128{42}, 1U), uint128{42}); + + BOOST_TEST_EQ(ipow(uint128{2}, 0U), uint128{1}); + BOOST_TEST_EQ(ipow(uint128{2}, 1U), uint128{2}); + BOOST_TEST_EQ(ipow(uint128{2}, 2U), uint128{4}); + BOOST_TEST_EQ(ipow(uint128{2}, 10U), uint128{1024}); + BOOST_TEST_EQ(ipow(uint128{3}, 5U), uint128{243}); + BOOST_TEST_EQ(ipow(uint128{10}, 9U), uint128{UINT64_C(1000000000)}); + BOOST_TEST_EQ(ipow(uint128{10}, 18U), uint128{UINT64_C(1000000000000000000)}); } void test_uint128_ipow_power_of_two() @@ -68,27 +68,27 @@ void test_uint128_ipow_power_of_two() // 2^k fills bit k, so we can hit every bit position up to 127. for (std::uint64_t k {0}; k < 64; ++k) { - const uint128_t expected {static_cast(1) << k}; - BOOST_TEST_EQ(ipow(uint128_t{2}, k), expected); + const uint128 expected {static_cast(1) << k}; + BOOST_TEST_EQ(ipow(uint128{2}, k), expected); } for (std::uint64_t k {64}; k < 128; ++k) { - const uint128_t expected {static_cast(1) << (k - 64), 0U}; - BOOST_TEST_EQ(ipow(uint128_t{2}, k), expected); + const uint128 expected {static_cast(1) << (k - 64), 0U}; + BOOST_TEST_EQ(ipow(uint128{2}, k), expected); } // 2^128 wraps to 0 in uint128 arithmetic. - BOOST_TEST_EQ(ipow(uint128_t{2}, 128U), uint128_t{0}); - BOOST_TEST_EQ(ipow(uint128_t{2}, 200U), uint128_t{0}); + BOOST_TEST_EQ(ipow(uint128{2}, 128U), uint128{0}); + BOOST_TEST_EQ(ipow(uint128{2}, 200U), uint128{0}); } void test_uint128_ipow_large() { // 10^38 is the largest power of 10 that fits in 128 bits. // 10^38 = 100000000000000000000000000000000000000. - const uint128_t ten_pow_38 {UINT64_C(0x4B3B4CA85A86C47A), UINT64_C(0x098A224000000000)}; - BOOST_TEST_EQ(ipow(uint128_t{10}, 38U), ten_pow_38); + const uint128 ten_pow_38 {UINT64_C(0x4B3B4CA85A86C47A), UINT64_C(0x098A224000000000)}; + BOOST_TEST_EQ(ipow(uint128{10}, 38U), ten_pow_38); // Cross-check a range of bases against the naive reference for small // exponents where the result is hand-verifiable through repeated mul. @@ -96,7 +96,7 @@ void test_uint128_ipow_large() { for (std::uint64_t exp {0}; exp < 12; ++exp) { - BOOST_TEST_EQ(ipow(uint128_t{base}, exp), ipow_ref(uint128_t{base}, exp)); + BOOST_TEST_EQ(ipow(uint128{base}, exp), ipow_ref(uint128{base}, exp)); } } } @@ -104,91 +104,91 @@ void test_uint128_ipow_large() void test_uint128_ipow_wrap() { // Squaring 2^64 yields 2^128 which wraps to 0. - const uint128_t two_pow_64 {1U, 0U}; - BOOST_TEST_EQ(ipow(two_pow_64, 2U), uint128_t{0}); + const uint128 two_pow_64 {1U, 0U}; + BOOST_TEST_EQ(ipow(two_pow_64, 2U), uint128{0}); // (2^64 - 1)^2 mod 2^128 = 2^128 - 2^65 + 1, which has a known bit pattern. - const uint128_t u64_max {(std::numeric_limits::max)()}; - const uint128_t expected {UINT64_C(0xFFFFFFFFFFFFFFFE), 1U}; + const uint128 u64_max {(std::numeric_limits::max)()}; + const uint128 expected {UINT64_C(0xFFFFFFFFFFFFFFFE), 1U}; BOOST_TEST_EQ(ipow(u64_max, 2U), expected); // Anything to a sufficiently large power eventually wraps to 0 if the base // shares a factor of 2 with 2^128. - BOOST_TEST_EQ(ipow(uint128_t{4}, 64U), uint128_t{0}); - BOOST_TEST_EQ(ipow(uint128_t{6}, 200U), uint128_t{0}); + BOOST_TEST_EQ(ipow(uint128{4}, 64U), uint128{0}); + BOOST_TEST_EQ(ipow(uint128{6}, 200U), uint128{0}); } void test_uint128_ipow_identities() { // a^(b+c) == a^b * a^c (under wrap modulo 2^128). - const uint128_t a {UINT64_C(0xDEADBEEF)}; + const uint128 a {UINT64_C(0xDEADBEEF)}; BOOST_TEST_EQ(ipow(a, 7U), ipow(a, 3U) * ipow(a, 4U)); BOOST_TEST_EQ(ipow(a, 20U), ipow(a, 13U) * ipow(a, 7U)); // (a*b)^e == a^e * b^e. - const uint128_t aa {7}; - const uint128_t bb {11}; + const uint128 aa {7}; + const uint128 bb {11}; BOOST_TEST_EQ(ipow(aa * bb, 6U), ipow(aa, 6U) * ipow(bb, 6U)); // (a^b)^c == a^(b*c). - BOOST_TEST_EQ(ipow(ipow(uint128_t{3}, 4U), 5U), ipow(uint128_t{3}, 4U * 5U)); + BOOST_TEST_EQ(ipow(ipow(uint128{3}, 4U), 5U), ipow(uint128{3}, 4U * 5U)); } void test_int128_ipow_basic() { - BOOST_TEST_EQ(ipow(int128_t{0}, 0U), int128_t{1}); - BOOST_TEST_EQ(ipow(int128_t{1}, 0U), int128_t{1}); - BOOST_TEST_EQ(ipow(int128_t{-1}, 0U), int128_t{1}); - BOOST_TEST_EQ(ipow(int128_t{0}, 5U), int128_t{0}); - BOOST_TEST_EQ(ipow(int128_t{42}, 1U), int128_t{42}); - - BOOST_TEST_EQ(ipow(int128_t{2}, 10U), int128_t{1024}); - BOOST_TEST_EQ(ipow(int128_t{3}, 5U), int128_t{243}); - BOOST_TEST_EQ(ipow(int128_t{10}, 18U), int128_t{INT64_C(1000000000000000000)}); + BOOST_TEST_EQ(ipow(int128{0}, 0U), int128{1}); + BOOST_TEST_EQ(ipow(int128{1}, 0U), int128{1}); + BOOST_TEST_EQ(ipow(int128{-1}, 0U), int128{1}); + BOOST_TEST_EQ(ipow(int128{0}, 5U), int128{0}); + BOOST_TEST_EQ(ipow(int128{42}, 1U), int128{42}); + + BOOST_TEST_EQ(ipow(int128{2}, 10U), int128{1024}); + BOOST_TEST_EQ(ipow(int128{3}, 5U), int128{243}); + BOOST_TEST_EQ(ipow(int128{10}, 18U), int128{INT64_C(1000000000000000000)}); } void test_int128_ipow_negative_base() { // Even exponents are non-negative, odd exponents preserve the sign. - BOOST_TEST_EQ(ipow(int128_t{-2}, 0U), int128_t{1}); - BOOST_TEST_EQ(ipow(int128_t{-2}, 1U), int128_t{-2}); - BOOST_TEST_EQ(ipow(int128_t{-2}, 2U), int128_t{4}); - BOOST_TEST_EQ(ipow(int128_t{-2}, 3U), int128_t{-8}); - BOOST_TEST_EQ(ipow(int128_t{-2}, 10U), int128_t{1024}); - BOOST_TEST_EQ(ipow(int128_t{-3}, 5U), int128_t{-243}); - - BOOST_TEST_EQ(ipow(int128_t{-1}, 100U), int128_t{1}); - BOOST_TEST_EQ(ipow(int128_t{-1}, 101U), int128_t{-1}); - - BOOST_TEST_EQ(ipow(int128_t{-10}, 18U), int128_t{INT64_C(1000000000000000000)}); - BOOST_TEST_EQ(ipow(int128_t{-10}, 17U), int128_t{INT64_C(-100000000000000000)}); + BOOST_TEST_EQ(ipow(int128{-2}, 0U), int128{1}); + BOOST_TEST_EQ(ipow(int128{-2}, 1U), int128{-2}); + BOOST_TEST_EQ(ipow(int128{-2}, 2U), int128{4}); + BOOST_TEST_EQ(ipow(int128{-2}, 3U), int128{-8}); + BOOST_TEST_EQ(ipow(int128{-2}, 10U), int128{1024}); + BOOST_TEST_EQ(ipow(int128{-3}, 5U), int128{-243}); + + BOOST_TEST_EQ(ipow(int128{-1}, 100U), int128{1}); + BOOST_TEST_EQ(ipow(int128{-1}, 101U), int128{-1}); + + BOOST_TEST_EQ(ipow(int128{-10}, 18U), int128{INT64_C(1000000000000000000)}); + BOOST_TEST_EQ(ipow(int128{-10}, 17U), int128{INT64_C(-100000000000000000)}); } void test_int128_ipow_large() { - // 10^38 still fits in int128_t (signed max is roughly 1.7e38). - const int128_t ten_pow_38 {static_cast(uint128_t{UINT64_C(0x4B3B4CA85A86C47A), UINT64_C(0x098A224000000000)})}; - BOOST_TEST_EQ(ipow(int128_t{10}, 38U), ten_pow_38); - BOOST_TEST_EQ(ipow(int128_t{-10}, 38U), ten_pow_38); + // 10^38 still fits in int128 (signed max is roughly 1.7e38). + const int128 ten_pow_38 {static_cast(uint128{UINT64_C(0x4B3B4CA85A86C47A), UINT64_C(0x098A224000000000)})}; + BOOST_TEST_EQ(ipow(int128{10}, 38U), ten_pow_38); + BOOST_TEST_EQ(ipow(int128{-10}, 38U), ten_pow_38); // Cross-check small bases against the naive reference. for (std::int64_t base {-7}; base < 8; ++base) { for (std::uint64_t exp {0}; exp < 12; ++exp) { - BOOST_TEST_EQ(ipow(int128_t{base}, exp), ipow_ref(int128_t{base}, exp)); + BOOST_TEST_EQ(ipow(int128{base}, exp), ipow_ref(int128{base}, exp)); } } } void test_int128_ipow_identities() { - const int128_t a {12345}; + const int128 a {12345}; BOOST_TEST_EQ(ipow(a, 7U), ipow(a, 3U) * ipow(a, 4U)); - BOOST_TEST_EQ(ipow(ipow(int128_t{3}, 4U), 5U), ipow(int128_t{3}, 4U * 5U)); + BOOST_TEST_EQ(ipow(ipow(int128{3}, 4U), 5U), ipow(int128{3}, 4U * 5U)); // Sign behaves multiplicatively. - BOOST_TEST_EQ(ipow(int128_t{-7}, 3U) * ipow(int128_t{-7}, 4U), ipow(int128_t{-7}, 7U)); + BOOST_TEST_EQ(ipow(int128{-7}, 3U) * ipow(int128{-7}, 4U), ipow(int128{-7}, 7U)); } #ifdef _MSC_VER @@ -199,20 +199,20 @@ void test_int128_ipow_identities() void test_constexpr_ipow() { - constexpr uint128_t r1 {ipow(uint128_t{2}, 10U)}; - static_assert(r1 == uint128_t{1024}, "ipow constexpr uint128 small case"); + constexpr uint128 r1 {ipow(uint128{2}, 10U)}; + static_assert(r1 == uint128{1024}, "ipow constexpr uint128 small case"); - constexpr uint128_t r2 {ipow(uint128_t{10}, 18U)}; - static_assert(r2 == uint128_t{UINT64_C(1000000000000000000)}, "ipow constexpr uint128 18 digits"); + constexpr uint128 r2 {ipow(uint128{10}, 18U)}; + static_assert(r2 == uint128{UINT64_C(1000000000000000000)}, "ipow constexpr uint128 18 digits"); - constexpr int128_t r3 {ipow(int128_t{-3}, 5U)}; - static_assert(r3 == int128_t{-243}, "ipow constexpr int128 negative base odd exp"); + constexpr int128 r3 {ipow(int128{-3}, 5U)}; + static_assert(r3 == int128{-243}, "ipow constexpr int128 negative base odd exp"); - constexpr int128_t r4 {ipow(int128_t{-3}, 4U)}; - static_assert(r4 == int128_t{81}, "ipow constexpr int128 negative base even exp"); + constexpr int128 r4 {ipow(int128{-3}, 4U)}; + static_assert(r4 == int128{81}, "ipow constexpr int128 negative base even exp"); - constexpr uint128_t r5 {ipow(uint128_t{2}, 128U)}; - static_assert(r5 == uint128_t{0}, "ipow constexpr uint128 wrap to zero"); + constexpr uint128 r5 {ipow(uint128{2}, 128U)}; + static_assert(r5 == uint128{0}, "ipow constexpr uint128 wrap to zero"); } #ifdef _MSC_VER diff --git a/test/test_isqrt.cpp b/test/test_isqrt.cpp index 5d485e31..ece29005 100644 --- a/test/test_isqrt.cpp +++ b/test/test_isqrt.cpp @@ -30,15 +30,15 @@ namespace { // Naive bit-by-bit reference. Independent of the Newton implementation under // test, so it serves as a ground truth for cross-checking. -constexpr uint128_t isqrt_ref(uint128_t n) noexcept +constexpr uint128 isqrt_ref(uint128 n) noexcept { if (n < 2U) { return n; } - uint128_t res {0}; - uint128_t bit {uint128_t{1} << 126}; + uint128 res {0}; + uint128 bit {uint128{1} << 126}; while (bit > n) { @@ -66,17 +66,17 @@ constexpr uint128_t isqrt_ref(uint128_t n) noexcept // Verify the defining invariant: r == isqrt(n) iff r*r <= n < (r+1)^2. // Computed with overflow-safe comparisons so callers can pass values near the // uint128 upper bound. -void check_invariant(const uint128_t n) +void check_invariant(const uint128 n) { - const uint128_t r {isqrt(n)}; + const uint128 r {isqrt(n)}; BOOST_TEST(r * r <= n); - const uint128_t r_plus_1 {r + 1U}; + const uint128 r_plus_1 {r + 1U}; // (r+1)^2 may overflow uint128 when r is close to 2^64; in that case the // invariant n < (r+1)^2 is trivially satisfied since n fits in 128 bits. - if (r_plus_1 != 0U && r_plus_1 <= ((std::numeric_limits::max)() / r_plus_1)) + if (r_plus_1 != 0U && r_plus_1 <= ((std::numeric_limits::max)() / r_plus_1)) { BOOST_TEST(n < r_plus_1 * r_plus_1); } @@ -86,25 +86,25 @@ void check_invariant(const uint128_t n) void test_uint128_isqrt_small() { - BOOST_TEST_EQ(isqrt(uint128_t{0}), uint128_t{0}); - BOOST_TEST_EQ(isqrt(uint128_t{1}), uint128_t{1}); - BOOST_TEST_EQ(isqrt(uint128_t{2}), uint128_t{1}); - BOOST_TEST_EQ(isqrt(uint128_t{3}), uint128_t{1}); - BOOST_TEST_EQ(isqrt(uint128_t{4}), uint128_t{2}); - BOOST_TEST_EQ(isqrt(uint128_t{5}), uint128_t{2}); - BOOST_TEST_EQ(isqrt(uint128_t{8}), uint128_t{2}); - BOOST_TEST_EQ(isqrt(uint128_t{9}), uint128_t{3}); - BOOST_TEST_EQ(isqrt(uint128_t{10}), uint128_t{3}); - BOOST_TEST_EQ(isqrt(uint128_t{15}), uint128_t{3}); - BOOST_TEST_EQ(isqrt(uint128_t{16}), uint128_t{4}); - BOOST_TEST_EQ(isqrt(uint128_t{99}), uint128_t{9}); - BOOST_TEST_EQ(isqrt(uint128_t{100}), uint128_t{10}); - BOOST_TEST_EQ(isqrt(uint128_t{101}), uint128_t{10}); + BOOST_TEST_EQ(isqrt(uint128{0}), uint128{0}); + BOOST_TEST_EQ(isqrt(uint128{1}), uint128{1}); + BOOST_TEST_EQ(isqrt(uint128{2}), uint128{1}); + BOOST_TEST_EQ(isqrt(uint128{3}), uint128{1}); + BOOST_TEST_EQ(isqrt(uint128{4}), uint128{2}); + BOOST_TEST_EQ(isqrt(uint128{5}), uint128{2}); + BOOST_TEST_EQ(isqrt(uint128{8}), uint128{2}); + BOOST_TEST_EQ(isqrt(uint128{9}), uint128{3}); + BOOST_TEST_EQ(isqrt(uint128{10}), uint128{3}); + BOOST_TEST_EQ(isqrt(uint128{15}), uint128{3}); + BOOST_TEST_EQ(isqrt(uint128{16}), uint128{4}); + BOOST_TEST_EQ(isqrt(uint128{99}), uint128{9}); + BOOST_TEST_EQ(isqrt(uint128{100}), uint128{10}); + BOOST_TEST_EQ(isqrt(uint128{101}), uint128{10}); // Exhaustive cross-check against the reference for every small n. for (std::uint64_t i {0}; i < 200; ++i) { - BOOST_TEST_EQ(isqrt(uint128_t{i}), isqrt_ref(uint128_t{i})); + BOOST_TEST_EQ(isqrt(uint128{i}), isqrt_ref(uint128{i})); } } @@ -114,7 +114,7 @@ void test_uint128_isqrt_perfect_squares() // square still fits in 128 bits (k = 2^64 - 1). for (std::uint64_t k {0}; k < 10000; ++k) { - const uint128_t kk {k}; + const uint128 kk {k}; BOOST_TEST_EQ(isqrt(kk * kk), kk); if (k > 0) @@ -128,12 +128,12 @@ void test_uint128_isqrt_perfect_squares() // is (2^63)^2 = 2^126. for (int i {0}; i < 64; ++i) { - const uint128_t k {uint128_t{1} << i}; + const uint128 k {uint128{1} << i}; BOOST_TEST_EQ(isqrt(k * k), k); } // Largest representable perfect square: (2^64 - 1)^2 = 2^128 - 2^65 + 1. - const uint128_t k_max {(std::numeric_limits::max)()}; + const uint128 k_max {(std::numeric_limits::max)()}; BOOST_TEST_EQ(isqrt(k_max * k_max), k_max); } @@ -142,21 +142,21 @@ void test_uint128_isqrt_bit_boundaries() // 2^(2k) has integer square root 2^k. for (int k {0}; k < 64; ++k) { - const uint128_t n {uint128_t{1} << (2 * k)}; - BOOST_TEST_EQ(isqrt(n), uint128_t{1} << k); + const uint128 n {uint128{1} << (2 * k)}; + BOOST_TEST_EQ(isqrt(n), uint128{1} << k); } // 2^(2k+1) has integer square root floor(2^(k+0.5)) = floor(sqrt(2) * 2^k). // Check the invariant holds rather than hard-coding the value. for (int k {0}; k < 63; ++k) { - check_invariant(uint128_t{1} << (2 * k + 1)); + check_invariant(uint128{1} << (2 * k + 1)); } // Just below and just above bit boundaries. for (int k {2}; k < 128; ++k) { - const uint128_t boundary {uint128_t{1} << k}; + const uint128 boundary {uint128{1} << k}; check_invariant(boundary - 1U); check_invariant(boundary); check_invariant(boundary + 1U); @@ -166,8 +166,8 @@ void test_uint128_isqrt_bit_boundaries() void test_uint128_isqrt_extreme() { // (uint128 max). (2^64)^2 = 2^128 wraps, so isqrt(2^128 - 1) = 2^64 - 1. - const uint128_t u128_max {(std::numeric_limits::max)()}; - const uint128_t u64_max {(std::numeric_limits::max)()}; + const uint128 u128_max {(std::numeric_limits::max)()}; + const uint128 u64_max {(std::numeric_limits::max)()}; BOOST_TEST_EQ(isqrt(u128_max), u64_max); // 2^128 - 2^65 + 1 = (2^64 - 1)^2 - exact square at the very top. @@ -178,9 +178,9 @@ void test_uint128_isqrt_extreme() // A handful of large hand-picked values, cross-checked against the bit-by- // bit reference. - const uint128_t big_a {UINT64_C(0x0123456789ABCDEF), UINT64_C(0xFEDCBA9876543210)}; - const uint128_t big_b {UINT64_C(0xDEADBEEFCAFEBABE), UINT64_C(0x0123456789ABCDEF)}; - const uint128_t big_c {UINT64_C(0x8000000000000000), 0U}; + const uint128 big_a {UINT64_C(0x0123456789ABCDEF), UINT64_C(0xFEDCBA9876543210)}; + const uint128 big_b {UINT64_C(0xDEADBEEFCAFEBABE), UINT64_C(0x0123456789ABCDEF)}; + const uint128 big_c {UINT64_C(0x8000000000000000), 0U}; BOOST_TEST_EQ(isqrt(big_a), isqrt_ref(big_a)); BOOST_TEST_EQ(isqrt(big_b), isqrt_ref(big_b)); @@ -194,22 +194,22 @@ void test_uint128_isqrt_extreme() void test_int128_isqrt() { - BOOST_TEST_EQ(isqrt(int128_t{0}), int128_t{0}); - BOOST_TEST_EQ(isqrt(int128_t{1}), int128_t{1}); - BOOST_TEST_EQ(isqrt(int128_t{2}), int128_t{1}); - BOOST_TEST_EQ(isqrt(int128_t{100}), int128_t{10}); - BOOST_TEST_EQ(isqrt(int128_t{144}), int128_t{12}); - BOOST_TEST_EQ(isqrt(int128_t{INT64_C(1000000000000000000)}), int128_t{INT64_C(1000000000)}); + BOOST_TEST_EQ(isqrt(int128{0}), int128{0}); + BOOST_TEST_EQ(isqrt(int128{1}), int128{1}); + BOOST_TEST_EQ(isqrt(int128{2}), int128{1}); + BOOST_TEST_EQ(isqrt(int128{100}), int128{10}); + BOOST_TEST_EQ(isqrt(int128{144}), int128{12}); + BOOST_TEST_EQ(isqrt(int128{INT64_C(1000000000000000000)}), int128{INT64_C(1000000000)}); // int128 max = 2^127 - 1. floor(sqrt) = floor(2^63.5) = 6074001000.7e9 // Use the unsigned implementation as the source of truth. - const int128_t i128_max {(std::numeric_limits::max)()}; - BOOST_TEST_EQ(isqrt(i128_max), static_cast(isqrt(static_cast(i128_max)))); + const int128 i128_max {(std::numeric_limits::max)()}; + BOOST_TEST_EQ(isqrt(i128_max), static_cast(isqrt(static_cast(i128_max)))); // Negative inputs are documented to return 0. - BOOST_TEST_EQ(isqrt(int128_t{-1}), int128_t{0}); - BOOST_TEST_EQ(isqrt(int128_t{-100}), int128_t{0}); - BOOST_TEST_EQ(isqrt((std::numeric_limits::min)()), int128_t{0}); + BOOST_TEST_EQ(isqrt(int128{-1}), int128{0}); + BOOST_TEST_EQ(isqrt(int128{-100}), int128{0}); + BOOST_TEST_EQ(isqrt((std::numeric_limits::min)()), int128{0}); } void test_isqrt_against_ipow() @@ -217,15 +217,15 @@ void test_isqrt_against_ipow() // isqrt(ipow(k, 2)) == k for any k whose square fits. for (std::uint64_t k {0}; k < 1000; ++k) { - BOOST_TEST_EQ(isqrt(ipow(uint128_t{k}, 2U)), uint128_t{k}); + BOOST_TEST_EQ(isqrt(ipow(uint128{k}, 2U)), uint128{k}); } // isqrt is monotonically non-decreasing. - uint128_t prev {0}; + uint128 prev {0}; for (std::uint64_t i {0}; i < 1000; ++i) { - const uint128_t curr {isqrt(uint128_t{i})}; + const uint128 curr {isqrt(uint128{i})}; BOOST_TEST(curr >= prev); prev = curr; } @@ -239,23 +239,23 @@ void test_isqrt_against_ipow() void test_constexpr_isqrt() { - constexpr uint128_t r1 {isqrt(uint128_t{0})}; - static_assert(r1 == uint128_t{0}, "isqrt(0) constexpr"); + constexpr uint128 r1 {isqrt(uint128{0})}; + static_assert(r1 == uint128{0}, "isqrt(0) constexpr"); - constexpr uint128_t r2 {isqrt(uint128_t{1})}; - static_assert(r2 == uint128_t{1}, "isqrt(1) constexpr"); + constexpr uint128 r2 {isqrt(uint128{1})}; + static_assert(r2 == uint128{1}, "isqrt(1) constexpr"); - constexpr uint128_t r3 {isqrt(uint128_t{100})}; - static_assert(r3 == uint128_t{10}, "isqrt(100) constexpr"); + constexpr uint128 r3 {isqrt(uint128{100})}; + static_assert(r3 == uint128{10}, "isqrt(100) constexpr"); - constexpr uint128_t r4 {isqrt(uint128_t{UINT64_C(1000000000000000000)})}; - static_assert(r4 == uint128_t{UINT64_C(1000000000)}, "isqrt(10^18) constexpr"); + constexpr uint128 r4 {isqrt(uint128{UINT64_C(1000000000000000000)})}; + static_assert(r4 == uint128{UINT64_C(1000000000)}, "isqrt(10^18) constexpr"); - constexpr int128_t r5 {isqrt(int128_t{-5})}; - static_assert(r5 == int128_t{0}, "isqrt negative constexpr"); + constexpr int128 r5 {isqrt(int128{-5})}; + static_assert(r5 == int128{0}, "isqrt negative constexpr"); - constexpr int128_t r6 {isqrt(int128_t{12321})}; - static_assert(r6 == int128_t{111}, "isqrt(12321) constexpr"); + constexpr int128 r6 {isqrt(int128{12321})}; + static_assert(r6 == int128{111}, "isqrt(12321) constexpr"); } #ifdef _MSC_VER diff --git a/test/test_layout.cpp b/test/test_layout.cpp index 5a6f54cc..be75fef2 100644 --- a/test/test_layout.cpp +++ b/test/test_layout.cpp @@ -2,9 +2,9 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt // -// Pins the storage layout of int128_t and uint128_t. Both halves of int128_t are +// Pins the storage layout of int128 and uint128. Both halves of int128 are // deliberately std::uint64_t so that the two words have the same type; when they -// differ the vectorizer cannot merge them and loops over int128_t are scalarized. +// differ the vectorizer cannot merge them and loops over int128 are scalarized. // Sign is recovered through signed_high(), which these tests also exercise. #ifndef BOOST_INT128_BUILD_MODULE @@ -24,42 +24,42 @@ import boost.int128; #include #include -using boost::int128::int128_t; -using boost::int128::uint128_t; +using boost::int128::int128; +using boost::int128::uint128; // Both words of both types are unsigned. Changing either of these regresses the // codegen this layout exists to enable. -static_assert(std::is_same::value, - "int128_t::high must be std::uint64_t; use signed_high() to read it as signed"); -static_assert(std::is_same::value, - "int128_t::low must be std::uint64_t"); -static_assert(std::is_same::value, - "uint128_t::high must be std::uint64_t"); -static_assert(std::is_same::value, - "uint128_t::low must be std::uint64_t"); - -static_assert(std::is_same::value, +static_assert(std::is_same::value, + "int128::high must be std::uint64_t; use signed_high() to read it as signed"); +static_assert(std::is_same::value, + "int128::low must be std::uint64_t"); +static_assert(std::is_same::value, + "uint128::high must be std::uint64_t"); +static_assert(std::is_same::value, + "uint128::low must be std::uint64_t"); + +static_assert(std::is_same::value, "signed_high() must yield std::int64_t"); -static_assert(sizeof(int128_t) == 16, "int128_t must be exactly 128 bits wide"); -static_assert(sizeof(uint128_t) == 16, "uint128_t must be exactly 128 bits wide"); -static_assert(alignof(int128_t) == alignof(uint128_t), "both types must agree on alignment"); +static_assert(sizeof(int128) == 16, "int128 must be exactly 128 bits wide"); +static_assert(sizeof(uint128) == 16, "uint128 must be exactly 128 bits wide"); +static_assert(alignof(int128) == alignof(uint128), "both types must agree on alignment"); -static_assert(std::is_trivially_copyable::value, "int128_t must be trivially copyable"); -static_assert(std::is_trivially_copyable::value, "uint128_t must be trivially copyable"); -static_assert(std::is_standard_layout::value, "int128_t must be standard layout"); -static_assert(std::is_standard_layout::value, "uint128_t must be standard layout"); +static_assert(std::is_trivially_copyable::value, "int128 must be trivially copyable"); +static_assert(std::is_trivially_copyable::value, "uint128 must be trivially copyable"); +static_assert(std::is_standard_layout::value, "int128 must be standard layout"); +static_assert(std::is_standard_layout::value, "uint128 must be standard layout"); // The words sit in memory in the platform's own order, so a memcpy of the object // matches a memcpy of the two words in that order. void test_word_order() { - const int128_t v {INT64_C(-2), UINT64_C(0x0123456789ABCDEF)}; + const int128 v {INT64_C(-2), UINT64_C(0x0123456789ABCDEF)}; - unsigned char from_object[sizeof(int128_t)] {}; + unsigned char from_object[sizeof(int128)] {}; std::memcpy(from_object, &v, sizeof(v)); - unsigned char from_words[sizeof(int128_t)] {}; + unsigned char from_words[sizeof(int128)] {}; #if BOOST_INT128_ENDIAN_LITTLE_BYTE std::memcpy(from_words, &v.low, sizeof(v.low)); std::memcpy(from_words + sizeof(v.low), &v.high, sizeof(v.high)); @@ -68,7 +68,7 @@ void test_word_order() std::memcpy(from_words + sizeof(v.high), &v.low, sizeof(v.low)); #endif - BOOST_TEST_EQ(std::memcmp(from_object, from_words, sizeof(int128_t)), 0); + BOOST_TEST_EQ(std::memcmp(from_object, from_words, sizeof(int128)), 0); } // signed_high() is a pure reinterpretation of the stored bits. @@ -81,7 +81,7 @@ void test_signed_high_round_trip() for (const auto h : highs) { - const int128_t v {h, UINT64_C(0xDEADBEEFCAFEF00D)}; + const int128 v {h, UINT64_C(0xDEADBEEFCAFEF00D)}; BOOST_TEST_EQ(v.signed_high(), h); BOOST_TEST_EQ(v.high, static_cast(h)); @@ -96,22 +96,22 @@ void test_signed_high_round_trip() // The two types share a representation, so converting between them moves no bits. void test_interconversion_is_bit_preserving() { - const int128_t signed_values[] { - int128_t{0, 0}, - int128_t{-1, UINT64_MAX}, - int128_t{INT64_MIN, 0}, - int128_t{INT64_MAX, UINT64_MAX}, - int128_t{-1, 0}, - int128_t{0, UINT64_MAX} + const int128 signed_values[] { + int128{0, 0}, + int128{-1, UINT64_MAX}, + int128{INT64_MIN, 0}, + int128{INT64_MAX, UINT64_MAX}, + int128{-1, 0}, + int128{0, UINT64_MAX} }; for (const auto& s : signed_values) { - const uint128_t u {s}; + const uint128 u {s}; BOOST_TEST_EQ(u.high, s.high); BOOST_TEST_EQ(u.low, s.low); - const int128_t back {u}; + const int128 back {u}; BOOST_TEST_EQ(back.high, s.high); BOOST_TEST_EQ(back.low, s.low); } @@ -121,16 +121,16 @@ void test_interconversion_is_bit_preserving() // from a negative literal keeps working. void test_two_word_construction() { - constexpr int128_t minus_one {-1, UINT64_MAX}; + constexpr int128 minus_one {-1, UINT64_MAX}; static_assert(minus_one.high == UINT64_MAX, "-1 sign extends into the high word"); static_assert(minus_one.signed_high() == -1, "signed_high sees the sign"); - constexpr int128_t int128_min {INT64_MIN, 0}; + constexpr int128 int128_min {INT64_MIN, 0}; static_assert(int128_min.high == (UINT64_C(1) << 63), "INT128_MIN high word"); static_assert(int128_min.signed_high() == INT64_MIN, "INT128_MIN reads back signed"); BOOST_TEST(minus_one == -1); - BOOST_TEST(int128_min == (std::numeric_limits::min)()); + BOOST_TEST(int128_min == (std::numeric_limits::min)()); } int main() diff --git a/test/test_limits_i128.cpp b/test/test_limits_i128.cpp index 6a6968fa..1af0e22f 100644 --- a/test/test_limits_i128.cpp +++ b/test/test_limits_i128.cpp @@ -20,13 +20,13 @@ import boost.int128; void test_basics() { - static_assert(std::numeric_limits::is_specialized, "Should be true"); - static_assert(std::numeric_limits::is_signed, "Should be true"); - static_assert(std::numeric_limits::is_integer, "Should be true"); - static_assert(std::numeric_limits::is_exact, "Should be true"); - static_assert(!std::numeric_limits::has_infinity, "Should be false"); - static_assert(!std::numeric_limits::has_quiet_NaN, "Should be false"); - static_assert(!std::numeric_limits::has_signaling_NaN, "Should be false"); + static_assert(std::numeric_limits::is_specialized, "Should be true"); + static_assert(std::numeric_limits::is_signed, "Should be true"); + static_assert(std::numeric_limits::is_integer, "Should be true"); + static_assert(std::numeric_limits::is_exact, "Should be true"); + static_assert(!std::numeric_limits::has_infinity, "Should be false"); + static_assert(!std::numeric_limits::has_quiet_NaN, "Should be false"); + static_assert(!std::numeric_limits::has_signaling_NaN, "Should be false"); // C++23 deprecated the following two members #if defined(__GNUC__) && __cplusplus > 202002L @@ -37,8 +37,8 @@ void test_basics() # pragma warning(disable:4996) #endif - static_assert(std::numeric_limits::has_denorm == std::denorm_absent, "No denorm"); - static_assert(!std::numeric_limits::has_denorm_loss, "No denorm"); + static_assert(std::numeric_limits::has_denorm == std::denorm_absent, "No denorm"); + static_assert(!std::numeric_limits::has_denorm_loss, "No denorm"); #if defined(__GNUC__) && __cplusplus > 202002L # pragma GCC diagnostic pop @@ -46,22 +46,22 @@ void test_basics() # pragma warning(pop) #endif - static_assert(std::numeric_limits::round_style == std::round_toward_zero, "Integer rounding"); - static_assert(!std::numeric_limits::is_iec559, "Should be false"); - static_assert(std::numeric_limits::is_bounded, "Should be true"); - static_assert(std::numeric_limits::is_modulo, "Should be true"); - static_assert(std::numeric_limits::digits == CHAR_BIT * sizeof(boost::int128::int128_t) - 1, "127 bits"); - - // std::numeric_limits::digits * std::log10(2) = 38.23 - static_assert(std::numeric_limits::digits10 == 38, "38 base 10 digits"); - static_assert(std::numeric_limits::max_digits10 == 0, "0 since not fp"); - static_assert(std::numeric_limits::radix == 2, "Should be 2"); - static_assert(std::numeric_limits::min_exponent == 0, "Should be 0"); - static_assert(std::numeric_limits::min_exponent10 == 0, "Should be 0"); - static_assert(std::numeric_limits::max_exponent == 0, "Should be 0"); - static_assert(std::numeric_limits::max_exponent10 == 0, "Should be 0"); - static_assert(std::numeric_limits::traps == std::numeric_limits::traps, "Uses what std::uint64_t does"); - static_assert(!std::numeric_limits::tinyness_before, "should be false"); + static_assert(std::numeric_limits::round_style == std::round_toward_zero, "Integer rounding"); + static_assert(!std::numeric_limits::is_iec559, "Should be false"); + static_assert(std::numeric_limits::is_bounded, "Should be true"); + static_assert(std::numeric_limits::is_modulo, "Should be true"); + static_assert(std::numeric_limits::digits == CHAR_BIT * sizeof(boost::int128::int128) - 1, "127 bits"); + + // std::numeric_limits::digits * std::log10(2) = 38.23 + static_assert(std::numeric_limits::digits10 == 38, "38 base 10 digits"); + static_assert(std::numeric_limits::max_digits10 == 0, "0 since not fp"); + static_assert(std::numeric_limits::radix == 2, "Should be 2"); + static_assert(std::numeric_limits::min_exponent == 0, "Should be 0"); + static_assert(std::numeric_limits::min_exponent10 == 0, "Should be 0"); + static_assert(std::numeric_limits::max_exponent == 0, "Should be 0"); + static_assert(std::numeric_limits::max_exponent10 == 0, "Should be 0"); + static_assert(std::numeric_limits::traps == std::numeric_limits::traps, "Uses what std::uint64_t does"); + static_assert(!std::numeric_limits::tinyness_before, "should be false"); } #ifdef BOOST_INT128_HAS_INT128 @@ -74,7 +74,7 @@ void test_member_functions() // Numeric limits are only defined in GNU mode for old compilers or GCC 13+ automatically BOOST_INT128_IF_CONSTEXPR (builtin_max != 0) { - using lib_i128 = boost::int128::int128_t; + using lib_i128 = boost::int128::int128; BOOST_TEST(std::numeric_limits::min() == std::numeric_limits::min()); BOOST_TEST(std::numeric_limits::lowest() == std::numeric_limits::lowest()); diff --git a/test/test_limits_u128.cpp b/test/test_limits_u128.cpp index db80de90..5a340ea8 100644 --- a/test/test_limits_u128.cpp +++ b/test/test_limits_u128.cpp @@ -20,13 +20,13 @@ import boost.int128; void test_basics() { - static_assert(std::numeric_limits::is_specialized, "Should be true"); - static_assert(!std::numeric_limits::is_signed, "Should be false"); - static_assert(std::numeric_limits::is_integer, "Should be true"); - static_assert(std::numeric_limits::is_exact, "Should be true"); - static_assert(!std::numeric_limits::has_infinity, "Should be false"); - static_assert(!std::numeric_limits::has_quiet_NaN, "Should be false"); - static_assert(!std::numeric_limits::has_signaling_NaN, "Should be false"); + static_assert(std::numeric_limits::is_specialized, "Should be true"); + static_assert(!std::numeric_limits::is_signed, "Should be false"); + static_assert(std::numeric_limits::is_integer, "Should be true"); + static_assert(std::numeric_limits::is_exact, "Should be true"); + static_assert(!std::numeric_limits::has_infinity, "Should be false"); + static_assert(!std::numeric_limits::has_quiet_NaN, "Should be false"); + static_assert(!std::numeric_limits::has_signaling_NaN, "Should be false"); // C++23 deprecated the following two members #if defined(__GNUC__) && __cplusplus > 202002L @@ -37,8 +37,8 @@ void test_basics() # pragma warning(disable:4996) #endif - static_assert(std::numeric_limits::has_denorm == std::denorm_absent, "No denorm"); - static_assert(!std::numeric_limits::has_denorm_loss, "No denorm"); + static_assert(std::numeric_limits::has_denorm == std::denorm_absent, "No denorm"); + static_assert(!std::numeric_limits::has_denorm_loss, "No denorm"); #if defined(__GNUC__) && __cplusplus > 202002L # pragma GCC diagnostic pop @@ -46,22 +46,22 @@ void test_basics() # pragma warning(pop) #endif - static_assert(std::numeric_limits::round_style == std::round_toward_zero, "Integer rounding"); - static_assert(!std::numeric_limits::is_iec559, "Should be false"); - static_assert(std::numeric_limits::is_bounded, "Should be true"); - static_assert(std::numeric_limits::is_modulo, "Should be true"); - static_assert(std::numeric_limits::digits == CHAR_BIT * sizeof(boost::int128::uint128_t), "128 bits"); - - // std::numeric_limits::digits * std::log10(2) = 38.532 - static_assert(std::numeric_limits::digits10 == 38, "38 base 10 digits"); - static_assert(std::numeric_limits::max_digits10 == 0, "0 since not fp"); - static_assert(std::numeric_limits::radix == 2, "Should be 2"); - static_assert(std::numeric_limits::min_exponent == 0, "Should be 0"); - static_assert(std::numeric_limits::min_exponent10 == 0, "Should be 0"); - static_assert(std::numeric_limits::max_exponent == 0, "Should be 0"); - static_assert(std::numeric_limits::max_exponent10 == 0, "Should be 0"); - static_assert(std::numeric_limits::traps == std::numeric_limits::traps, "Uses what std::uint64_t does"); - static_assert(!std::numeric_limits::tinyness_before, "should be false"); + static_assert(std::numeric_limits::round_style == std::round_toward_zero, "Integer rounding"); + static_assert(!std::numeric_limits::is_iec559, "Should be false"); + static_assert(std::numeric_limits::is_bounded, "Should be true"); + static_assert(std::numeric_limits::is_modulo, "Should be true"); + static_assert(std::numeric_limits::digits == CHAR_BIT * sizeof(boost::int128::uint128), "128 bits"); + + // std::numeric_limits::digits * std::log10(2) = 38.532 + static_assert(std::numeric_limits::digits10 == 38, "38 base 10 digits"); + static_assert(std::numeric_limits::max_digits10 == 0, "0 since not fp"); + static_assert(std::numeric_limits::radix == 2, "Should be 2"); + static_assert(std::numeric_limits::min_exponent == 0, "Should be 0"); + static_assert(std::numeric_limits::min_exponent10 == 0, "Should be 0"); + static_assert(std::numeric_limits::max_exponent == 0, "Should be 0"); + static_assert(std::numeric_limits::max_exponent10 == 0, "Should be 0"); + static_assert(std::numeric_limits::traps == std::numeric_limits::traps, "Uses what std::uint64_t does"); + static_assert(!std::numeric_limits::tinyness_before, "should be false"); } #ifdef BOOST_INT128_HAS_INT128 @@ -74,7 +74,7 @@ void test_member_functions() // Numeric limits are only defined in GNU mode for old compilers or GCC 13+ automatically BOOST_INT128_IF_CONSTEXPR (builtin_max != 0) { - using lib_u128 = boost::int128::uint128_t; + using lib_u128 = boost::int128::uint128; BOOST_TEST(std::numeric_limits::min() == std::numeric_limits::min()); BOOST_TEST(std::numeric_limits::lowest() == std::numeric_limits::lowest()); diff --git a/test/test_literals.cpp b/test/test_literals.cpp index 5fade8b7..f5749b0c 100644 --- a/test/test_literals.cpp +++ b/test/test_literals.cpp @@ -23,11 +23,11 @@ using namespace boost::int128::literals; void test_u128_literals() { - BOOST_TEST(boost::int128::uint128_t{0} == 0_u128); - BOOST_TEST(boost::int128::uint128_t{10} == "10"_U128); - BOOST_TEST(boost::int128::uint128_t{0} == BOOST_INT128_UINT128_C(0)); + BOOST_TEST(boost::int128::uint128{0} == 0_u128); + BOOST_TEST(boost::int128::uint128{10} == "10"_U128); + BOOST_TEST(boost::int128::uint128{0} == BOOST_INT128_UINT128_C(0)); - const boost::int128::uint128_t max_val {std::numeric_limits::max()}; + const boost::int128::uint128 max_val {std::numeric_limits::max()}; const auto macro_val {BOOST_INT128_UINT128_C(340282366920938463463374607431768211455)}; BOOST_TEST(max_val == macro_val); } @@ -41,25 +41,25 @@ void test_u128_literals() void test_u128_digit_separators() { // C++ digit separators (') are ignored inside numeric literals - BOOST_TEST(boost::int128::uint128_t{1234567} == 1'234'567_u128); - BOOST_TEST(boost::int128::uint128_t{1000} == 1'000_U128); - BOOST_TEST(boost::int128::uint128_t{1234} == 12'34_u128); + BOOST_TEST(boost::int128::uint128{1234567} == 1'234'567_u128); + BOOST_TEST(boost::int128::uint128{1000} == 1'000_U128); + BOOST_TEST(boost::int128::uint128{1234} == 12'34_u128); // Separators are also honored through the convenience macro - BOOST_TEST(boost::int128::uint128_t{1234} == BOOST_INT128_UINT128_C(1'234)); + BOOST_TEST(boost::int128::uint128{1234} == BOOST_INT128_UINT128_C(1'234)); // The string form of the literal skips separators as well - BOOST_TEST(boost::int128::uint128_t{1234} == "1'234"_u128); - BOOST_TEST(boost::int128::uint128_t{1234} == "1'234"_U128); + BOOST_TEST(boost::int128::uint128{1234} == "1'234"_u128); + BOOST_TEST(boost::int128::uint128{1234} == "1'234"_U128); // Full-width value with a separator between every group of three digits - const boost::int128::uint128_t max_val {std::numeric_limits::max()}; + const boost::int128::uint128 max_val {std::numeric_limits::max()}; BOOST_TEST(max_val == 340'282'366'920'938'463'463'374'607'431'768'211'455_u128); // MSVC 14.1 ICE #if !defined(_MSC_VER) || _MSC_VER >= 1920 // Separators must be usable in a constant expression - static_assert(100'000_u128 == boost::int128::uint128_t{100000}, "constexpr separator"); + static_assert(100'000_u128 == boost::int128::uint128{100000}, "constexpr separator"); #endif } @@ -68,44 +68,44 @@ void test_u128_base_prefixes() // A C++ base prefix is recognized and the digits parsed in that base // Hexadecimal (0x / 0X) - BOOST_TEST(boost::int128::uint128_t{255} == 0xFF_u128); - BOOST_TEST(boost::int128::uint128_t{255} == 0XfF_U128); - BOOST_TEST(boost::int128::uint128_t{255} == "0xff"_u128); - BOOST_TEST(boost::int128::uint128_t{0xDEADBEEFULL} == 0xDEAD'BEEF_u128); + BOOST_TEST(boost::int128::uint128{255} == 0xFF_u128); + BOOST_TEST(boost::int128::uint128{255} == 0XfF_U128); + BOOST_TEST(boost::int128::uint128{255} == "0xff"_u128); + BOOST_TEST(boost::int128::uint128{0xDEADBEEFULL} == 0xDEAD'BEEF_u128); // Binary (0b / 0B) - BOOST_TEST(boost::int128::uint128_t{10} == 0b1010_u128); - BOOST_TEST(boost::int128::uint128_t{240} == 0B1111'0000_U128); + BOOST_TEST(boost::int128::uint128{10} == 0b1010_u128); + BOOST_TEST(boost::int128::uint128{240} == 0B1111'0000_U128); // Octal (leading 0) - BOOST_TEST(boost::int128::uint128_t{511} == 0777_u128); - BOOST_TEST(boost::int128::uint128_t{8} == 010_u128); - BOOST_TEST(boost::int128::uint128_t{0} == 00_u128); + BOOST_TEST(boost::int128::uint128{511} == 0777_u128); + BOOST_TEST(boost::int128::uint128{8} == 010_u128); + BOOST_TEST(boost::int128::uint128{0} == 00_u128); // A full-width value written in hexadecimal is the maximum - const boost::int128::uint128_t max_val {std::numeric_limits::max()}; + const boost::int128::uint128 max_val {std::numeric_limits::max()}; BOOST_TEST(max_val == 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_u128); // MSVC 14.1 ICE #if !defined(_MSC_VER) || _MSC_VER >= 1920 // Prefixes must be usable in a constant expression - static_assert(0x10_u128 == boost::int128::uint128_t{16}, "constexpr hex"); - static_assert(0b100_u128 == boost::int128::uint128_t{4}, "constexpr binary"); - static_assert(010_u128 == boost::int128::uint128_t{8}, "constexpr octal"); + static_assert(0x10_u128 == boost::int128::uint128{16}, "constexpr hex"); + static_assert(0b100_u128 == boost::int128::uint128{4}, "constexpr binary"); + static_assert(010_u128 == boost::int128::uint128{8}, "constexpr octal"); #endif } void test_i128_literals() { - BOOST_TEST(boost::int128::int128_t{0} == 0_i128); - BOOST_TEST(boost::int128::int128_t{10} == "10"_I128); - BOOST_TEST(boost::int128::int128_t{0} == BOOST_INT128_INT128_C(0)); + BOOST_TEST(boost::int128::int128{0} == 0_i128); + BOOST_TEST(boost::int128::int128{10} == "10"_I128); + BOOST_TEST(boost::int128::int128{0} == BOOST_INT128_INT128_C(0)); - const boost::int128::int128_t max_val {std::numeric_limits::max()}; + const boost::int128::int128 max_val {std::numeric_limits::max()}; const auto macro_val {BOOST_INT128_INT128_C(170141183460469231731687303715884105727)}; BOOST_TEST(max_val == macro_val); - const boost::int128::int128_t min_val {std::numeric_limits::min()}; + const boost::int128::int128 min_val {std::numeric_limits::min()}; const auto min_macro_val {BOOST_INT128_INT128_C(-170141183460469231731687303715884105728)}; BOOST_TEST(min_val == min_macro_val); @@ -115,54 +115,54 @@ void test_i128_literals() void test_i128_digit_separators() { // C++ digit separators (') are ignored inside numeric literals - BOOST_TEST(boost::int128::int128_t{1000} == 1'000_i128); - BOOST_TEST(boost::int128::int128_t{9999} == 9'999_I128); + BOOST_TEST(boost::int128::int128{1000} == 1'000_i128); + BOOST_TEST(boost::int128::int128{9999} == 9'999_I128); // A leading unary minus is applied after the (separated) literal is parsed - BOOST_TEST(boost::int128::int128_t{-1000000} == -1'000'000_i128); + BOOST_TEST(boost::int128::int128{-1000000} == -1'000'000_i128); // Separators are also honored through the convenience macro - BOOST_TEST(boost::int128::int128_t{9999} == BOOST_INT128_INT128_C(9'999)); + BOOST_TEST(boost::int128::int128{9999} == BOOST_INT128_INT128_C(9'999)); // The string form of the literal skips separators as well - BOOST_TEST(boost::int128::int128_t{1234} == "1'234"_i128); - BOOST_TEST(boost::int128::int128_t{1234} == "1'234"_I128); + BOOST_TEST(boost::int128::int128{1234} == "1'234"_i128); + BOOST_TEST(boost::int128::int128{1234} == "1'234"_I128); // Full-width value with a separator between every group of three digits - const boost::int128::int128_t max_val {std::numeric_limits::max()}; + const boost::int128::int128 max_val {std::numeric_limits::max()}; BOOST_TEST(max_val == 170'141'183'460'469'231'731'687'303'715'884'105'727_i128); // MSVC 14.1 ICE #if !defined(_MSC_VER) || _MSC_VER >= 1920 // Separators must be usable in a constant expression - static_assert(100'000_i128 == boost::int128::int128_t{100000}, "constexpr separator"); + static_assert(100'000_i128 == boost::int128::int128{100000}, "constexpr separator"); #endif } void test_i128_base_prefixes() { // Hexadecimal, binary and octal prefixes are recognized for the signed type too - BOOST_TEST(boost::int128::int128_t{127} == 0x7F_i128); - BOOST_TEST(boost::int128::int128_t{255} == "0xFF"_I128); - BOOST_TEST(boost::int128::int128_t{10} == 0b1010_i128); - BOOST_TEST(boost::int128::int128_t{511} == 0777_i128); + BOOST_TEST(boost::int128::int128{127} == 0x7F_i128); + BOOST_TEST(boost::int128::int128{255} == "0xFF"_I128); + BOOST_TEST(boost::int128::int128{10} == 0b1010_i128); + BOOST_TEST(boost::int128::int128{511} == 0777_i128); // A leading unary minus is applied after the (prefixed) literal is parsed - BOOST_TEST(boost::int128::int128_t{-255} == -0xFF_i128); - BOOST_TEST(boost::int128::int128_t{-511} == -0777_i128); + BOOST_TEST(boost::int128::int128{-255} == -0xFF_i128); + BOOST_TEST(boost::int128::int128{-511} == -0777_i128); // The string form may embed the sign ahead of the prefix - BOOST_TEST(boost::int128::int128_t{-255} == "-0xFF"_i128); - BOOST_TEST(boost::int128::int128_t{-10} == "-0b1010"_I128); - BOOST_TEST(boost::int128::int128_t{-511} == "-0777"_i128); + BOOST_TEST(boost::int128::int128{-255} == "-0xFF"_i128); + BOOST_TEST(boost::int128::int128{-10} == "-0b1010"_I128); + BOOST_TEST(boost::int128::int128{-511} == "-0777"_i128); // A full-width positive value written in hexadecimal is the maximum - const boost::int128::int128_t max_val {std::numeric_limits::max()}; + const boost::int128::int128 max_val {std::numeric_limits::max()}; BOOST_TEST(max_val == 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_i128); // MSVC 14.1 ICE #if !defined(_MSC_VER) || _MSC_VER >= 1920 - static_assert(-0x10_i128 == boost::int128::int128_t{-16}, "constexpr signed hex"); + static_assert(-0x10_i128 == boost::int128::int128{-16}, "constexpr signed hex"); #endif } diff --git a/test/test_midpoint.cpp b/test/test_midpoint.cpp index 4c056b81..e1476fa8 100644 --- a/test/test_midpoint.cpp +++ b/test/test_midpoint.cpp @@ -40,25 +40,25 @@ template void test_big(); template <> -void test_big() +void test_big() { - using boost::int128::uint128_t; + using boost::int128::uint128; using boost::int128::midpoint; - constexpr auto max = std::numeric_limits::max(); + constexpr auto max = std::numeric_limits::max(); - BOOST_TEST_EQ(BOOST_INT128_UINT128_C(170141183460469231731687303715884105728), midpoint(max, std::numeric_limits::min())); + BOOST_TEST_EQ(BOOST_INT128_UINT128_C(170141183460469231731687303715884105728), midpoint(max, std::numeric_limits::min())); BOOST_TEST_EQ(max - 1u, midpoint(max, max - 2u)); } template <> -void test_big() +void test_big() { - using boost::int128::int128_t; + using boost::int128::int128; using boost::int128::midpoint; - constexpr auto max = std::numeric_limits::max(); - constexpr auto min = std::numeric_limits::min(); + constexpr auto max = std::numeric_limits::max(); + constexpr auto min = std::numeric_limits::min(); BOOST_TEST_EQ(0, midpoint(max, min)); @@ -69,14 +69,14 @@ void test_big() int main() { - test_trivial(); - test_trivial(); + test_trivial(); + test_trivial(); - test_rounding(); - test_rounding(); + test_rounding(); + test_rounding(); - test_big(); - test_big(); + test_big(); + test_big(); return boost::report_errors(); } diff --git a/test/test_mixed_type_sign_compare.cpp b/test/test_mixed_type_sign_compare.cpp index b2e868f3..833e2a8b 100644 --- a/test/test_mixed_type_sign_compare.cpp +++ b/test/test_mixed_type_sign_compare.cpp @@ -30,8 +30,8 @@ void test_left_unsigned() const auto lhs {u_dist(rng)}; const auto rhs {i_dist(rng)}; - const uint128_t lib_lhs {lhs}; - const int128_t lib_rhs {rhs}; + const uint128 lib_lhs {lhs}; + const int128 lib_rhs {rhs}; // Builtin oracle: same-rank int128/uint128 -> both promote to unsigned __int128 const builtin_u128 builtin_lhs {lhs}; @@ -47,10 +47,10 @@ void test_left_unsigned() // Edge cases that the old deviations would have answered differently { - const uint128_t lhs {42u}; - const int128_t rhs {-42}; + const uint128 lhs {42u}; + const int128 rhs {-42}; - // Builtin: int128_t(-42) -> unsigned huge; 42 vs huge + // Builtin: int128(-42) -> unsigned huge; 42 vs huge BOOST_TEST_EQ(lhs == rhs, false); BOOST_TEST_EQ(lhs != rhs, true); BOOST_TEST_EQ(lhs < rhs, true); // 42 < huge @@ -69,8 +69,8 @@ void test_right_unsigned() const auto lhs {i_dist(rng)}; const auto rhs {u_dist(rng)}; - const int128_t lib_lhs {lhs}; - const uint128_t lib_rhs {rhs}; + const int128 lib_lhs {lhs}; + const uint128 lib_rhs {rhs}; const builtin_u128 builtin_lhs = static_cast(static_cast<__int128>(lhs)); const builtin_u128 builtin_rhs {rhs}; @@ -84,10 +84,10 @@ void test_right_unsigned() } { - const int128_t lhs {-42}; - const uint128_t rhs {42u}; + const int128 lhs {-42}; + const uint128 rhs {42u}; - // Builtin: int128_t(-42) -> unsigned huge; huge vs 42 + // Builtin: int128(-42) -> unsigned huge; huge vs 42 BOOST_TEST_EQ(lhs == rhs, false); BOOST_TEST_EQ(lhs != rhs, true); BOOST_TEST_EQ(lhs < rhs, false); // huge not < 42 diff --git a/test/test_mixed_type_sign_conversion.cpp b/test/test_mixed_type_sign_conversion.cpp index 8c5f41ad..fe7c261a 100644 --- a/test/test_mixed_type_sign_conversion.cpp +++ b/test/test_mixed_type_sign_conversion.cpp @@ -39,29 +39,29 @@ void test() continue; // skip divide/modulo by zero } - const uint128_t lhs_u {u_val}; - const int128_t rhs_i {i_val}; + const uint128 lhs_u {u_val}; + const int128 rhs_i {i_val}; // Builtin oracle: both operands promoted to unsigned __int128 const builtin_u128 builtin_lhs {u_val}; const builtin_u128 builtin_rhs = static_cast(static_cast<__int128>(i_val)); - BOOST_TEST_EQ(lhs_u + rhs_i, uint128_t{builtin_lhs + builtin_rhs}); - BOOST_TEST_EQ(lhs_u - rhs_i, uint128_t{builtin_lhs - builtin_rhs}); - BOOST_TEST_EQ(lhs_u * rhs_i, uint128_t{builtin_lhs * builtin_rhs}); - BOOST_TEST_EQ(lhs_u / rhs_i, uint128_t{builtin_lhs / builtin_rhs}); - BOOST_TEST_EQ(lhs_u % rhs_i, uint128_t{builtin_lhs % builtin_rhs}); + BOOST_TEST_EQ(lhs_u + rhs_i, uint128{builtin_lhs + builtin_rhs}); + BOOST_TEST_EQ(lhs_u - rhs_i, uint128{builtin_lhs - builtin_rhs}); + BOOST_TEST_EQ(lhs_u * rhs_i, uint128{builtin_lhs * builtin_rhs}); + BOOST_TEST_EQ(lhs_u / rhs_i, uint128{builtin_lhs / builtin_rhs}); + BOOST_TEST_EQ(lhs_u % rhs_i, uint128{builtin_lhs % builtin_rhs}); // Reverse operand order if (u_val == 0) { continue; } - BOOST_TEST_EQ(rhs_i + lhs_u, uint128_t{builtin_rhs + builtin_lhs}); - BOOST_TEST_EQ(rhs_i - lhs_u, uint128_t{builtin_rhs - builtin_lhs}); - BOOST_TEST_EQ(rhs_i * lhs_u, uint128_t{builtin_rhs * builtin_lhs}); - BOOST_TEST_EQ(rhs_i / lhs_u, uint128_t{builtin_rhs / builtin_lhs}); - BOOST_TEST_EQ(rhs_i % lhs_u, uint128_t{builtin_rhs % builtin_lhs}); + BOOST_TEST_EQ(rhs_i + lhs_u, uint128{builtin_rhs + builtin_lhs}); + BOOST_TEST_EQ(rhs_i - lhs_u, uint128{builtin_rhs - builtin_lhs}); + BOOST_TEST_EQ(rhs_i * lhs_u, uint128{builtin_rhs * builtin_lhs}); + BOOST_TEST_EQ(rhs_i / lhs_u, uint128{builtin_rhs / builtin_lhs}); + BOOST_TEST_EQ(rhs_i % lhs_u, uint128{builtin_rhs % builtin_lhs}); } } diff --git a/test/test_num_digits.cpp b/test/test_num_digits.cpp index e709b4d0..c01cf23c 100644 --- a/test/test_num_digits.cpp +++ b/test/test_num_digits.cpp @@ -20,18 +20,18 @@ #endif static std::mt19937_64 rng{42}; -boost::random::uniform_int_distribution dist(std::numeric_limits::min(), - std::numeric_limits::max()); - -constexpr std::array edge_cases {{ - boost::int128::uint128_t{1, 0}, - boost::int128::uint128_t{1, 1}, - boost::int128::uint128_t{2, 0}, - boost::int128::uint128_t{2, UINT64_MAX - 1U}, - boost::int128::uint128_t{4, 0}, +boost::random::uniform_int_distribution dist(std::numeric_limits::min(), + std::numeric_limits::max()); + +constexpr std::array edge_cases {{ + boost::int128::uint128{1, 0}, + boost::int128::uint128{1, 1}, + boost::int128::uint128{2, 0}, + boost::int128::uint128{2, UINT64_MAX - 1U}, + boost::int128::uint128{4, 0}, }}; -constexpr int trivial_num_digits(boost::int128::uint128_t x) noexcept +constexpr int trivial_num_digits(boost::int128::uint128 x) noexcept { int digits = 0; diff --git a/test/test_popcount.cu b/test/test_popcount.cu index a819ee09..8c50be38 100644 --- a/test/test_popcount.cu +++ b/test/test_popcount.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, int *out, int numElements) { diff --git a/test/test_popcount_sycl.cpp b/test/test_popcount_sycl.cpp index dcddf7b3..6f82dd10 100644 --- a/test/test_popcount_sycl.cpp +++ b/test/test_popcount_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return boost::int128::popcount(a); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return boost::int128::popcount(a); }); } diff --git a/test/test_powm.cpp b/test/test_powm.cpp index f1045ba7..87442bb5 100644 --- a/test/test_powm.cpp +++ b/test/test_powm.cpp @@ -28,113 +28,113 @@ using namespace boost::int128; void test_uint128_powm_basic() { - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{10}, uint128_t{1000}), uint128_t{24}); - BOOST_TEST_EQ(powm(uint128_t{3}, uint128_t{5}, uint128_t{7}), uint128_t{5}); - BOOST_TEST_EQ(powm(uint128_t{7}, uint128_t{13}, uint128_t{19}), uint128_t{7}); - BOOST_TEST_EQ(powm(uint128_t{5}, uint128_t{10}, uint128_t{13}), uint128_t{12}); + BOOST_TEST_EQ(powm(uint128{2}, uint128{10}, uint128{1000}), uint128{24}); + BOOST_TEST_EQ(powm(uint128{3}, uint128{5}, uint128{7}), uint128{5}); + BOOST_TEST_EQ(powm(uint128{7}, uint128{13}, uint128{19}), uint128{7}); + BOOST_TEST_EQ(powm(uint128{5}, uint128{10}, uint128{13}), uint128{12}); // 10^9 ~ -7 (mod 1000000007), so 10^18 ~ 49. - BOOST_TEST_EQ(powm(uint128_t{10}, uint128_t{18}, uint128_t{1000000007}), uint128_t{49}); + BOOST_TEST_EQ(powm(uint128{10}, uint128{18}, uint128{1000000007}), uint128{49}); // exp == 0 - BOOST_TEST_EQ(powm(uint128_t{5}, uint128_t{0}, uint128_t{1000}), uint128_t{1}); - BOOST_TEST_EQ(powm(uint128_t{0}, uint128_t{0}, uint128_t{7}), uint128_t{1}); + BOOST_TEST_EQ(powm(uint128{5}, uint128{0}, uint128{1000}), uint128{1}); + BOOST_TEST_EQ(powm(uint128{0}, uint128{0}, uint128{7}), uint128{1}); // base == 0 - BOOST_TEST_EQ(powm(uint128_t{0}, uint128_t{5}, uint128_t{7}), uint128_t{0}); - BOOST_TEST_EQ(powm(uint128_t{0}, uint128_t{1}, uint128_t{7}), uint128_t{0}); + BOOST_TEST_EQ(powm(uint128{0}, uint128{5}, uint128{7}), uint128{0}); + BOOST_TEST_EQ(powm(uint128{0}, uint128{1}, uint128{7}), uint128{0}); // base == 1 - BOOST_TEST_EQ(powm(uint128_t{1}, uint128_t{1000}, uint128_t{42}), uint128_t{1}); + BOOST_TEST_EQ(powm(uint128{1}, uint128{1000}, uint128{42}), uint128{1}); // exp == 1 - BOOST_TEST_EQ(powm(uint128_t{42}, uint128_t{1}, uint128_t{100}), uint128_t{42}); + BOOST_TEST_EQ(powm(uint128{42}, uint128{1}, uint128{100}), uint128{42}); // m == 1 - BOOST_TEST_EQ(powm(uint128_t{42}, uint128_t{17}, uint128_t{1}), uint128_t{0}); + BOOST_TEST_EQ(powm(uint128{42}, uint128{17}, uint128{1}), uint128{0}); // m == 0 - documented to return 0 - BOOST_TEST_EQ(powm(uint128_t{42}, uint128_t{17}, uint128_t{0}), uint128_t{0}); + BOOST_TEST_EQ(powm(uint128{42}, uint128{17}, uint128{0}), uint128{0}); // Base larger than the modulus must be reduced first. - BOOST_TEST_EQ(powm(uint128_t{1234567}, uint128_t{2}, uint128_t{1000}), uint128_t{(1234567ULL * 1234567ULL) % 1000ULL}); + BOOST_TEST_EQ(powm(uint128{1234567}, uint128{2}, uint128{1000}), uint128{(1234567ULL * 1234567ULL) % 1000ULL}); } void test_uint128_powm_power_of_two_modulus() { - BOOST_TEST_EQ(powm(uint128_t{3}, uint128_t{10}, uint128_t{128}), uint128_t{41}); - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{7}, uint128_t{128}), uint128_t{0}); - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{6}, uint128_t{128}), uint128_t{64}); - - const uint128_t m32 {static_cast(1) << 32}; - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{32}, m32), uint128_t{0}); - BOOST_TEST_EQ(powm(uint128_t{3}, uint128_t{20}, m32), uint128_t{3486784401ULL}); - - const uint128_t m64 {1U, 0U}; - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{64}, m64), uint128_t{0}); - const uint128_t high_bit {0U, static_cast(1) << 63}; - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{63}, m64), high_bit); - - const uint128_t m127 {static_cast(1) << 63, 0U}; - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{127}, m127), uint128_t{0}); - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{126}, m127), m127 >> 1); + BOOST_TEST_EQ(powm(uint128{3}, uint128{10}, uint128{128}), uint128{41}); + BOOST_TEST_EQ(powm(uint128{2}, uint128{7}, uint128{128}), uint128{0}); + BOOST_TEST_EQ(powm(uint128{2}, uint128{6}, uint128{128}), uint128{64}); + + const uint128 m32 {static_cast(1) << 32}; + BOOST_TEST_EQ(powm(uint128{2}, uint128{32}, m32), uint128{0}); + BOOST_TEST_EQ(powm(uint128{3}, uint128{20}, m32), uint128{3486784401ULL}); + + const uint128 m64 {1U, 0U}; + BOOST_TEST_EQ(powm(uint128{2}, uint128{64}, m64), uint128{0}); + const uint128 high_bit {0U, static_cast(1) << 63}; + BOOST_TEST_EQ(powm(uint128{2}, uint128{63}, m64), high_bit); + + const uint128 m127 {static_cast(1) << 63, 0U}; + BOOST_TEST_EQ(powm(uint128{2}, uint128{127}, m127), uint128{0}); + BOOST_TEST_EQ(powm(uint128{2}, uint128{126}, m127), m127 >> 1); } void test_uint128_powm_fermat_64bit() { // Mersenne prime p = 2^61 - 1. - const uint128_t p {UINT64_C(2305843009213693951)}; + const uint128 p {UINT64_C(2305843009213693951)}; for (std::uint64_t a {2}; a < 25; ++a) { - BOOST_TEST_EQ(powm(uint128_t{a}, p - 1U, p), uint128_t{1}); + BOOST_TEST_EQ(powm(uint128{a}, p - 1U, p), uint128{1}); } // Common 32-bit primes that show up in competitive math problems. - const uint128_t mod_a {UINT64_C(1000000007)}; - const uint128_t mod_b {UINT64_C(998244353)}; + const uint128 mod_a {UINT64_C(1000000007)}; + const uint128 mod_b {UINT64_C(998244353)}; for (std::uint64_t a {2}; a < 10; ++a) { - BOOST_TEST_EQ(powm(uint128_t{a}, mod_a - 1U, mod_a), uint128_t{1}); - BOOST_TEST_EQ(powm(uint128_t{a}, mod_b - 1U, mod_b), uint128_t{1}); + BOOST_TEST_EQ(powm(uint128{a}, mod_a - 1U, mod_a), uint128{1}); + BOOST_TEST_EQ(powm(uint128{a}, mod_b - 1U, mod_b), uint128{1}); } } void test_uint128_powm_fermat_128bit() { // Mersenne prime p = 2^127 - 1 = 170141183460469231731687303715884105727. - const uint128_t p {UINT64_C(0x7FFFFFFFFFFFFFFF), UINT64_C(0xFFFFFFFFFFFFFFFF)}; + const uint128 p {UINT64_C(0x7FFFFFFFFFFFFFFF), UINT64_C(0xFFFFFFFFFFFFFFFF)}; for (std::uint64_t a {2}; a < 6; ++a) { - BOOST_TEST_EQ(powm(uint128_t{a}, p - 1U, p), uint128_t{1}); + BOOST_TEST_EQ(powm(uint128{a}, p - 1U, p), uint128{1}); } // a^p mod p == a mod p for prime p (Fermat). - const uint128_t big_base {UINT64_C(0x0123456789ABCDEF), UINT64_C(0xFEDCBA9876543210)}; + const uint128 big_base {UINT64_C(0x0123456789ABCDEF), UINT64_C(0xFEDCBA9876543210)}; BOOST_TEST_EQ(powm(big_base, p, p), big_base % p); } void test_uint128_powm_properties() { // (a^(b+c)) mod m == ((a^b)(a^c)) mod m - const uint128_t m {UINT64_C(1000000007)}; - const uint128_t a {42}; - const uint128_t b {17}; - const uint128_t c {23}; + const uint128 m {UINT64_C(1000000007)}; + const uint128 a {42}; + const uint128 b {17}; + const uint128 c {23}; BOOST_TEST_EQ(powm(a, b + c, m), (powm(a, b, m) * powm(a, c, m)) % m); // (a^e * b^e) mod m == ((a*b)^e) mod m - const uint128_t aa {7}; - const uint128_t bb {11}; - const uint128_t e {30}; + const uint128 aa {7}; + const uint128 bb {11}; + const uint128 e {30}; BOOST_TEST_EQ(powm(aa * bb, e, m), (powm(aa, e, m) * powm(bb, e, m)) % m); // Same identities through the full-128-bit code path. - const uint128_t big_m {1U, UINT64_C(0xDEADBEEFCAFEBABE)}; - const uint128_t big_a {UINT64_C(0x00000000DEADBEEF), UINT64_C(0xBEEFCAFEFACEFEED)}; - const uint128_t b1 {13}; - const uint128_t b2 {21}; + const uint128 big_m {1U, UINT64_C(0xDEADBEEFCAFEBABE)}; + const uint128 big_a {UINT64_C(0x00000000DEADBEEF), UINT64_C(0xBEEFCAFEFACEFEED)}; + const uint128 b1 {13}; + const uint128 b2 {21}; BOOST_TEST_EQ(powm(big_a, b1 + b2, big_m), detail::mulmod_shift(powm(big_a, b1, big_m), powm(big_a, b2, big_m), big_m)); } @@ -142,54 +142,54 @@ void test_uint128_powm_extreme() { // Modulus exactly 2^64 - 1: not a power of two, exercises the small-m path // at its upper boundary. Since 2^64 ~ 1 (mod 2^64 - 1), 2^64 mod m == 1. - const uint128_t m_u64max {(std::numeric_limits::max)()}; - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{64}, m_u64max), uint128_t{1}); - BOOST_TEST_EQ(powm(uint128_t{3}, uint128_t{0}, m_u64max), uint128_t{1}); + const uint128 m_u64max {(std::numeric_limits::max)()}; + BOOST_TEST_EQ(powm(uint128{2}, uint128{64}, m_u64max), uint128{1}); + BOOST_TEST_EQ(powm(uint128{3}, uint128{0}, m_u64max), uint128{1}); // 2^65 - 1 forces the general 128-bit path. 2^65 ~ 1 (mod 2^65 - 1). - const uint128_t m65 {1U, UINT64_C(0xFFFFFFFFFFFFFFFF)}; - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{65}, m65), uint128_t{1}); - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{130}, m65), uint128_t{1}); - BOOST_TEST_EQ(powm(uint128_t{2}, uint128_t{64}, m65), (uint128_t{1U, 0U})); - BOOST_TEST_EQ(powm(uint128_t{4}, uint128_t{65}, m65), uint128_t{1}); + const uint128 m65 {1U, UINT64_C(0xFFFFFFFFFFFFFFFF)}; + BOOST_TEST_EQ(powm(uint128{2}, uint128{65}, m65), uint128{1}); + BOOST_TEST_EQ(powm(uint128{2}, uint128{130}, m65), uint128{1}); + BOOST_TEST_EQ(powm(uint128{2}, uint128{64}, m65), (uint128{1U, 0U})); + BOOST_TEST_EQ(powm(uint128{4}, uint128{65}, m65), uint128{1}); // Full 128-bit modulus with high bit set so addmod must take the overflow // branch when doubling values near m. - const uint128_t m_high {UINT64_C(0x8000000000000001), 0U}; - BOOST_TEST_EQ(powm(uint128_t{1}, uint128_t{1234567}, m_high), uint128_t{1}); - BOOST_TEST_EQ(powm(uint128_t{0}, uint128_t{1234567}, m_high), uint128_t{0}); + const uint128 m_high {UINT64_C(0x8000000000000001), 0U}; + BOOST_TEST_EQ(powm(uint128{1}, uint128{1234567}, m_high), uint128{1}); + BOOST_TEST_EQ(powm(uint128{0}, uint128{1234567}, m_high), uint128{0}); // Small base whose square still fits in 128 bits gives a hand-verifiable // answer while still routing through the shift-and-add path. - BOOST_TEST_EQ(powm(uint128_t{10}, uint128_t{4}, m_high), uint128_t{10000}); + BOOST_TEST_EQ(powm(uint128{10}, uint128{4}, m_high), uint128{10000}); } void test_int128_powm() { - BOOST_TEST_EQ(powm(int128_t{2}, int128_t{10}, int128_t{1000}), int128_t{24}); - BOOST_TEST_EQ(powm(int128_t{3}, int128_t{5}, int128_t{7}), int128_t{5}); + BOOST_TEST_EQ(powm(int128{2}, int128{10}, int128{1000}), int128{24}); + BOOST_TEST_EQ(powm(int128{3}, int128{5}, int128{7}), int128{5}); // Negative bases reduce to non-negative residues. - BOOST_TEST_EQ(powm(int128_t{-3}, int128_t{2}, int128_t{5}), int128_t{4}); - BOOST_TEST_EQ(powm(int128_t{-3}, int128_t{3}, int128_t{5}), int128_t{3}); - BOOST_TEST_EQ(powm(int128_t{-1}, int128_t{100}, int128_t{1000}), int128_t{1}); - BOOST_TEST_EQ(powm(int128_t{-1}, int128_t{101}, int128_t{1000}), int128_t{999}); + BOOST_TEST_EQ(powm(int128{-3}, int128{2}, int128{5}), int128{4}); + BOOST_TEST_EQ(powm(int128{-3}, int128{3}, int128{5}), int128{3}); + BOOST_TEST_EQ(powm(int128{-1}, int128{100}, int128{1000}), int128{1}); + BOOST_TEST_EQ(powm(int128{-1}, int128{101}, int128{1000}), int128{999}); // Negative base where the magnitude is a multiple of m reduces to 0. - BOOST_TEST_EQ(powm(int128_t{-10}, int128_t{5}, int128_t{5}), int128_t{0}); + BOOST_TEST_EQ(powm(int128{-10}, int128{5}, int128{5}), int128{0}); // INT128_MIN handling: abs() preserves the bit pattern, which maps to 2^127 - // when reinterpreted as uint128_t. 2^127 mod 5 == 3 (since 2^4 ~ 1 (mod 5) + // when reinterpreted as uint128. 2^127 mod 5 == 3 (since 2^4 ~ 1 (mod 5) // gives 2^127 = 2^(4*31+3) ~ 8 ~ 3), so the negative residue is 5 - 3 = 2. - BOOST_TEST_EQ(powm((std::numeric_limits::min)(), int128_t{1}, int128_t{5}), int128_t{2}); + BOOST_TEST_EQ(powm((std::numeric_limits::min)(), int128{1}, int128{5}), int128{2}); // 2^127 mod 7 == 2 (since 2^3 ~ 1 (mod 7), 2^127 = 2^(3*42+1) ~ 2), so the // residue of -2^127 mod 7 is 7 - 2 = 5. - BOOST_TEST_EQ(powm((std::numeric_limits::min)(), int128_t{1}, int128_t{7}), int128_t{5}); + BOOST_TEST_EQ(powm((std::numeric_limits::min)(), int128{1}, int128{7}), int128{5}); // Invalid arguments are documented to return 0. - BOOST_TEST_EQ(powm(int128_t{2}, int128_t{10}, int128_t{0}), int128_t{0}); - BOOST_TEST_EQ(powm(int128_t{2}, int128_t{10}, int128_t{-5}), int128_t{0}); - BOOST_TEST_EQ(powm(int128_t{2}, int128_t{-1}, int128_t{5}), int128_t{0}); + BOOST_TEST_EQ(powm(int128{2}, int128{10}, int128{0}), int128{0}); + BOOST_TEST_EQ(powm(int128{2}, int128{10}, int128{-5}), int128{0}); + BOOST_TEST_EQ(powm(int128{2}, int128{-1}, int128{5}), int128{0}); } // Only present with MSVC 14.1 @@ -201,14 +201,14 @@ void test_int128_powm() void test_constexpr_powm() { - constexpr uint128_t r1 {powm(uint128_t{2}, uint128_t{10}, uint128_t{1000})}; - static_assert(r1 == uint128_t{24}, "powm constexpr small case"); + constexpr uint128 r1 {powm(uint128{2}, uint128{10}, uint128{1000})}; + static_assert(r1 == uint128{24}, "powm constexpr small case"); - constexpr uint128_t r2 {powm(uint128_t{3}, uint128_t{10}, uint128_t{128})}; - static_assert(r2 == uint128_t{41}, "powm constexpr power-of-two modulus"); + constexpr uint128 r2 {powm(uint128{3}, uint128{10}, uint128{128})}; + static_assert(r2 == uint128{41}, "powm constexpr power-of-two modulus"); - constexpr int128_t r3 {powm(int128_t{-3}, int128_t{3}, int128_t{5})}; - static_assert(r3 == int128_t{3}, "powm constexpr signed"); + constexpr int128 r3 {powm(int128{-3}, int128{3}, int128{5})}; + static_assert(r3 == int128{3}, "powm constexpr signed"); } int main() diff --git a/test/test_rotl.cu b/test/test_rotl.cu index 6056552f..45b31b42 100644 --- a/test/test_rotl.cu +++ b/test/test_rotl.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const int *shift, test_type *out, int numElements) { diff --git a/test/test_rotl_sycl.cpp b/test/test_rotl_sycl.cpp index 455937e2..0351c45f 100644 --- a/test/test_rotl_sycl.cpp +++ b/test/test_rotl_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int i) { return boost::int128::rotl(a, i % 128); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int i) { return boost::int128::rotl(a, i % 128); }); } diff --git a/test/test_rotr.cu b/test/test_rotr.cu index 619bab6f..259f15d7 100644 --- a/test/test_rotr.cu +++ b/test/test_rotr.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const int *shift, test_type *out, int numElements) { diff --git a/test/test_rotr_sycl.cpp b/test/test_rotr_sycl.cpp index 3b84d634..9eca2818 100644 --- a/test/test_rotr_sycl.cpp +++ b/test/test_rotr_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int i) { return boost::int128::rotr(a, i % 128); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int i) { return boost::int128::rotr(a, i % 128); }); } diff --git a/test/test_saturating_arith.cpp b/test/test_saturating_arith.cpp index 6e790195..58f20be3 100644 --- a/test/test_saturating_arith.cpp +++ b/test/test_saturating_arith.cpp @@ -15,26 +15,26 @@ template void test_add_sat(); template <> -void test_add_sat() +void test_add_sat() { using boost::int128::saturating_add; - auto near_max {std::numeric_limits::max() - boost::int128::uint128_t{5}}; + auto near_max {std::numeric_limits::max() - boost::int128::uint128{5}}; - for (boost::int128::uint128_t i {0}; i < boost::int128::uint128_t{5}; ++i) + for (boost::int128::uint128 i {0}; i < boost::int128::uint128{5}; ++i) { const auto sat_res {saturating_add(near_max, i)}; - BOOST_TEST(sat_res < std::numeric_limits::max()); + BOOST_TEST(sat_res < std::numeric_limits::max()); const auto res {near_max + i}; BOOST_TEST(sat_res == res); } - near_max += boost::int128::uint128_t{5}; - for (boost::int128::uint128_t i {1}; i < boost::int128::uint128_t{5}; ++i) + near_max += boost::int128::uint128{5}; + for (boost::int128::uint128 i {1}; i < boost::int128::uint128{5}; ++i) { const auto sat_res {saturating_add(near_max, i)}; - BOOST_TEST(sat_res == std::numeric_limits::max()); + BOOST_TEST(sat_res == std::numeric_limits::max()); const auto res {near_max + i}; BOOST_TEST(sat_res != res); @@ -42,7 +42,7 @@ void test_add_sat() } template <> -void test_add_sat() +void test_add_sat() { // There are four branches that need to be tested // 1) x > 0 && y > 0 @@ -52,14 +52,14 @@ void test_add_sat() using boost::int128::saturating_add; - constexpr auto min {std::numeric_limits::min()}; - constexpr auto max {std::numeric_limits::max()}; + constexpr auto min {std::numeric_limits::min()}; + constexpr auto max {std::numeric_limits::max()}; // 1 - We can only overflow, but there are many such cases { - auto near_max {max - boost::int128::int128_t{5}}; + auto near_max {max - boost::int128::int128{5}}; - for (boost::int128::int128_t i {0}; i < boost::int128::int128_t{5}; ++i) + for (boost::int128::int128 i {0}; i < boost::int128::int128{5}; ++i) { const auto sat_res {saturating_add(near_max, i)}; BOOST_TEST(sat_res < max); @@ -68,8 +68,8 @@ void test_add_sat() BOOST_TEST(sat_res == res); } - near_max += boost::int128::int128_t{5}; - for (boost::int128::int128_t i {1}; i < boost::int128::int128_t{5}; ++i) + near_max += boost::int128::int128{5}; + for (boost::int128::int128 i {1}; i < boost::int128::int128{5}; ++i) { const auto sat_res {saturating_add(near_max, i)}; BOOST_TEST(sat_res == max); @@ -80,8 +80,8 @@ void test_add_sat() { for (std::size_t i {0}; i < N; ++i) { - boost::int128::int128_t x {signed_dist(rng), dist(rng)}; - boost::int128::int128_t y {signed_dist(rng), dist(rng)}; + boost::int128::int128 x {signed_dist(rng), dist(rng)}; + boost::int128::int128 y {signed_dist(rng), dist(rng)}; if (x > 0) { @@ -106,8 +106,8 @@ void test_add_sat() { for (std::size_t i {0}; i < N; ++i) { - boost::int128::int128_t x {signed_dist(rng), dist(rng)}; - boost::int128::int128_t y {signed_dist(rng), dist(rng)}; + boost::int128::int128 x {signed_dist(rng), dist(rng)}; + boost::int128::int128 y {signed_dist(rng), dist(rng)}; if (x < 0) { @@ -130,9 +130,9 @@ void test_add_sat() // 4 - We can only underflow, and there exist many ways to do so { - auto near_min {min + boost::int128::int128_t{5}}; + auto near_min {min + boost::int128::int128{5}}; - for (boost::int128::int128_t i {0}; i > boost::int128::int128_t{-5}; --i) + for (boost::int128::int128 i {0}; i > boost::int128::int128{-5}; --i) { const auto sat_res {saturating_add(near_min, i)}; BOOST_TEST(sat_res > min); @@ -141,8 +141,8 @@ void test_add_sat() BOOST_TEST(sat_res == res); } - near_min -= boost::int128::int128_t{5}; - for (boost::int128::int128_t i {-1}; i > boost::int128::int128_t{-5}; --i) + near_min -= boost::int128::int128{5}; + for (boost::int128::int128 i {-1}; i > boost::int128::int128{-5}; --i) { const auto sat_res {saturating_add(near_min, i)}; BOOST_TEST(sat_res == min); @@ -154,26 +154,26 @@ template void test_sub_sat(); template <> -void test_sub_sat() +void test_sub_sat() { using boost::int128::saturating_sub; - auto near_min {std::numeric_limits::min() + boost::int128::uint128_t{5}}; + auto near_min {std::numeric_limits::min() + boost::int128::uint128{5}}; - for (boost::int128::uint128_t i {0}; i < boost::int128::uint128_t{5}; ++i) + for (boost::int128::uint128 i {0}; i < boost::int128::uint128{5}; ++i) { const auto sat_res {saturating_sub(near_min, i)}; - BOOST_TEST(sat_res > std::numeric_limits::min()); + BOOST_TEST(sat_res > std::numeric_limits::min()); const auto res {near_min - i}; BOOST_TEST(sat_res == res); } - near_min -= boost::int128::uint128_t{5}; - for (boost::int128::uint128_t i {1}; i < boost::int128::uint128_t{5}; ++i) + near_min -= boost::int128::uint128{5}; + for (boost::int128::uint128 i {1}; i < boost::int128::uint128{5}; ++i) { const auto sat_res {saturating_sub(near_min, i)}; - BOOST_TEST(sat_res == std::numeric_limits::min()); + BOOST_TEST(sat_res == std::numeric_limits::min()); const auto res {near_min + i}; BOOST_TEST(sat_res != res); @@ -181,7 +181,7 @@ void test_sub_sat() } template <> -void test_sub_sat() +void test_sub_sat() { // The same as saturating_add but the logic backwards // There are four branches that need to be tested @@ -192,15 +192,15 @@ void test_sub_sat() using boost::int128::saturating_sub; - constexpr auto min {std::numeric_limits::min()}; - constexpr auto max {std::numeric_limits::max()}; + constexpr auto min {std::numeric_limits::min()}; + constexpr auto max {std::numeric_limits::max()}; // 1 - Nothing bad can happen here { for (std::size_t i {0}; i < N; ++i) { - boost::int128::int128_t x {signed_dist(rng), dist(rng)}; - boost::int128::int128_t y {signed_dist(rng), dist(rng)}; + boost::int128::int128 x {signed_dist(rng), dist(rng)}; + boost::int128::int128 y {signed_dist(rng), dist(rng)}; if (x < 0) { @@ -223,9 +223,9 @@ void test_sub_sat() // 2 - Underflow is possible in this case { - auto near_min {min + boost::int128::int128_t{5}}; + auto near_min {min + boost::int128::int128{5}}; - for (boost::int128::int128_t i {0}; i < boost::int128::int128_t{5}; ++i) + for (boost::int128::int128 i {0}; i < boost::int128::int128{5}; ++i) { const auto sat_res {saturating_sub(near_min, i)}; BOOST_TEST(sat_res > min); @@ -235,7 +235,7 @@ void test_sub_sat() } near_min = min; - for (boost::int128::int128_t i {1}; i < boost::int128::int128_t{5}; ++i) + for (boost::int128::int128 i {1}; i < boost::int128::int128{5}; ++i) { const auto sat_res {saturating_sub(near_min, i)}; BOOST_TEST(sat_res == min); @@ -250,9 +250,9 @@ void test_sub_sat() // 3 - Overflow is possible in this case { - auto near_max {max - boost::int128::int128_t{5}}; + auto near_max {max - boost::int128::int128{5}}; - for (boost::int128::int128_t i {0}; i > boost::int128::int128_t{-5}; --i) + for (boost::int128::int128 i {0}; i > boost::int128::int128{-5}; --i) { const auto sat_res {saturating_sub(near_max, i)}; BOOST_TEST(sat_res < max); @@ -261,8 +261,8 @@ void test_sub_sat() BOOST_TEST(sat_res == res); } - near_max += boost::int128::int128_t{5}; - for (boost::int128::int128_t i {-1}; i > boost::int128::int128_t{-5}; --i) + near_max += boost::int128::int128{5}; + for (boost::int128::int128 i {-1}; i > boost::int128::int128{-5}; --i) { const auto sat_res {saturating_sub(near_max, i)}; BOOST_TEST(sat_res == max); @@ -273,8 +273,8 @@ void test_sub_sat() { for (std::size_t i {0}; i < N; ++i) { - boost::int128::int128_t x {signed_dist(rng), dist(rng)}; - boost::int128::int128_t y {signed_dist(rng), dist(rng)}; + boost::int128::int128 x {signed_dist(rng), dist(rng)}; + boost::int128::int128 y {signed_dist(rng), dist(rng)}; if (x > 0) { @@ -300,18 +300,18 @@ template void test_mul_sat(); template <> -void test_mul_sat() +void test_mul_sat() { using boost::int128::saturating_mul; - boost::int128::uint128_t x {2U}; - boost::int128::uint128_t y {2U}; + boost::int128::uint128 x {2U}; + boost::int128::uint128 y {2U}; int bit_count {4}; while (bit_count <= 128) { const auto sat_res {saturating_mul(x, y)}; - BOOST_TEST(sat_res < std::numeric_limits::max()); + BOOST_TEST(sat_res < std::numeric_limits::max()); const auto res {x * y}; BOOST_TEST(res == sat_res); @@ -325,7 +325,7 @@ void test_mul_sat() while (bit_count < 256) { const auto sat_res {saturating_mul(x, y)}; - BOOST_TEST(sat_res == std::numeric_limits::max()); + BOOST_TEST(sat_res == std::numeric_limits::max()); const auto res {x * y}; BOOST_TEST(res != sat_res); @@ -339,19 +339,19 @@ void test_mul_sat() } template <> -void test_mul_sat() +void test_mul_sat() { using boost::int128::saturating_mul; { - boost::int128::int128_t x {2}; - boost::int128::int128_t y {2}; + boost::int128::int128 x {2}; + boost::int128::int128 y {2}; int bit_count {4}; while (bit_count < 128) { const auto sat_res {saturating_mul(x, y)}; - BOOST_TEST(sat_res < std::numeric_limits::max()); + BOOST_TEST(sat_res < std::numeric_limits::max()); const auto res {x * y}; BOOST_TEST(res == sat_res); @@ -365,7 +365,7 @@ void test_mul_sat() while (bit_count < 254) { const auto sat_res {saturating_mul(x, y)}; - BOOST_TEST(sat_res == std::numeric_limits::max()); + BOOST_TEST(sat_res == std::numeric_limits::max()); const auto res {x * y}; BOOST_TEST(res != sat_res); @@ -377,17 +377,17 @@ void test_mul_sat() } } { - boost::int128::int128_t x {2}; - boost::int128::int128_t y {-2}; + boost::int128::int128 x {2}; + boost::int128::int128 y {-2}; int bit_count {4}; while (bit_count < 128) { const auto sat_res {saturating_mul(x, y)}; - BOOST_TEST(sat_res < std::numeric_limits::max()); - BOOST_TEST(sat_res > std::numeric_limits::min()); + BOOST_TEST(sat_res < std::numeric_limits::max()); + BOOST_TEST(sat_res > std::numeric_limits::min()); - const boost::int128::int128_t res {x * y}; + const boost::int128::int128 res {x * y}; BOOST_TEST(res == sat_res); x <<= 1; @@ -403,8 +403,8 @@ void test_mul_sat() return; // LCOV_EXCL_LINE } - const boost::int128::int128_t sat_res {saturating_mul(x, y)}; - BOOST_TEST(sat_res == std::numeric_limits::min()); + const boost::int128::int128 sat_res {saturating_mul(x, y)}; + BOOST_TEST(sat_res == std::numeric_limits::min()); x <<= 1; y *= 2; @@ -417,14 +417,14 @@ template void test_div_sat(); template <> -void test_div_sat() +void test_div_sat() { using boost::int128::saturating_div; for (std::size_t i {}; i < N; ++i) { - const boost::int128::uint128_t value1{dist(rng), dist(rng)}; - const boost::int128::uint128_t value2{dist(rng), dist(rng)}; + const boost::int128::uint128 value1{dist(rng), dist(rng)}; + const boost::int128::uint128 value2{dist(rng), dist(rng)}; const auto sat_res {saturating_div(value1, value2)}; const auto res {value1 / value2}; @@ -434,14 +434,14 @@ void test_div_sat() } template <> -void test_div_sat() +void test_div_sat() { using boost::int128::saturating_div; for (std::size_t i {}; i < N; ++i) { - const boost::int128::int128_t value1{signed_dist(rng), dist(rng)}; - const boost::int128::int128_t value2{signed_dist(rng), dist(rng)}; + const boost::int128::int128 value1{signed_dist(rng), dist(rng)}; + const boost::int128::int128 value2{signed_dist(rng), dist(rng)}; const auto sat_res {saturating_div(value1, value2)}; const auto res {value1 / value2}; @@ -449,8 +449,8 @@ void test_div_sat() BOOST_TEST(sat_res == res); } - constexpr auto min_val {std::numeric_limits::min()}; - constexpr auto max_val{std::numeric_limits::max()}; + constexpr auto min_val {std::numeric_limits::min()}; + constexpr auto max_val{std::numeric_limits::max()}; BOOST_TEST(saturating_div(min_val, -1) == max_val); } @@ -458,14 +458,14 @@ template void test_saturate_cast(); template <> -void test_saturate_cast() +void test_saturate_cast() { using boost::int128::saturating_cast; for (std::size_t i {}; i < N; ++i) { const auto value {dist(rng)}; - const boost::int128::uint128_t big_value{value}; + const boost::int128::uint128 big_value{value}; BOOST_TEST(saturating_cast(big_value) == value); BOOST_TEST(saturating_cast(big_value) == static_cast(big_value)); @@ -474,21 +474,21 @@ void test_saturate_cast() for (std::size_t i {}; i < N; ++i) { const auto value {dist(rng)}; - const boost::int128::uint128_t big_value{value, value}; + const boost::int128::uint128 big_value{value, value}; BOOST_TEST(saturating_cast(big_value) == std::numeric_limits::max()); BOOST_TEST(saturating_cast(big_value) != static_cast(big_value)); } } template <> -void test_saturate_cast() +void test_saturate_cast() { using boost::int128::saturating_cast; for (std::size_t i {}; i < N; ++i) { const auto value {signed_dist(rng)}; - const boost::int128::int128_t big_value{value}; + const boost::int128::int128 big_value{value}; BOOST_TEST(saturating_cast(big_value) == value); BOOST_TEST(saturating_cast(big_value) == static_cast(big_value)); @@ -498,7 +498,7 @@ void test_saturate_cast() { const auto hi_word {signed_dist(rng)}; const auto lo_word {dist(rng)}; - const boost::int128::int128_t big_value{hi_word, lo_word}; + const boost::int128::int128 big_value{hi_word, lo_word}; if (hi_word > 0) { @@ -513,17 +513,17 @@ void test_saturate_cast() int main() { - test_add_sat(); - test_sub_sat(); - test_mul_sat(); - test_div_sat(); - test_saturate_cast(); - - test_add_sat(); - test_sub_sat(); - test_mul_sat(); - test_div_sat(); - test_saturate_cast(); + test_add_sat(); + test_sub_sat(); + test_mul_sat(); + test_div_sat(); + test_saturate_cast(); + + test_add_sat(); + test_sub_sat(); + test_mul_sat(); + test_div_sat(); + test_saturate_cast(); return boost::report_errors(); } diff --git a/test/test_sign_compare.cpp b/test/test_sign_compare.cpp index b6314a12..b915ed12 100644 --- a/test/test_sign_compare.cpp +++ b/test/test_sign_compare.cpp @@ -7,7 +7,7 @@ void test_u128() { - constexpr boost::int128::uint128_t x {5U}; + constexpr boost::int128::uint128 x {5U}; BOOST_TEST(x > 4); BOOST_TEST(x >= 4); BOOST_TEST(x == 5); @@ -18,7 +18,7 @@ void test_u128() void test_int128() { - constexpr boost::int128::int128_t x {5}; + constexpr boost::int128::int128 x {5}; BOOST_TEST(x > 4U); BOOST_TEST(x >= 4U); BOOST_TEST(x == 5U); diff --git a/test/test_signed_add.cu b/test/test_signed_add.cu index c691671f..3a0faf43 100644 --- a/test/test_signed_add.cu +++ b/test/test_signed_add.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_add_sycl.cpp b/test/test_signed_add_sycl.cpp index 503607e9..b8f14bec 100644 --- a/test/test_signed_add_sycl.cpp +++ b/test/test_signed_add_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return a + b; }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return a + b; }); } diff --git a/test/test_signed_and.cu b/test/test_signed_and.cu index 36622e5a..a544df6c 100644 --- a/test/test_signed_and.cu +++ b/test/test_signed_and.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_signed_and_sycl.cpp b/test/test_signed_and_sycl.cpp index b07cb135..8b177a30 100644 --- a/test/test_signed_and_sycl.cpp +++ b/test/test_signed_and_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return a & b; }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return a & b; }); } diff --git a/test/test_signed_cstdlib_div.cu b/test/test_signed_cstdlib_div.cu index 0c30a435..4790bddc 100644 --- a/test/test_signed_cstdlib_div.cu +++ b/test/test_signed_cstdlib_div.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; using result_type = boost::int128::i128div_t; __global__ void cuda_test(const test_type *in, const test_type *in2, result_type *out, int numElements) diff --git a/test/test_signed_cstdlib_div_sycl.cpp b/test/test_signed_cstdlib_div_sycl.cpp index d29d1e19..60aa0201 100644 --- a/test/test_signed_cstdlib_div_sycl.cpp +++ b/test/test_signed_cstdlib_div_sycl.cpp @@ -4,12 +4,12 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) + return int128_sycl_test::run( + [](int128 a, int128 b, int) { const auto d {boost::int128::div(a, int128_sycl_test::safe_divisor(a, b))}; return d.quot ^ d.rem; diff --git a/test/test_signed_div.cu b/test/test_signed_div.cu index 04957feb..2de54ba6 100644 --- a/test/test_signed_div.cu +++ b/test/test_signed_div.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_div_sycl.cpp b/test/test_signed_div_sycl.cpp index c1e79735..9e82da86 100644 --- a/test/test_signed_div_sycl.cpp +++ b/test/test_signed_div_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return int128_sycl_test::safe_div(a, b); }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return int128_sycl_test::safe_div(a, b); }); } diff --git a/test/test_signed_eq.cu b/test/test_signed_eq.cu index 7713a3f4..693c4bc7 100644 --- a/test/test_signed_eq.cu +++ b/test/test_signed_eq.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_eq_sycl.cpp b/test/test_signed_eq_sycl.cpp index a189c583..7c1f7b92 100644 --- a/test/test_signed_eq_sycl.cpp +++ b/test/test_signed_eq_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run_compare( - [](int128_t a, int128_t b) { return a == b; }); + return int128_sycl_test::run_compare( + [](int128 a, int128 b) { return a == b; }); } diff --git a/test/test_signed_from_chars.cu b/test/test_signed_from_chars.cu index d868fb4c..b2e0001a 100644 --- a/test/test_signed_from_chars.cu +++ b/test/test_signed_from_chars.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; constexpr int BUF_SIZE = 64; diff --git a/test/test_signed_from_chars_bases.cu b/test/test_signed_from_chars_bases.cu index 929d29b7..65ca2605 100644 --- a/test/test_signed_from_chars_bases.cu +++ b/test/test_signed_from_chars_bases.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; constexpr int BUF_SIZE = 192; diff --git a/test/test_signed_from_chars_bases_sycl.cpp b/test/test_signed_from_chars_bases_sycl.cpp index 4eff473f..1579a027 100644 --- a/test/test_signed_from_chars_bases_sycl.cpp +++ b/test/test_signed_from_chars_bases_sycl.cpp @@ -4,14 +4,14 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { int result {0}; - result |= int128_sycl_test::run_from_chars(2); - result |= int128_sycl_test::run_from_chars(8); - result |= int128_sycl_test::run_from_chars(16); - result |= int128_sycl_test::run_from_chars(36); + result |= int128_sycl_test::run_from_chars(2); + result |= int128_sycl_test::run_from_chars(8); + result |= int128_sycl_test::run_from_chars(16); + result |= int128_sycl_test::run_from_chars(36); return result; } diff --git a/test/test_signed_from_chars_sycl.cpp b/test/test_signed_from_chars_sycl.cpp index 0c79d30a..fd0de0e3 100644 --- a/test/test_signed_from_chars_sycl.cpp +++ b/test/test_signed_from_chars_sycl.cpp @@ -4,9 +4,9 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run_from_chars(10); + return int128_sycl_test::run_from_chars(10); } diff --git a/test/test_signed_gcd.cu b/test/test_signed_gcd.cu index 358dfa5a..80238cb4 100644 --- a/test/test_signed_gcd.cu +++ b/test/test_signed_gcd.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_signed_gcd_sycl.cpp b/test/test_signed_gcd_sycl.cpp index ee10860c..c26dc9ee 100644 --- a/test/test_signed_gcd_sycl.cpp +++ b/test/test_signed_gcd_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return boost::int128::gcd(a, b); }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return boost::int128::gcd(a, b); }); } diff --git a/test/test_signed_ge.cu b/test/test_signed_ge.cu index 76e154e4..d11476a9 100644 --- a/test/test_signed_ge.cu +++ b/test/test_signed_ge.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_ge_sycl.cpp b/test/test_signed_ge_sycl.cpp index 25d69c00..70f6d676 100644 --- a/test/test_signed_ge_sycl.cpp +++ b/test/test_signed_ge_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run_compare( - [](int128_t a, int128_t b) { return a >= b; }); + return int128_sycl_test::run_compare( + [](int128 a, int128 b) { return a >= b; }); } diff --git a/test/test_signed_gt.cu b/test/test_signed_gt.cu index e4a136e0..33565c99 100644 --- a/test/test_signed_gt.cu +++ b/test/test_signed_gt.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_gt_sycl.cpp b/test/test_signed_gt_sycl.cpp index d5298102..046e4b5d 100644 --- a/test/test_signed_gt_sycl.cpp +++ b/test/test_signed_gt_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run_compare( - [](int128_t a, int128_t b) { return a > b; }); + return int128_sycl_test::run_compare( + [](int128 a, int128 b) { return a > b; }); } diff --git a/test/test_signed_lcm.cu b/test/test_signed_lcm.cu index cb6ab9fa..84c94133 100644 --- a/test/test_signed_lcm.cu +++ b/test/test_signed_lcm.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_signed_lcm_sycl.cpp b/test/test_signed_lcm_sycl.cpp index 11962a42..53dd5057 100644 --- a/test/test_signed_lcm_sycl.cpp +++ b/test/test_signed_lcm_sycl.cpp @@ -4,11 +4,11 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { // Restrict inputs so the true LCM stays within 128 bits. - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return boost::int128::lcm(a >> 65, b >> 65); }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return boost::int128::lcm(a >> 65, b >> 65); }); } diff --git a/test/test_signed_le.cu b/test/test_signed_le.cu index 96645085..bc5e5d67 100644 --- a/test/test_signed_le.cu +++ b/test/test_signed_le.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_le_sycl.cpp b/test/test_signed_le_sycl.cpp index 75aa2607..b45a45bc 100644 --- a/test/test_signed_le_sycl.cpp +++ b/test/test_signed_le_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run_compare( - [](int128_t a, int128_t b) { return a <= b; }); + return int128_sycl_test::run_compare( + [](int128 a, int128 b) { return a <= b; }); } diff --git a/test/test_signed_left_shift.cu b/test/test_signed_left_shift.cu index 279d327d..f959bf0f 100644 --- a/test/test_signed_left_shift.cu +++ b/test/test_signed_left_shift.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const unsigned *shift, test_type *out, int numElements) { diff --git a/test/test_signed_left_shift_sycl.cpp b/test/test_signed_left_shift_sycl.cpp index 0a1e1d03..d958360e 100644 --- a/test/test_signed_left_shift_sycl.cpp +++ b/test/test_signed_left_shift_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t, int i) { return a << (i % 128); }); + return int128_sycl_test::run( + [](int128 a, int128, int i) { return a << (i % 128); }); } diff --git a/test/test_signed_literals.cu b/test/test_signed_literals.cu index 1e7ff273..aaa9f358 100644 --- a/test/test_signed_literals.cu +++ b/test/test_signed_literals.cu @@ -13,7 +13,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using boost::int128::int128_t; +using boost::int128::int128; using namespace boost::int128::literals; // Number of test cases: we test each literal operator with several values @@ -27,7 +27,7 @@ using namespace boost::int128::literals; constexpr int NUM_TESTS = 30; -__global__ void cuda_test(int128_t *out) +__global__ void cuda_test(int128 *out) { int i = threadIdx.x; @@ -80,7 +80,7 @@ int main(void) std::cout << "[Signed literal tests: " << NUM_TESTS << " cases]" << std::endl; - cuda_managed_ptr output(NUM_TESTS); + cuda_managed_ptr output(NUM_TESTS); // Launch with 1 block of NUM_TESTS threads watch w; @@ -98,7 +98,7 @@ int main(void) } // Build expected values on host using the same literals - int128_t expected[NUM_TESTS]; + int128 expected[NUM_TESTS]; // operator""_i128(const char*) - raw literal (values must fit unsigned long long to avoid NVCC warnings) expected[0] = 0_i128; diff --git a/test/test_signed_literals_sycl.cpp b/test/test_signed_literals_sycl.cpp index 9c48fe2c..ce62d1db 100644 --- a/test/test_signed_literals_sycl.cpp +++ b/test/test_signed_literals_sycl.cpp @@ -7,7 +7,7 @@ #include #include -using boost::int128::int128_t; +using boost::int128::int128; using namespace boost::int128::literals; // Exercises the signed user-defined literal operators inside a SYCL kernel and checks the @@ -19,7 +19,7 @@ int main() sycl::queue q; std::cout << "SYCL device: " << q.get_device().get_info() << "\n"; - int128_t* out {sycl::malloc_shared(N, q)}; + int128* out {sycl::malloc_shared(N, q)}; q.submit([&](sycl::handler& h) { @@ -48,7 +48,7 @@ int main() }); }).wait(); - int128_t expected[N]; + int128 expected[N]; expected[0] = 0_i128; expected[1] = 1_i128; expected[2] = -1_i128; diff --git a/test/test_signed_lt.cu b/test/test_signed_lt.cu index 6cd4ef89..45c251cf 100644 --- a/test/test_signed_lt.cu +++ b/test/test_signed_lt.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_lt_sycl.cpp b/test/test_signed_lt_sycl.cpp index 0c0d5a75..7ba22b5d 100644 --- a/test/test_signed_lt_sycl.cpp +++ b/test/test_signed_lt_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run_compare( - [](int128_t a, int128_t b) { return a < b; }); + return int128_sycl_test::run_compare( + [](int128 a, int128 b) { return a < b; }); } diff --git a/test/test_signed_midpoint.cu b/test/test_signed_midpoint.cu index f2cba237..701fbebe 100644 --- a/test/test_signed_midpoint.cu +++ b/test/test_signed_midpoint.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_signed_midpoint_sycl.cpp b/test/test_signed_midpoint_sycl.cpp index d350bfe5..0188ce92 100644 --- a/test/test_signed_midpoint_sycl.cpp +++ b/test/test_signed_midpoint_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return boost::int128::midpoint(a, b); }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return boost::int128::midpoint(a, b); }); } diff --git a/test/test_signed_mod.cu b/test/test_signed_mod.cu index 325c94ea..a367b5fa 100644 --- a/test/test_signed_mod.cu +++ b/test/test_signed_mod.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_mod_sycl.cpp b/test/test_signed_mod_sycl.cpp index 1b022a29..f9143abe 100644 --- a/test/test_signed_mod_sycl.cpp +++ b/test/test_signed_mod_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return int128_sycl_test::safe_mod(a, b); }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return int128_sycl_test::safe_mod(a, b); }); } diff --git a/test/test_signed_mul.cu b/test/test_signed_mul.cu index 4ff6828a..959e4e4a 100644 --- a/test/test_signed_mul.cu +++ b/test/test_signed_mul.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_mul_sycl.cpp b/test/test_signed_mul_sycl.cpp index d04d886c..7c0eb309 100644 --- a/test/test_signed_mul_sycl.cpp +++ b/test/test_signed_mul_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return a * b; }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return a * b; }); } diff --git a/test/test_signed_ne.cu b/test/test_signed_ne.cu index 6e256401..5614b239 100644 --- a/test/test_signed_ne.cu +++ b/test/test_signed_ne.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_ne_sycl.cpp b/test/test_signed_ne_sycl.cpp index 5fce2bf3..e324e7dc 100644 --- a/test/test_signed_ne_sycl.cpp +++ b/test/test_signed_ne_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run_compare( - [](int128_t a, int128_t b) { return a != b; }); + return int128_sycl_test::run_compare( + [](int128 a, int128 b) { return a != b; }); } diff --git a/test/test_signed_not.cu b/test/test_signed_not.cu index 7bfc6a88..3eb677e3 100644 --- a/test/test_signed_not.cu +++ b/test/test_signed_not.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, test_type *out, int numElements) { diff --git a/test/test_signed_not_sycl.cpp b/test/test_signed_not_sycl.cpp index c846f1cf..055c3f89 100644 --- a/test/test_signed_not_sycl.cpp +++ b/test/test_signed_not_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t, int) { return ~a; }); + return int128_sycl_test::run( + [](int128 a, int128, int) { return ~a; }); } diff --git a/test/test_signed_or.cu b/test/test_signed_or.cu index cc73d6a8..dac2c1e1 100644 --- a/test/test_signed_or.cu +++ b/test/test_signed_or.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_signed_or_sycl.cpp b/test/test_signed_or_sycl.cpp index e15cb187..83fdaa3e 100644 --- a/test/test_signed_or_sycl.cpp +++ b/test/test_signed_or_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return a | b; }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return a | b; }); } diff --git a/test/test_signed_right_shift.cu b/test/test_signed_right_shift.cu index 73f4aedd..66bfeb11 100644 --- a/test/test_signed_right_shift.cu +++ b/test/test_signed_right_shift.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const unsigned *shift, test_type *out, int numElements) { diff --git a/test/test_signed_right_shift_sycl.cpp b/test/test_signed_right_shift_sycl.cpp index 1ebf1b56..21b56386 100644 --- a/test/test_signed_right_shift_sycl.cpp +++ b/test/test_signed_right_shift_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t, int i) { return a >> (i % 128); }); + return int128_sycl_test::run( + [](int128 a, int128, int i) { return a >> (i % 128); }); } diff --git a/test/test_signed_saturating_add.cu b/test/test_signed_saturating_add.cu index 5ca06a3d..20711b3c 100644 --- a/test/test_signed_saturating_add.cu +++ b/test/test_signed_saturating_add.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_signed_saturating_add_sycl.cpp b/test/test_signed_saturating_add_sycl.cpp index 91bdb58b..92e7f1fa 100644 --- a/test/test_signed_saturating_add_sycl.cpp +++ b/test/test_signed_saturating_add_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return boost::int128::saturating_add(a, b); }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return boost::int128::saturating_add(a, b); }); } diff --git a/test/test_signed_saturating_div.cu b/test/test_signed_saturating_div.cu index 7753deff..6ba7ee48 100644 --- a/test/test_signed_saturating_div.cu +++ b/test/test_signed_saturating_div.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_signed_saturating_div_sycl.cpp b/test/test_signed_saturating_div_sycl.cpp index 2b94634d..53bc5e89 100644 --- a/test/test_signed_saturating_div_sycl.cpp +++ b/test/test_signed_saturating_div_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return boost::int128::saturating_div(a, int128_sycl_test::safe_divisor(a, b)); }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return boost::int128::saturating_div(a, int128_sycl_test::safe_divisor(a, b)); }); } diff --git a/test/test_signed_saturating_mul.cu b/test/test_signed_saturating_mul.cu index 264deb82..e0599f8d 100644 --- a/test/test_signed_saturating_mul.cu +++ b/test/test_signed_saturating_mul.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_signed_saturating_mul_sycl.cpp b/test/test_signed_saturating_mul_sycl.cpp index 6a77bcf7..17391206 100644 --- a/test/test_signed_saturating_mul_sycl.cpp +++ b/test/test_signed_saturating_mul_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return boost::int128::saturating_mul(a, b); }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return boost::int128::saturating_mul(a, b); }); } diff --git a/test/test_signed_saturating_sub.cu b/test/test_signed_saturating_sub.cu index 26ec3fd5..9cdbe249 100644 --- a/test/test_signed_saturating_sub.cu +++ b/test/test_signed_saturating_sub.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_signed_saturating_sub_sycl.cpp b/test/test_signed_saturating_sub_sycl.cpp index 21decc2a..f1632030 100644 --- a/test/test_signed_saturating_sub_sycl.cpp +++ b/test/test_signed_saturating_sub_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return boost::int128::saturating_sub(a, b); }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return boost::int128::saturating_sub(a, b); }); } diff --git a/test/test_signed_sub.cu b/test/test_signed_sub.cu index 5fc8339a..fb6ed066 100644 --- a/test/test_signed_sub.cu +++ b/test/test_signed_sub.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; /** * CUDA Kernel Device code diff --git a/test/test_signed_sub_sycl.cpp b/test/test_signed_sub_sycl.cpp index f0b18f31..2dce668a 100644 --- a/test/test_signed_sub_sycl.cpp +++ b/test/test_signed_sub_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return a - b; }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return a - b; }); } diff --git a/test/test_signed_to_chars.cu b/test/test_signed_to_chars.cu index 064dcd50..fa517d0f 100644 --- a/test/test_signed_to_chars.cu +++ b/test/test_signed_to_chars.cu @@ -19,7 +19,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; constexpr int BUF_SIZE = 64; diff --git a/test/test_signed_to_chars_bases.cu b/test/test_signed_to_chars_bases.cu index aa6faaac..58c8fdea 100644 --- a/test/test_signed_to_chars_bases.cu +++ b/test/test_signed_to_chars_bases.cu @@ -19,7 +19,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; constexpr int BUF_SIZE = 192; diff --git a/test/test_signed_to_chars_bases_sycl.cpp b/test/test_signed_to_chars_bases_sycl.cpp index b64c9114..4be7aba3 100644 --- a/test/test_signed_to_chars_bases_sycl.cpp +++ b/test/test_signed_to_chars_bases_sycl.cpp @@ -4,14 +4,14 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { int result {0}; - result |= int128_sycl_test::run_to_chars(2); - result |= int128_sycl_test::run_to_chars(8); - result |= int128_sycl_test::run_to_chars(16); - result |= int128_sycl_test::run_to_chars(36); + result |= int128_sycl_test::run_to_chars(2); + result |= int128_sycl_test::run_to_chars(8); + result |= int128_sycl_test::run_to_chars(16); + result |= int128_sycl_test::run_to_chars(36); return result; } diff --git a/test/test_signed_to_chars_sycl.cpp b/test/test_signed_to_chars_sycl.cpp index 176b5e95..ee90f5b8 100644 --- a/test/test_signed_to_chars_sycl.cpp +++ b/test/test_signed_to_chars_sycl.cpp @@ -4,9 +4,9 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run_to_chars(10); + return int128_sycl_test::run_to_chars(10); } diff --git a/test/test_signed_to_unsigned_conversion.cu b/test/test_signed_to_unsigned_conversion.cu index 35cd558f..4ca40610 100644 --- a/test/test_signed_to_unsigned_conversion.cu +++ b/test/test_signed_to_unsigned_conversion.cu @@ -17,8 +17,8 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using signed_type = boost::int128::int128_t; -using unsigned_type = boost::int128::uint128_t; +using signed_type = boost::int128::int128; +using unsigned_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_signed_to_unsigned_conversion_sycl.cpp b/test/test_signed_to_unsigned_conversion_sycl.cpp index 093d06b1..e319397e 100644 --- a/test/test_signed_to_unsigned_conversion_sycl.cpp +++ b/test/test_signed_to_unsigned_conversion_sycl.cpp @@ -4,11 +4,11 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; -using boost::int128::uint128_t; +using boost::int128::int128; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t, int) { return static_cast(a); }); + return int128_sycl_test::run( + [](int128 a, int128, int) { return static_cast(a); }); } diff --git a/test/test_signed_xor.cu b/test/test_signed_xor.cu index bcd70dce..d4f53013 100644 --- a/test/test_signed_xor.cu +++ b/test/test_signed_xor.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::int128_t; +using test_type = boost::int128::int128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_signed_xor_sycl.cpp b/test/test_signed_xor_sycl.cpp index 8687865d..004c3fa9 100644 --- a/test/test_signed_xor_sycl.cpp +++ b/test/test_signed_xor_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; +using boost::int128::int128; int main() { - return int128_sycl_test::run( - [](int128_t a, int128_t b, int) { return a ^ b; }); + return int128_sycl_test::run( + [](int128 a, int128 b, int) { return a ^ b; }); } diff --git a/test/test_spaceship_operator.cpp b/test/test_spaceship_operator.cpp index bf839583..b5cdb26a 100644 --- a/test/test_spaceship_operator.cpp +++ b/test/test_spaceship_operator.cpp @@ -10,7 +10,7 @@ void test_u128() { - constexpr boost::int128::uint128_t x {5U}; + constexpr boost::int128::uint128 x {5U}; BOOST_TEST((x <=> 4U) == std::strong_ordering::greater); BOOST_TEST((x <=> 5U) == std::strong_ordering::equivalent); BOOST_TEST((x <=> 5U) == std::strong_ordering::equal); @@ -19,7 +19,7 @@ void test_u128() void test_int128() { - constexpr boost::int128::int128_t x {5}; + constexpr boost::int128::int128 x {5}; BOOST_TEST((x <=> 4) == std::strong_ordering::greater); BOOST_TEST((x <=> 5) == std::strong_ordering::equivalent); BOOST_TEST((x <=> 5) == std::strong_ordering::equal); diff --git a/test/test_stream.cpp b/test/test_stream.cpp index 532f868d..d84c6e56 100644 --- a/test/test_stream.cpp +++ b/test/test_stream.cpp @@ -118,26 +118,26 @@ void test_ostream() octal_out_upper << octal_val; BOOST_TEST_CSTR_EQ(octal_out.str().c_str(), "4"); - BOOST_INT128_IF_CONSTEXPR (std::is_same::value) + BOOST_INT128_IF_CONSTEXPR (std::is_same::value) { - boost::int128::uint128_t max_val {std::numeric_limits::max()}; + boost::int128::uint128 max_val {std::numeric_limits::max()}; std::stringstream max_out; max_out << max_val; BOOST_TEST_CSTR_EQ(max_out.str().c_str(), "340282366920938463463374607431768211455"); } else { - boost::int128::int128_t max_val {std::numeric_limits::max()}; + boost::int128::int128 max_val {std::numeric_limits::max()}; std::stringstream max_out; max_out << max_val; BOOST_TEST_CSTR_EQ(max_out.str().c_str(), "170141183460469231731687303715884105727"); - boost::int128::int128_t min_val {std::numeric_limits::min()}; + boost::int128::int128 min_val {std::numeric_limits::min()}; std::stringstream min_out; min_out << min_val; BOOST_TEST_CSTR_EQ(min_out.str().c_str(), "-170141183460469231731687303715884105728"); - boost::int128::int128_t regular_val {-4500}; + boost::int128::int128 regular_val {-4500}; std::stringstream reg_out; reg_out << regular_val; BOOST_TEST_CSTR_EQ(reg_out.str().c_str(), "-4500"); @@ -146,46 +146,46 @@ void test_ostream() void test_error_values() { - using boost::int128::uint128_t; - using boost::int128::int128_t; + using boost::int128::uint128; + using boost::int128::int128; - uint128_t val; + uint128 val; std::stringstream in; in.str("-42"); in >> val; BOOST_TEST_EQ(val, 0U); - uint128_t val2; + uint128 val2; std::stringstream in2; in2.str("+42"); in2 >> val2; BOOST_TEST_EQ(val2, 0U); - uint128_t val3; + uint128 val3; std::stringstream in3; in3.str(""); in3 >> val3; BOOST_TEST_EQ(val3, 0U); - int128_t val4; + int128 val4; std::stringstream in4; in4.str("-"); in4 >> val4; BOOST_TEST_EQ(val4, 0); - uint128_t val5; + uint128 val5; std::stringstream in5; in5.str("F"); in5 >> val5; BOOST_TEST_EQ(val5, 0U); - uint128_t val6; + uint128 val6; std::stringstream in6; in6.str("3F"); in6 >> val6; BOOST_TEST_EQ(val6, 3U); - uint128_t val7; + uint128 val7; std::stringstream in7; in7.str("100000000000000000000000000000000000000000000000000000000000000000000000000000000000"); in7 >> val7; @@ -194,7 +194,7 @@ void test_error_values() boost::int128::detail::from_chars(nullptr, nullptr, val7); BOOST_TEST_EQ(val7, 0U); - uint128_t overflow_val; + uint128 overflow_val; std::stringstream huge_str; // 100 digits huge_str.str("123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345"); @@ -206,9 +206,9 @@ template void test_round_trip(); template <> -void test_round_trip() +void test_round_trip() { - boost::random::uniform_int_distribution dist(0, (std::numeric_limits::max)()); + boost::random::uniform_int_distribution dist(0, (std::numeric_limits::max)()); // Decimal for (std::size_t i = 0; i < N; ++i) @@ -216,7 +216,7 @@ void test_round_trip() const auto val {dist(rng)}; std::stringstream out; out << val; - boost::int128::uint128_t return_val; + boost::int128::uint128 return_val; out >> return_val; BOOST_TEST_EQ(val, return_val); @@ -229,7 +229,7 @@ void test_round_trip() std::stringstream out; out.flags(std::ios_base::hex); out << val; - boost::int128::uint128_t return_val; + boost::int128::uint128 return_val; out >> return_val; BOOST_TEST_EQ(val, return_val); @@ -242,7 +242,7 @@ void test_round_trip() std::stringstream out; out.flags(std::ios_base::hex | std::ios_base::uppercase); out << val; - boost::int128::uint128_t return_val; + boost::int128::uint128 return_val; out >> return_val; BOOST_TEST_EQ(val, return_val); @@ -255,7 +255,7 @@ void test_round_trip() std::stringstream out; out.flags(std::ios_base::oct); out << val; - boost::int128::uint128_t return_val; + boost::int128::uint128 return_val; out >> return_val; BOOST_TEST_EQ(val, return_val); @@ -263,27 +263,27 @@ void test_round_trip() } template <> -void test_round_trip() +void test_round_trip() { std::uniform_int_distribution low(0, (std::numeric_limits::max)()); std::uniform_int_distribution high((std::numeric_limits::min)(), (std::numeric_limits::max)()); for (std::size_t i = 0; i < N; ++i) { - const boost::int128::int128_t val {high(rng), low(rng)}; + const boost::int128::int128 val {high(rng), low(rng)}; std::stringstream out; out << val; - boost::int128::int128_t return_val; + boost::int128::int128 return_val; out >> return_val; BOOST_TEST_EQ(val, return_val); } - boost::int128::int128_t val {-1}; + boost::int128::int128 val {-1}; std::stringstream out; out << val; BOOST_TEST_CSTR_EQ(out.str().c_str(), "-1"); - boost::int128::int128_t return_val; + boost::int128::int128 return_val; out >> return_val; BOOST_TEST_EQ(val, return_val); } @@ -294,17 +294,17 @@ void test_round_trip() int main() { - test_istream(); - test_istream(); + test_istream(); + test_istream(); - test_ostream(); - test_ostream(); + test_ostream(); + test_ostream(); // 32-bit windows does not set the iomanip flags correctly in CI #ifndef _M_IX86 - test_round_trip(); - test_round_trip(); + test_round_trip(); + test_round_trip(); #endif diff --git a/test/test_to_string.cpp b/test/test_to_string.cpp index 36240f57..72340a41 100644 --- a/test/test_to_string.cpp +++ b/test/test_to_string.cpp @@ -53,12 +53,12 @@ void test_builtin() BOOST_TEST(r); *r.ptr = '\0'; - const auto value_str {to_string(int128_t{value})}; + const auto value_str {to_string(int128{value})}; BOOST_TEST_CSTR_EQ(buffer, value_str.c_str()); BOOST_TEST_CSTR_EQ(std::to_string(value).c_str(), value_str.c_str()); - const auto value_wstr {to_wstring(int128_t{value})}; + const auto value_wstr {to_wstring(int128{value})}; BOOST_TEST(value_wstr == std::to_wstring(value)); } @@ -79,22 +79,22 @@ void test_builtin() *r.ptr = '\0'; { - const auto value_str {to_string(int128_t{value})}; + const auto value_str {to_string(int128{value})}; BOOST_TEST_CSTR_EQ(buffer, value_str.c_str()); BOOST_TEST_CSTR_EQ(std::to_string(value).c_str(), value_str.c_str()); - const auto value_wstr {to_wstring(int128_t{value})}; + const auto value_wstr {to_wstring(int128{value})}; BOOST_TEST(value_wstr == std::to_wstring(value)); } { - const auto value_str {to_string(uint128_t{value})}; + const auto value_str {to_string(uint128{value})}; BOOST_TEST_CSTR_EQ(buffer, value_str.c_str()); BOOST_TEST_CSTR_EQ(std::to_string(value).c_str(), value_str.c_str()); - const auto value_wstr {to_wstring(uint128_t{value})}; + const auto value_wstr {to_wstring(uint128{value})}; BOOST_TEST(value_wstr == std::to_wstring(value)); } @@ -103,8 +103,8 @@ void test_builtin() int main() { - test(); - test(); + test(); + test(); test_builtin(); test_builtin(); diff --git a/test/test_u128.cpp b/test/test_u128.cpp index 305cdc4f..fa910c78 100644 --- a/test/test_u128.cpp +++ b/test/test_u128.cpp @@ -151,7 +151,7 @@ void test_arithmetic_constructor() { const IntType value {dist(rng)}; const auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; builtin_u128 emulated_bits; std::memcpy(&emulated_bits, &emulated_value, sizeof(builtin_u128)); @@ -171,7 +171,7 @@ void test_assignment_operators() const IntType value {dist(rng)}; builtin_u128 builtin_value {}; builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {}; + boost::int128::uint128 emulated_value {}; emulated_value = value; builtin_u128 emulated_bits; @@ -192,7 +192,7 @@ void test_integer_conversion_operators() const IntType value {dist(rng)}; builtin_u128 builtin_value; builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {}; + boost::int128::uint128 emulated_value {}; emulated_value = value; const auto builtin_value_return = static_cast(builtin_value); @@ -227,7 +227,7 @@ void test_float_conversion_operators() const auto value {dist(rng)}; // LCOV_EXCL_LINE builtin_u128 builtin_value; builtin_value = static_cast(value) << 64 | static_cast(value); - boost::int128::uint128_t emulated_value {value, value}; + boost::int128::uint128 emulated_value {value, value}; // Converts the value and then normalizes the range const auto builtin_value_return = static_cast(builtin_value) / static_cast(1e27L); @@ -246,7 +246,7 @@ void test_float_conversion_operators() const auto value {dist(rng)}; // LCOV_EXCL_LINE builtin_u128 builtin_value; builtin_value = value; - boost::int128::uint128_t emulated_value {}; + boost::int128::uint128 emulated_value {}; emulated_value = value; const auto builtin_value_return = static_cast(builtin_value); @@ -271,7 +271,7 @@ void test_unary_plus() const IntType value {dist(rng)}; auto builtin_value = static_cast(value); builtin_value = +builtin_value; - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; emulated_value = +emulated_value; builtin_u128 emulated_bits; @@ -292,7 +292,7 @@ void test_unary_minus() const IntType value {dist(rng)}; auto builtin_value = static_cast(value); builtin_value = -builtin_value; - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; emulated_value = -emulated_value; builtin_u128 emulated_bits; @@ -313,7 +313,7 @@ void test_operator_equality() { const IntType value {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value == emulated_value) == (emulated_value == value)) == ((value == builtin_value) == (builtin_value == value))); @@ -327,18 +327,18 @@ void test_operator_equality() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value2 == emulated_value) == (emulated_value == value2)) == ((value2 == builtin_value) == (builtin_value == value2))); } - const boost::int128::uint128_t bool_val {dist(rng)}; + const boost::int128::uint128 bool_val {dist(rng)}; BOOST_TEST((true == bool_val) == (bool_val == true)); - const boost::int128::uint128_t bool_val2 {1, static_cast(dist(rng))}; + const boost::int128::uint128 bool_val2 {1, static_cast(dist(rng))}; BOOST_TEST((true == bool_val2) == (bool_val2 == true)); - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128)) { for (std::size_t i {}; i < N; ++i) { @@ -352,7 +352,7 @@ void test_operator_equality() } } - boost::int128::uint128_t emulated_value {1, static_cast(value)}; + boost::int128::uint128 emulated_value {1, static_cast(value)}; BOOST_TEST(!(emulated_value == value)); BOOST_TEST(emulated_value == emulated_value); } @@ -370,7 +370,7 @@ void test_operator_inequality() { const IntType value {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value != emulated_value) == (emulated_value != value)) == ((value != builtin_value) == (builtin_value != value))); @@ -382,18 +382,18 @@ void test_operator_inequality() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value2 != emulated_value) == (emulated_value != value2)) == ((value2 != builtin_value) == (builtin_value != value2))); } - const boost::int128::uint128_t bool_val {dist(rng)}; + const boost::int128::uint128 bool_val {dist(rng)}; BOOST_TEST((true != bool_val) == (bool_val != true)); - const boost::int128::uint128_t bool_val2 {1, static_cast(dist(rng))}; + const boost::int128::uint128 bool_val2 {1, static_cast(dist(rng))}; BOOST_TEST((true == bool_val2) == (bool_val2 == true)); - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128)) { for (std::size_t i {}; i < N; ++i) { @@ -407,8 +407,8 @@ void test_operator_inequality() } } - const boost::int128::uint128_t emulated_value {1, static_cast(value)}; - const boost::int128::uint128_t emulated_value2 {2, static_cast(value)}; + const boost::int128::uint128 emulated_value {1, static_cast(value)}; + const boost::int128::uint128 emulated_value2 {2, static_cast(value)}; BOOST_TEST(emulated_value != value); BOOST_TEST(emulated_value != emulated_value2); } @@ -426,7 +426,7 @@ void test_operator_less() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Some platforms get this wrong where for example -99 < 340282366920938463463374607431768211408 evaluates to false // These values happen to be bitwise equal @@ -453,8 +453,8 @@ void test_operator_less() // On 32-bits we check the words all the way down // low low - boost::int128::uint128_t lhs {0, 1}; - boost::int128::uint128_t rhs {0, 2}; + boost::int128::uint128 lhs {0, 1}; + boost::int128::uint128 rhs {0, 2}; BOOST_TEST(lhs < rhs); BOOST_TEST(!(rhs < lhs)); // low high @@ -485,7 +485,7 @@ void test_operator_le() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Some platforms get this wrong where for example -99 < 340282366920938463463374607431768211408 evaluates to false // These values happen to be bitwise equal @@ -512,8 +512,8 @@ void test_operator_le() // On 32-bits we check the words all the way down // low low - boost::int128::uint128_t lhs {0, 1}; - boost::int128::uint128_t rhs {0, 2}; + boost::int128::uint128 lhs {0, 1}; + boost::int128::uint128 rhs {0, 2}; BOOST_TEST(lhs <= rhs); BOOST_TEST(!(rhs <= lhs)); BOOST_TEST(lhs <= lhs); @@ -548,7 +548,7 @@ void test_operator_greater() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Some platforms get this wrong where for example -99 < 340282366920938463463374607431768211408 evaluates to false // These values happen to be bitwise equal @@ -575,8 +575,8 @@ void test_operator_greater() // On 32-bits we check the words all the way down // low low - boost::int128::uint128_t lhs {0, 1}; - boost::int128::uint128_t rhs {0, 2}; + boost::int128::uint128 lhs {0, 1}; + boost::int128::uint128 rhs {0, 2}; BOOST_TEST(rhs > lhs); BOOST_TEST(!(lhs > rhs)); // low high @@ -607,7 +607,7 @@ void test_operator_ge() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Some platforms get this wrong where for example -99 < 340282366920938463463374607431768211408 evaluates to false // These values happen to be bitwise equal @@ -634,8 +634,8 @@ void test_operator_ge() // On 32-bits we check the words all the way down // low low - boost::int128::uint128_t lhs {0, 1}; - boost::int128::uint128_t rhs {0, 2}; + boost::int128::uint128 lhs {0, 1}; + boost::int128::uint128 rhs {0, 2}; BOOST_TEST(rhs >= lhs); BOOST_TEST(!(lhs >= rhs)); BOOST_TEST(lhs >= lhs); @@ -669,7 +669,7 @@ void test_operator_not() { const IntType value {dist(rng)}; const auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(~emulated_value == ~builtin_value); } @@ -686,7 +686,7 @@ void test_operator_or() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value |= value2; @@ -721,7 +721,7 @@ void test_operator_and() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value &= value2; @@ -756,7 +756,7 @@ void test_operator_xor() const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value ^= value2; @@ -793,7 +793,7 @@ void test_operator_left_shift() const IntType value {dist(rng)}; const unsigned shift_value {shift_dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Test 1: Test the <<= operator auto builtin_copy = builtin_value; @@ -803,7 +803,7 @@ void test_operator_left_shift() emulated_copy <<= shift_value; BOOST_TEST(emulated_copy == builtin_copy); - BOOST_TEST(emulated_copy == (emulated_value << static_cast(shift_value))); + BOOST_TEST(emulated_copy == (emulated_value << static_cast(shift_value))); // Test 2: Test the binary << operator auto shifted_builtin = builtin_value << shift_value; @@ -828,18 +828,18 @@ void test_operator_left_shift() // Edge cases. A shift by a negative amount or by an amount >= 128 is // undefined behavior, exactly as for the built-in shift operators (see the // documentation), so only the well-defined in-range counts are exercised. - // The scalar, uint128_t-count, and consteval paths must all agree. - const boost::int128::uint128_t val {UINT64_MAX}; + // The scalar, uint128-count, and consteval paths must all agree. + const boost::int128::uint128 val {UINT64_MAX}; BOOST_TEST((val << 0) == val); - BOOST_TEST((val << static_cast(0)) == val); + BOOST_TEST((val << static_cast(0)) == val); for (unsigned s {}; s < 128U; ++s) { BOOST_TEST(boost::int128::detail::default_ls_impl(val, s) == (val << s)); - BOOST_TEST((val << static_cast(s)) == (val << s)); + BOOST_TEST((val << static_cast(s)) == (val << s)); } const auto builtin_value {static_cast(dist(rng))}; - const boost::int128::uint128_t small_shift {1u}; + const boost::int128::uint128 small_shift {1u}; BOOST_TEST((builtin_value << small_shift) == (builtin_value << 1u)); } @@ -856,7 +856,7 @@ void test_operator_right_shift() const IntType value {dist(rng)}; const unsigned shift_value {shift_dist(rng)}; auto builtin_value = static_cast(value); - const boost::int128::uint128_t emulated_value {value}; + const boost::int128::uint128 emulated_value {value}; // Test 1: Test the >>= operator auto builtin_copy = builtin_value; @@ -866,7 +866,7 @@ void test_operator_right_shift() emulated_copy >>= shift_value; BOOST_TEST(emulated_copy == builtin_copy); - BOOST_TEST(emulated_copy == (emulated_value >> static_cast(shift_value))); + BOOST_TEST(emulated_copy == (emulated_value >> static_cast(shift_value))); // Test 2: Test the binary >> operator auto shifted_builtin = builtin_value >> shift_value; @@ -891,24 +891,24 @@ void test_operator_right_shift() // Edge cases. A shift by a negative amount or by an amount >= 128 is // undefined behavior, exactly as for the built-in shift operators (see the // documentation), so only the well-defined in-range counts are exercised. - // The scalar, uint128_t-count, and consteval paths must all agree. - const boost::int128::uint128_t val {UINT64_MAX}; + // The scalar, uint128-count, and consteval paths must all agree. + const boost::int128::uint128 val {UINT64_MAX}; BOOST_TEST((val >> 0) == val); - BOOST_TEST((val >> static_cast(0)) == val); + BOOST_TEST((val >> static_cast(0)) == val); for (unsigned s {}; s < 128U; ++s) { BOOST_TEST(boost::int128::detail::default_rs_impl(val, s) == (val >> s)); - BOOST_TEST((val >> static_cast(s)) == (val >> s)); + BOOST_TEST((val >> static_cast(s)) == (val >> s)); } const auto builtin_value {static_cast(dist(rng))}; - const boost::int128::uint128_t small_shift {1u}; + const boost::int128::uint128 small_shift {1u}; BOOST_TEST((builtin_value >> small_shift) == (builtin_value >> 1u)); } void test_increment_operator() { - boost::int128::uint128_t emulated_value {UINT64_MAX - N/2}; + boost::int128::uint128 emulated_value {UINT64_MAX - N/2}; builtin_u128 builtin_value {UINT64_MAX - N/2}; for (std::size_t i {}; i < N; ++i) @@ -922,7 +922,7 @@ void test_increment_operator() void test_decrement_operator() { - boost::int128::uint128_t emulated_value {UINT64_MAX + N/2}; + boost::int128::uint128 emulated_value {UINT64_MAX + N/2}; builtin_u128 builtin_value {UINT64_MAX + N/2}; for (std::size_t i {}; i < N; ++i) @@ -953,7 +953,7 @@ void test_operator_add() } auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value += value2; @@ -963,7 +963,7 @@ void test_operator_add() // Edge case where we go from low word to high word builtin_u128 builtin_value = UINT64_MAX - 2U; - boost::int128::uint128_t emulated_value = UINT64_MAX - 2U; + boost::int128::uint128 emulated_value = UINT64_MAX - 2U; for (std::size_t i {}; i < N; ++i) { @@ -990,7 +990,7 @@ void test_operator_sub() } auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value -= value2; @@ -1001,7 +1001,7 @@ void test_operator_sub() // Edge case where we go from low word to high word builtin_u128 builtin_value = UINT64_MAX; builtin_value += 2U; - boost::int128::uint128_t emulated_value = UINT64_MAX; + boost::int128::uint128 emulated_value = UINT64_MAX; emulated_value += 2U; for (std::size_t i {}; i < N; ++i) @@ -1021,7 +1021,7 @@ void test_operator_mul() IntType value2 {dist(rng)}; auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value *= value2; @@ -1066,7 +1066,7 @@ void test_operator_div() // LCOV_EXCL_STOP auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value /= value2; @@ -1082,7 +1082,7 @@ void test_operator_div() } // Test 2 word by 1 word and 1 word by 2 word - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128)) { for (std::size_t i {}; i < N; ++i) { @@ -1102,8 +1102,8 @@ void test_operator_div() // LCOV_EXCL_STOP const auto builtin_value = (static_cast(static_cast(value)) << 64) | static_cast(value); - const boost::int128::uint128_t emulated_value {static_cast(value), static_cast(value)}; - const boost::int128::uint128_t small_emulated_value {UINT64_C(0), static_cast(value)}; + const boost::int128::uint128 emulated_value {static_cast(value), static_cast(value)}; + const boost::int128::uint128 small_emulated_value {UINT64_C(0), static_cast(value)}; assert(builtin_value == emulated_value); @@ -1120,7 +1120,7 @@ void test_operator_div() BOOST_TEST((value2 / emulated_value) == (value2 / builtin_value)); // Forces decision process - const boost::int128::uint128_t check_2_value {value2}; + const boost::int128::uint128 check_2_value {value2}; BOOST_TEST(check_1_value == (emulated_value / check_2_value)); // Division by zero is undefined behavior (matching the builtin __int128 types), so it is not tested. @@ -1168,7 +1168,7 @@ void test_operator_mod() // LCOV_EXCL_STOP auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value %= value2; @@ -1184,7 +1184,7 @@ void test_operator_mod() } // Test 2 word by 1 word and 1 word by 2 word - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128)) { for (std::size_t i {}; i < N; ++i) { @@ -1204,8 +1204,8 @@ void test_operator_mod() // LCOV_EXCL_STOP const auto builtin_value = (static_cast(static_cast(value)) << 64) | static_cast(value); - const boost::int128::uint128_t emulated_value {static_cast(value), static_cast(value)}; - const boost::int128::uint128_t small_emulated_value {UINT64_C(0), static_cast(value)}; + const boost::int128::uint128 emulated_value {static_cast(value), static_cast(value)}; + const boost::int128::uint128 small_emulated_value {UINT64_C(0), static_cast(value)}; auto check_1_value {emulated_value}; check_1_value %= value2; @@ -1220,7 +1220,7 @@ void test_operator_mod() BOOST_TEST((value2 % emulated_value) == (value2 % builtin_value)); // Forces decision process - const boost::int128::uint128_t check_2_value {value2}; + const boost::int128::uint128 check_2_value {value2}; BOOST_TEST(check_1_value == (emulated_value % check_2_value)); // Remainder by zero is undefined behavior (matching the builtin __int128 types), so it is not tested. @@ -1235,7 +1235,7 @@ template void test_spot_div(IntType value, IntType value2) { auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value /= value2; @@ -1350,7 +1350,7 @@ int main() test_spot_div(-3237361348456748317LL, 8011834041509972187LL); - test_spot_div(boost::int128::uint128_t{50012077812411ULL, 6429278683030093824ULL}, boost::int128::uint128_t{542101086ULL, 4477988020393345024ULL}, boost::int128::uint128_t{92256}); + test_spot_div(boost::int128::uint128{50012077812411ULL, 6429278683030093824ULL}, boost::int128::uint128{542101086ULL, 4477988020393345024ULL}, boost::int128::uint128{92256}); return boost::report_errors(); } @@ -1371,7 +1371,7 @@ void test_operator_equality() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value == emulated_value) == (emulated_value == value))); } @@ -1381,25 +1381,25 @@ void test_operator_equality() { const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value2 == emulated_value) == (emulated_value == value2))); } // Never equal - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128)) { for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::uint128_t emulated_value {1, static_cast(value)}; + boost::int128::uint128 emulated_value {1, static_cast(value)}; BOOST_TEST((value == emulated_value) == (emulated_value == value)); } } - const boost::int128::uint128_t bool_val {dist(rng)}; + const boost::int128::uint128 bool_val {dist(rng)}; BOOST_TEST((true == bool_val) == (bool_val == true)); - const boost::int128::uint128_t bool_val2 {static_cast(dist(rng)), 0}; + const boost::int128::uint128 bool_val2 {static_cast(dist(rng)), 0}; BOOST_TEST((true == bool_val2) == (bool_val2 == true)); BOOST_TEST(!(bool_val == bool_val2)); BOOST_TEST(bool_val == bool_val); @@ -1418,7 +1418,7 @@ void test_operator_inequality() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value != emulated_value) == (emulated_value != value))); } @@ -1428,25 +1428,25 @@ void test_operator_inequality() { const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value2 != emulated_value) == (emulated_value != value2))); } // Never equal - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128)) { for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - boost::int128::uint128_t emulated_value {1, static_cast(value)}; + boost::int128::uint128 emulated_value {1, static_cast(value)}; BOOST_TEST((value != emulated_value) == (emulated_value != value)); } } - const boost::int128::uint128_t bool_val {dist(rng)}; + const boost::int128::uint128 bool_val {dist(rng)}; BOOST_TEST((true != bool_val) == (bool_val != true)); - const boost::int128::uint128_t bool_val2 {static_cast(dist(rng)), 0}; + const boost::int128::uint128 bool_val2 {static_cast(dist(rng)), 0}; BOOST_TEST((true != bool_val2) == (bool_val2 != true)); BOOST_TEST(bool_val != bool_val2); BOOST_TEST(!(bool_val != bool_val)); @@ -1470,7 +1470,7 @@ void test_operator_less() value2 = dist(rng); } - const boost::int128::uint128_t emulated_value {value}; + const boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value2 < emulated_value) != (emulated_value < value2))); } @@ -1479,7 +1479,7 @@ void test_operator_less() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - const boost::int128::uint128_t emulated_value {value}; + const boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value < emulated_value) == (emulated_value < value))); } @@ -1500,7 +1500,7 @@ void test_operator_greater() value2 = dist(rng); } - const boost::int128::uint128_t emulated_value {value}; + const boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value2 > emulated_value) != (emulated_value > value2))); } @@ -1509,7 +1509,7 @@ void test_operator_greater() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - const boost::int128::uint128_t emulated_value {value}; + const boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value > emulated_value) == (emulated_value > value))); } @@ -1525,7 +1525,7 @@ void test_operator_le() { const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; - const boost::int128::uint128_t emulated_value {value}; + const boost::int128::uint128 emulated_value {value}; if (value == value2) { @@ -1541,7 +1541,7 @@ void test_operator_le() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - const boost::int128::uint128_t emulated_value {value}; + const boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value <= emulated_value) == (emulated_value <= value))); } @@ -1556,7 +1556,7 @@ void test_operator_ge() { const IntType value {dist(rng)}; const IntType value2 {dist(rng)}; - const boost::int128::uint128_t emulated_value {value}; + const boost::int128::uint128 emulated_value {value}; if (value == value2) { @@ -1572,7 +1572,7 @@ void test_operator_ge() for (std::size_t i {}; i < N; ++i) { const IntType value {dist(rng)}; - const boost::int128::uint128_t emulated_value {value}; + const boost::int128::uint128 emulated_value {value}; const auto lhs {(value >= emulated_value)}; const auto rhs {(emulated_value >= value)}; @@ -1586,7 +1586,7 @@ void test_operator_ge() // Spot test const IntType value {0}; - const boost::int128::uint128_t emulated_value {0}; + const boost::int128::uint128 emulated_value {0}; const auto lhs {(value >= emulated_value)}; const auto rhs {(emulated_value >= value)}; @@ -1605,8 +1605,8 @@ void test_operator_add() const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE const IntType res = value + value2; - boost::int128::uint128_t test_value {value}; - const boost::int128::uint128_t test_value2 {value2}; + boost::int128::uint128 test_value {value}; + const boost::int128::uint128 test_value2 {value2}; BOOST_TEST(test_value + test_value2 == res); // LCOV_EXCL_LINE test_value += value2; @@ -1614,8 +1614,8 @@ void test_operator_add() } // Bigger value spots - boost::int128::uint128_t lhs{UINT64_MAX}; - boost::int128::uint128_t rhs{1, 0}; + boost::int128::uint128 lhs{UINT64_MAX}; + boost::int128::uint128 rhs{1, 0}; BOOST_TEST_EQ(lhs + 1, rhs); BOOST_TEST_EQ(++lhs, rhs); @@ -1638,8 +1638,8 @@ void test_operator_sub() const IntType res = value - value2; - boost::int128::uint128_t test_value {value}; - const boost::int128::uint128_t test_value2 {value2}; + boost::int128::uint128 test_value {value}; + const boost::int128::uint128 test_value2 {value2}; BOOST_TEST(test_value - test_value2 == res); // LCOV_EXCL_LINE test_value -= value2; @@ -1647,8 +1647,8 @@ void test_operator_sub() } // Bigger value spots - boost::int128::uint128_t rhs{UINT64_MAX}; - boost::int128::uint128_t lhs{1, 0}; + boost::int128::uint128 rhs{UINT64_MAX}; + boost::int128::uint128 lhs{1, 0}; BOOST_TEST_EQ(lhs - 1, rhs); BOOST_TEST_EQ(--lhs, rhs); @@ -1665,8 +1665,8 @@ void test_operator_mul() const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE const IntType res = value * value2; - boost::int128::uint128_t test_value {value}; - const boost::int128::uint128_t test_value2 {value2}; + boost::int128::uint128 test_value {value}; + const boost::int128::uint128 test_value2 {value2}; BOOST_TEST(test_value * test_value2 == res); // LCOV_EXCL_LINE @@ -1674,8 +1674,8 @@ void test_operator_mul() BOOST_TEST(test_value == res); // LCOV_EXCL_LINE } - boost::int128::uint128_t shift_val {1}; - boost::int128::uint128_t mul_val {1}; + boost::int128::uint128 shift_val {1}; + boost::int128::uint128 mul_val {1}; for (std::size_t i {1}; i < 128; ++i) { @@ -1712,8 +1712,8 @@ void test_operator_div() const IntType res = value / value2; - boost::int128::uint128_t test_value {value}; - const boost::int128::uint128_t test_value2 {value2}; + boost::int128::uint128 test_value {value}; + const boost::int128::uint128 test_value2 {value2}; BOOST_TEST(test_value / test_value2 == res); // LCOV_EXCL_LINE @@ -1721,21 +1721,21 @@ void test_operator_div() BOOST_TEST(test_value == res); // LCOV_EXCL_LINE } - boost::int128::uint128_t shift_val {UINT64_MAX, UINT64_MAX}; - boost::int128::uint128_t mul_val {UINT64_MAX, UINT64_MAX}; + boost::int128::uint128 shift_val {UINT64_MAX, UINT64_MAX}; + boost::int128::uint128 mul_val {UINT64_MAX, UINT64_MAX}; for (std::size_t i {1}; i < 127; ++i) { const auto current_shift_val {shift_val >> i}; - const auto current_mul_val {mul_val / (boost::int128::uint128_t{2} << (i-1))}; + const auto current_mul_val {mul_val / (boost::int128::uint128{2} << (i-1))}; BOOST_TEST(current_shift_val == current_mul_val); // LCOV_EXCL_LINE } // Check large value - constexpr auto lhs {(std::numeric_limits::max)()}; - constexpr boost::int128::uint128_t rhs {0x1, UINT64_MAX}; - constexpr boost::int128::uint128_t res {UINT64_C(0x8000000000000000)}; + constexpr auto lhs {(std::numeric_limits::max)()}; + constexpr boost::int128::uint128 rhs {0x1, UINT64_MAX}; + constexpr boost::int128::uint128 res {UINT64_C(0x8000000000000000)}; BOOST_TEST(lhs / rhs == res); } diff --git a/test/test_u128_no_sign_conv.cpp b/test/test_u128_no_sign_conv.cpp index 7b1c4490..b3be0c5e 100644 --- a/test/test_u128_no_sign_conv.cpp +++ b/test/test_u128_no_sign_conv.cpp @@ -126,7 +126,7 @@ void test_arithmetic_constructor() { const IntType value {dist(rng)}; // LCOV_EXCL_LINE const auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; builtin_u128 emulated_bits; std::memcpy(&emulated_bits, &emulated_value, sizeof(builtin_u128)); @@ -146,7 +146,7 @@ void test_assignment_operators() const IntType value {dist(rng)}; // LCOV_EXCL_LINE builtin_u128 builtin_value {}; builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {}; + boost::int128::uint128 emulated_value {}; emulated_value = value; builtin_u128 emulated_bits; @@ -167,7 +167,7 @@ void test_integer_conversion_operators() const IntType value {dist(rng)}; // LCOV_EXCL_LINE builtin_u128 builtin_value; builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {}; + boost::int128::uint128 emulated_value {}; emulated_value = value; const auto builtin_value_return = static_cast(builtin_value); @@ -202,7 +202,7 @@ void test_float_conversion_operators() const auto value {dist(rng)}; // LCOV_EXCL_LINE builtin_u128 builtin_value; builtin_value = static_cast(value) << 64 | static_cast(value); - boost::int128::uint128_t emulated_value {value, value}; + boost::int128::uint128 emulated_value {value, value}; // Converts the value and then normalizes the range const auto builtin_value_return = static_cast(builtin_value) / static_cast(1e27L); @@ -221,7 +221,7 @@ void test_float_conversion_operators() const auto value {dist(rng)}; // LCOV_EXCL_LINE builtin_u128 builtin_value; builtin_value = value; - boost::int128::uint128_t emulated_value {}; + boost::int128::uint128 emulated_value {}; emulated_value = value; const auto builtin_value_return = static_cast(builtin_value); @@ -246,7 +246,7 @@ void test_unary_plus() const IntType value {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); builtin_value = +builtin_value; - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; emulated_value = +emulated_value; builtin_u128 emulated_bits; @@ -267,7 +267,7 @@ void test_unary_minus() const IntType value {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); builtin_value = -builtin_value; - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; emulated_value = -emulated_value; builtin_u128 emulated_bits; @@ -288,7 +288,7 @@ void test_operator_equality() { const IntType value {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value == emulated_value) == (emulated_value == value)) == ((value == builtin_value) == (builtin_value == value))); // LCOV_EXCL_LINE } @@ -299,12 +299,12 @@ void test_operator_equality() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value2 == emulated_value) == (emulated_value == value2)) == ((value2 == builtin_value) == (builtin_value == value2))); // LCOV_EXCL_LINE } - const boost::int128::uint128_t bool_val {dist(rng)}; // LCOV_EXCL_LINE + const boost::int128::uint128 bool_val {dist(rng)}; // LCOV_EXCL_LINE BOOST_TEST((true == bool_val) == (bool_val == true)); // LCOV_EXCL_LINE } @@ -319,7 +319,7 @@ void test_operator_inequality() { const IntType value {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value != emulated_value) == (emulated_value != value)) == ((value != builtin_value) == (builtin_value != value))); // LCOV_EXCL_LINE } @@ -330,12 +330,12 @@ void test_operator_inequality() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(((value2 != emulated_value) == (emulated_value != value2)) == ((value2 != builtin_value) == (builtin_value != value2))); // LCOV_EXCL_LINE } - const boost::int128::uint128_t bool_val {dist(rng)}; // LCOV_EXCL_LINE + const boost::int128::uint128 bool_val {dist(rng)}; // LCOV_EXCL_LINE BOOST_TEST((true != bool_val) == (bool_val != true)); // LCOV_EXCL_LINE } @@ -350,7 +350,7 @@ void test_operator_less() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Some platforms get this wrong where for example -99 < 340282366920938463463374607431768211408 evaluates to false // These values happen to be bitwise equal @@ -386,7 +386,7 @@ void test_operator_le() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Some platforms get this wrong where for example -99 < 340282366920938463463374607431768211408 evaluates to false // These values happen to be bitwise equal @@ -422,7 +422,7 @@ void test_operator_greater() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Some platforms get this wrong where for example -99 < 340282366920938463463374607431768211408 evaluates to false // These values happen to be bitwise equal @@ -458,7 +458,7 @@ void test_operator_ge() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Some platforms get this wrong where for example -99 < 340282366920938463463374607431768211408 evaluates to false // These values happen to be bitwise equal @@ -493,7 +493,7 @@ void test_operator_not() { const IntType value {dist(rng)}; // LCOV_EXCL_LINE const auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; BOOST_TEST(~emulated_value == ~builtin_value); // LCOV_EXCL_LINE } @@ -510,7 +510,7 @@ void test_operator_or() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value |= value2; @@ -545,7 +545,7 @@ void test_operator_and() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value &= value2; @@ -580,7 +580,7 @@ void test_operator_xor() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value ^= value2; @@ -617,7 +617,7 @@ void test_operator_left_shift() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const unsigned shift_value {shift_dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Test 1: Test the <<= operator auto builtin_copy = builtin_value; @@ -658,7 +658,7 @@ void test_operator_right_shift() const IntType value {dist(rng)}; // LCOV_EXCL_LINE const unsigned shift_value {shift_dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; // Test 1: Test the >>= operator auto builtin_copy = builtin_value; @@ -688,7 +688,7 @@ void test_operator_right_shift() void test_increment_operator() { - boost::int128::uint128_t emulated_value {UINT64_MAX - N/2}; + boost::int128::uint128 emulated_value {UINT64_MAX - N/2}; builtin_u128 builtin_value {UINT64_MAX - N/2}; for (std::size_t i {}; i < N; ++i) @@ -702,7 +702,7 @@ void test_increment_operator() void test_decrement_operator() { - boost::int128::uint128_t emulated_value {UINT64_MAX + N/2}; + boost::int128::uint128 emulated_value {UINT64_MAX + N/2}; builtin_u128 builtin_value {UINT64_MAX + N/2}; for (std::size_t i {}; i < N; ++i) @@ -733,7 +733,7 @@ void test_operator_add() } auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value += value2; @@ -743,7 +743,7 @@ void test_operator_add() // Edge case where we go from low word to high word builtin_u128 builtin_value = UINT64_MAX - 2U; - boost::int128::uint128_t emulated_value = UINT64_MAX - 2U; + boost::int128::uint128 emulated_value = UINT64_MAX - 2U; for (std::size_t i {}; i < N; ++i) { @@ -770,7 +770,7 @@ void test_operator_sub() } auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value -= value2; @@ -781,7 +781,7 @@ void test_operator_sub() // Edge case where we go from low word to high word builtin_u128 builtin_value = UINT64_MAX; builtin_value += 2U; - boost::int128::uint128_t emulated_value = UINT64_MAX; + boost::int128::uint128 emulated_value = UINT64_MAX; emulated_value += 2U; for (std::size_t i {}; i < N; ++i) @@ -801,7 +801,7 @@ void test_operator_mul() IntType value2 {dist(rng)}; // LCOV_EXCL_LINE auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value *= value2; @@ -831,7 +831,7 @@ void test_operator_div() } auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value /= value2; @@ -847,7 +847,7 @@ void test_operator_div() } // Test 2 word by 1 word and 1 word by 2 word - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128)) { for (std::size_t i {}; i < N; ++i) { @@ -865,7 +865,7 @@ void test_operator_div() } const auto builtin_value = (static_cast(static_cast(value)) << 64) | static_cast(value); - const boost::int128::uint128_t emulated_value {static_cast(value), static_cast(value)}; + const boost::int128::uint128 emulated_value {static_cast(value), static_cast(value)}; auto check_1_value {emulated_value}; check_1_value /= value2; @@ -880,7 +880,7 @@ void test_operator_div() BOOST_TEST((value2 / emulated_value) == (value2 / builtin_value)); // LCOV_EXCL_LINE // Forces decision process - const boost::int128::uint128_t check_2_value {value2}; + const boost::int128::uint128 check_2_value {value2}; BOOST_TEST(check_1_value == (emulated_value / check_2_value)); // LCOV_EXCL_LINE } } @@ -908,7 +908,7 @@ void test_operator_mod() } auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value %= value2; @@ -924,7 +924,7 @@ void test_operator_mod() } // Test 2 word by 1 word and 1 word by 2 word - BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128_t)) + BOOST_INT128_IF_CONSTEXPR (sizeof(IntType) < sizeof(boost::int128::uint128)) { for (std::size_t i {}; i < N; ++i) { @@ -942,7 +942,7 @@ void test_operator_mod() } const auto builtin_value = (static_cast(static_cast(value)) << 64) | static_cast(value); - const boost::int128::uint128_t emulated_value {static_cast(value), static_cast(value)}; + const boost::int128::uint128 emulated_value {static_cast(value), static_cast(value)}; auto check_1_value {emulated_value}; check_1_value %= value2; @@ -957,7 +957,7 @@ void test_operator_mod() BOOST_TEST((value2 % emulated_value) == (value2 % builtin_value)); // LCOV_EXCL_LINE // Forces decision process - const boost::int128::uint128_t check_2_value {value2}; + const boost::int128::uint128 check_2_value {value2}; BOOST_TEST(check_1_value == (emulated_value % check_2_value)); // LCOV_EXCL_LINE } } @@ -967,7 +967,7 @@ template void test_spot_div(IntType value, IntType value2) { auto builtin_value = static_cast(value); - boost::int128::uint128_t emulated_value {value}; + boost::int128::uint128 emulated_value {value}; auto check_1_value {emulated_value}; check_1_value /= value2; diff --git a/test/test_unsigned_add.cu b/test/test_unsigned_add.cu index 443295be..479472cc 100644 --- a/test/test_unsigned_add.cu +++ b/test/test_unsigned_add.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_add_sycl.cpp b/test/test_unsigned_add_sycl.cpp index 85e35937..35777b02 100644 --- a/test/test_unsigned_add_sycl.cpp +++ b/test/test_unsigned_add_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return a + b; }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return a + b; }); } diff --git a/test/test_unsigned_and.cu b/test/test_unsigned_and.cu index 8e9f1bbd..e83a1cb8 100644 --- a/test/test_unsigned_and.cu +++ b/test/test_unsigned_and.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_unsigned_and_sycl.cpp b/test/test_unsigned_and_sycl.cpp index 0f04a181..bfca6e03 100644 --- a/test/test_unsigned_and_sycl.cpp +++ b/test/test_unsigned_and_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return a & b; }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return a & b; }); } diff --git a/test/test_unsigned_cstdlib_div.cu b/test/test_unsigned_cstdlib_div.cu index f957e63e..068be80f 100644 --- a/test/test_unsigned_cstdlib_div.cu +++ b/test/test_unsigned_cstdlib_div.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; using result_type = boost::int128::u128div_t; __global__ void cuda_test(const test_type *in, const test_type *in2, result_type *out, int numElements) diff --git a/test/test_unsigned_cstdlib_div_sycl.cpp b/test/test_unsigned_cstdlib_div_sycl.cpp index 706261ab..7b57b18f 100644 --- a/test/test_unsigned_cstdlib_div_sycl.cpp +++ b/test/test_unsigned_cstdlib_div_sycl.cpp @@ -4,12 +4,12 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { const auto d {boost::int128::div(a, int128_sycl_test::safe_divisor(a, b))}; return d.quot ^ d.rem; diff --git a/test/test_unsigned_div.cu b/test/test_unsigned_div.cu index e1f47941..d0c1bbd6 100644 --- a/test/test_unsigned_div.cu +++ b/test/test_unsigned_div.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_div_sycl.cpp b/test/test_unsigned_div_sycl.cpp index 54b993dd..4dc5f946 100644 --- a/test/test_unsigned_div_sycl.cpp +++ b/test/test_unsigned_div_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return int128_sycl_test::safe_div(a, b); }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return int128_sycl_test::safe_div(a, b); }); } diff --git a/test/test_unsigned_eq.cu b/test/test_unsigned_eq.cu index b3a7dca9..3f5fdc82 100644 --- a/test/test_unsigned_eq.cu +++ b/test/test_unsigned_eq.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_eq_sycl.cpp b/test/test_unsigned_eq_sycl.cpp index 41dc174c..0b32d14a 100644 --- a/test/test_unsigned_eq_sycl.cpp +++ b/test/test_unsigned_eq_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run_compare( - [](uint128_t a, uint128_t b) { return a == b; }); + return int128_sycl_test::run_compare( + [](uint128 a, uint128 b) { return a == b; }); } diff --git a/test/test_unsigned_from_chars.cu b/test/test_unsigned_from_chars.cu index ba5de8f1..a9180ea4 100644 --- a/test/test_unsigned_from_chars.cu +++ b/test/test_unsigned_from_chars.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; constexpr int BUF_SIZE = 64; diff --git a/test/test_unsigned_from_chars_bases.cu b/test/test_unsigned_from_chars_bases.cu index 6e45842e..e2608459 100644 --- a/test/test_unsigned_from_chars_bases.cu +++ b/test/test_unsigned_from_chars_bases.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; constexpr int BUF_SIZE = 192; diff --git a/test/test_unsigned_from_chars_bases_sycl.cpp b/test/test_unsigned_from_chars_bases_sycl.cpp index 6b16e642..0f73ebc3 100644 --- a/test/test_unsigned_from_chars_bases_sycl.cpp +++ b/test/test_unsigned_from_chars_bases_sycl.cpp @@ -4,14 +4,14 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { int result {0}; - result |= int128_sycl_test::run_from_chars(2); - result |= int128_sycl_test::run_from_chars(8); - result |= int128_sycl_test::run_from_chars(16); - result |= int128_sycl_test::run_from_chars(36); + result |= int128_sycl_test::run_from_chars(2); + result |= int128_sycl_test::run_from_chars(8); + result |= int128_sycl_test::run_from_chars(16); + result |= int128_sycl_test::run_from_chars(36); return result; } diff --git a/test/test_unsigned_from_chars_sycl.cpp b/test/test_unsigned_from_chars_sycl.cpp index d37f1af5..2bf5bcb6 100644 --- a/test/test_unsigned_from_chars_sycl.cpp +++ b/test/test_unsigned_from_chars_sycl.cpp @@ -4,9 +4,9 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run_from_chars(10); + return int128_sycl_test::run_from_chars(10); } diff --git a/test/test_unsigned_gcd.cu b/test/test_unsigned_gcd.cu index 6b44cf60..bbe96361 100644 --- a/test/test_unsigned_gcd.cu +++ b/test/test_unsigned_gcd.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_unsigned_gcd_sycl.cpp b/test/test_unsigned_gcd_sycl.cpp index 58b821b0..df0be3eb 100644 --- a/test/test_unsigned_gcd_sycl.cpp +++ b/test/test_unsigned_gcd_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return boost::int128::gcd(a, b); }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return boost::int128::gcd(a, b); }); } diff --git a/test/test_unsigned_ge.cu b/test/test_unsigned_ge.cu index ade4913c..eca4066f 100644 --- a/test/test_unsigned_ge.cu +++ b/test/test_unsigned_ge.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_ge_sycl.cpp b/test/test_unsigned_ge_sycl.cpp index 45a96fe3..5dfb3c4e 100644 --- a/test/test_unsigned_ge_sycl.cpp +++ b/test/test_unsigned_ge_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run_compare( - [](uint128_t a, uint128_t b) { return a >= b; }); + return int128_sycl_test::run_compare( + [](uint128 a, uint128 b) { return a >= b; }); } diff --git a/test/test_unsigned_gt.cu b/test/test_unsigned_gt.cu index d4234d91..87ecbe74 100644 --- a/test/test_unsigned_gt.cu +++ b/test/test_unsigned_gt.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_gt_sycl.cpp b/test/test_unsigned_gt_sycl.cpp index 1525b9c5..39ac2eec 100644 --- a/test/test_unsigned_gt_sycl.cpp +++ b/test/test_unsigned_gt_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run_compare( - [](uint128_t a, uint128_t b) { return a > b; }); + return int128_sycl_test::run_compare( + [](uint128 a, uint128 b) { return a > b; }); } diff --git a/test/test_unsigned_lcm.cu b/test/test_unsigned_lcm.cu index 83fe2171..7c4e930f 100644 --- a/test/test_unsigned_lcm.cu +++ b/test/test_unsigned_lcm.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_unsigned_lcm_sycl.cpp b/test/test_unsigned_lcm_sycl.cpp index ca8e958c..adb32890 100644 --- a/test/test_unsigned_lcm_sycl.cpp +++ b/test/test_unsigned_lcm_sycl.cpp @@ -4,11 +4,11 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { // Restrict inputs so the true LCM stays within 128 bits. - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return boost::int128::lcm(a >> 64, b >> 64); }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return boost::int128::lcm(a >> 64, b >> 64); }); } diff --git a/test/test_unsigned_le.cu b/test/test_unsigned_le.cu index 9d034350..c9354c13 100644 --- a/test/test_unsigned_le.cu +++ b/test/test_unsigned_le.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_le_sycl.cpp b/test/test_unsigned_le_sycl.cpp index 4f094f07..90a4116c 100644 --- a/test/test_unsigned_le_sycl.cpp +++ b/test/test_unsigned_le_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run_compare( - [](uint128_t a, uint128_t b) { return a <= b; }); + return int128_sycl_test::run_compare( + [](uint128 a, uint128 b) { return a <= b; }); } diff --git a/test/test_unsigned_left_shift.cu b/test/test_unsigned_left_shift.cu index 7778d935..3b99c009 100644 --- a/test/test_unsigned_left_shift.cu +++ b/test/test_unsigned_left_shift.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const unsigned *shift, test_type *out, int numElements) { diff --git a/test/test_unsigned_left_shift_sycl.cpp b/test/test_unsigned_left_shift_sycl.cpp index 7580f4e1..3cbb5230 100644 --- a/test/test_unsigned_left_shift_sycl.cpp +++ b/test/test_unsigned_left_shift_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int i) { return a << (i % 128); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int i) { return a << (i % 128); }); } diff --git a/test/test_unsigned_literals.cu b/test/test_unsigned_literals.cu index bbac3b21..333b2c40 100644 --- a/test/test_unsigned_literals.cu +++ b/test/test_unsigned_literals.cu @@ -13,7 +13,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using boost::int128::uint128_t; +using boost::int128::uint128; using namespace boost::int128::literals; // Number of test cases: we test each literal operator with several values @@ -27,7 +27,7 @@ using namespace boost::int128::literals; constexpr int NUM_TESTS = 24; -__global__ void cuda_test(uint128_t *out) +__global__ void cuda_test(uint128 *out) { int i = threadIdx.x; @@ -74,7 +74,7 @@ int main(void) std::cout << "[Unsigned literal tests: " << NUM_TESTS << " cases]" << std::endl; - cuda_managed_ptr output(NUM_TESTS); + cuda_managed_ptr output(NUM_TESTS); // Launch with 1 block of NUM_TESTS threads watch w; @@ -92,7 +92,7 @@ int main(void) } // Build expected values on host using the same literals - uint128_t expected[NUM_TESTS]; + uint128 expected[NUM_TESTS]; // operator""_u128(const char*) - raw literal expected[0] = 0_u128; diff --git a/test/test_unsigned_literals_sycl.cpp b/test/test_unsigned_literals_sycl.cpp index dcbf6809..d9a46d22 100644 --- a/test/test_unsigned_literals_sycl.cpp +++ b/test/test_unsigned_literals_sycl.cpp @@ -7,7 +7,7 @@ #include #include -using boost::int128::uint128_t; +using boost::int128::uint128; using namespace boost::int128::literals; // Exercises the user-defined literal operators inside a SYCL kernel and checks the @@ -19,7 +19,7 @@ int main() sycl::queue q; std::cout << "SYCL device: " << q.get_device().get_info() << "\n"; - uint128_t* out {sycl::malloc_shared(N, q)}; + uint128* out {sycl::malloc_shared(N, q)}; q.submit([&](sycl::handler& h) { @@ -56,7 +56,7 @@ int main() }); }).wait(); - uint128_t expected[N]; + uint128 expected[N]; expected[0] = 0_u128; expected[1] = 1_u128; expected[2] = 18446744073709551615_u128; diff --git a/test/test_unsigned_lt.cu b/test/test_unsigned_lt.cu index 07b7c1df..f0aec260 100644 --- a/test/test_unsigned_lt.cu +++ b/test/test_unsigned_lt.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_lt_sycl.cpp b/test/test_unsigned_lt_sycl.cpp index daaa9a91..dbaf00bc 100644 --- a/test/test_unsigned_lt_sycl.cpp +++ b/test/test_unsigned_lt_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run_compare( - [](uint128_t a, uint128_t b) { return a < b; }); + return int128_sycl_test::run_compare( + [](uint128 a, uint128 b) { return a < b; }); } diff --git a/test/test_unsigned_midpoint.cu b/test/test_unsigned_midpoint.cu index 505af9e1..fccc6a69 100644 --- a/test/test_unsigned_midpoint.cu +++ b/test/test_unsigned_midpoint.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_unsigned_midpoint_sycl.cpp b/test/test_unsigned_midpoint_sycl.cpp index 7d9d4c4e..aa0cb9ee 100644 --- a/test/test_unsigned_midpoint_sycl.cpp +++ b/test/test_unsigned_midpoint_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return boost::int128::midpoint(a, b); }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return boost::int128::midpoint(a, b); }); } diff --git a/test/test_unsigned_mod.cu b/test/test_unsigned_mod.cu index 7dc0a627..00cbd571 100644 --- a/test/test_unsigned_mod.cu +++ b/test/test_unsigned_mod.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_mod_sycl.cpp b/test/test_unsigned_mod_sycl.cpp index 0d032003..a762bc56 100644 --- a/test/test_unsigned_mod_sycl.cpp +++ b/test/test_unsigned_mod_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return int128_sycl_test::safe_mod(a, b); }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return int128_sycl_test::safe_mod(a, b); }); } diff --git a/test/test_unsigned_mul.cu b/test/test_unsigned_mul.cu index ef7d89dd..b94e96b0 100644 --- a/test/test_unsigned_mul.cu +++ b/test/test_unsigned_mul.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_mul_sycl.cpp b/test/test_unsigned_mul_sycl.cpp index 7b08ecf3..59f21251 100644 --- a/test/test_unsigned_mul_sycl.cpp +++ b/test/test_unsigned_mul_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return a * b; }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return a * b; }); } diff --git a/test/test_unsigned_ne.cu b/test/test_unsigned_ne.cu index c9a02b41..9dbd5c90 100644 --- a/test/test_unsigned_ne.cu +++ b/test/test_unsigned_ne.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_ne_sycl.cpp b/test/test_unsigned_ne_sycl.cpp index 18af865b..5690db0b 100644 --- a/test/test_unsigned_ne_sycl.cpp +++ b/test/test_unsigned_ne_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run_compare( - [](uint128_t a, uint128_t b) { return a != b; }); + return int128_sycl_test::run_compare( + [](uint128 a, uint128 b) { return a != b; }); } diff --git a/test/test_unsigned_not.cu b/test/test_unsigned_not.cu index 9bfb08b7..ac841490 100644 --- a/test/test_unsigned_not.cu +++ b/test/test_unsigned_not.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, test_type *out, int numElements) { diff --git a/test/test_unsigned_not_sycl.cpp b/test/test_unsigned_not_sycl.cpp index e359a9e2..a012bb4e 100644 --- a/test/test_unsigned_not_sycl.cpp +++ b/test/test_unsigned_not_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return ~a; }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return ~a; }); } diff --git a/test/test_unsigned_or.cu b/test/test_unsigned_or.cu index 9399341f..b5fa5d67 100644 --- a/test/test_unsigned_or.cu +++ b/test/test_unsigned_or.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_unsigned_or_sycl.cpp b/test/test_unsigned_or_sycl.cpp index a19267a7..ba01216f 100644 --- a/test/test_unsigned_or_sycl.cpp +++ b/test/test_unsigned_or_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return a | b; }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return a | b; }); } diff --git a/test/test_unsigned_right_shift.cu b/test/test_unsigned_right_shift.cu index 2dd59fba..019b006b 100644 --- a/test/test_unsigned_right_shift.cu +++ b/test/test_unsigned_right_shift.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const unsigned *shift, test_type *out, int numElements) { diff --git a/test/test_unsigned_right_shift_sycl.cpp b/test/test_unsigned_right_shift_sycl.cpp index 300fdaae..88f6e02e 100644 --- a/test/test_unsigned_right_shift_sycl.cpp +++ b/test/test_unsigned_right_shift_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int i) { return a >> (i % 128); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int i) { return a >> (i % 128); }); } diff --git a/test/test_unsigned_saturating_add.cu b/test/test_unsigned_saturating_add.cu index 50faed85..c180f051 100644 --- a/test/test_unsigned_saturating_add.cu +++ b/test/test_unsigned_saturating_add.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_unsigned_saturating_add_sycl.cpp b/test/test_unsigned_saturating_add_sycl.cpp index 02a4ca84..3424ad27 100644 --- a/test/test_unsigned_saturating_add_sycl.cpp +++ b/test/test_unsigned_saturating_add_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return boost::int128::saturating_add(a, b); }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return boost::int128::saturating_add(a, b); }); } diff --git a/test/test_unsigned_saturating_div.cu b/test/test_unsigned_saturating_div.cu index 1925dd26..f96a0798 100644 --- a/test/test_unsigned_saturating_div.cu +++ b/test/test_unsigned_saturating_div.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_unsigned_saturating_div_sycl.cpp b/test/test_unsigned_saturating_div_sycl.cpp index 83f08209..a1c91214 100644 --- a/test/test_unsigned_saturating_div_sycl.cpp +++ b/test/test_unsigned_saturating_div_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return boost::int128::saturating_div(a, int128_sycl_test::safe_divisor(a, b)); }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return boost::int128::saturating_div(a, int128_sycl_test::safe_divisor(a, b)); }); } diff --git a/test/test_unsigned_saturating_mul.cu b/test/test_unsigned_saturating_mul.cu index b619cc6f..70836828 100644 --- a/test/test_unsigned_saturating_mul.cu +++ b/test/test_unsigned_saturating_mul.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_unsigned_saturating_mul_sycl.cpp b/test/test_unsigned_saturating_mul_sycl.cpp index 49412e43..3378fe95 100644 --- a/test/test_unsigned_saturating_mul_sycl.cpp +++ b/test/test_unsigned_saturating_mul_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return boost::int128::saturating_mul(a, b); }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return boost::int128::saturating_mul(a, b); }); } diff --git a/test/test_unsigned_saturating_sub.cu b/test/test_unsigned_saturating_sub.cu index d3fd7dcf..aab258be 100644 --- a/test/test_unsigned_saturating_sub.cu +++ b/test/test_unsigned_saturating_sub.cu @@ -16,7 +16,7 @@ #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_unsigned_saturating_sub_sycl.cpp b/test/test_unsigned_saturating_sub_sycl.cpp index e0247ea2..90517855 100644 --- a/test/test_unsigned_saturating_sub_sycl.cpp +++ b/test/test_unsigned_saturating_sub_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return boost::int128::saturating_sub(a, b); }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return boost::int128::saturating_sub(a, b); }); } diff --git a/test/test_unsigned_sub.cu b/test/test_unsigned_sub.cu index be22b2fc..f82e9837 100644 --- a/test/test_unsigned_sub.cu +++ b/test/test_unsigned_sub.cu @@ -18,7 +18,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_sub_sycl.cpp b/test/test_unsigned_sub_sycl.cpp index 503d285c..8dff9b2a 100644 --- a/test/test_unsigned_sub_sycl.cpp +++ b/test/test_unsigned_sub_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return a - b; }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return a - b; }); } diff --git a/test/test_unsigned_to_chars.cu b/test/test_unsigned_to_chars.cu index 76dd830f..a3a2bb04 100644 --- a/test/test_unsigned_to_chars.cu +++ b/test/test_unsigned_to_chars.cu @@ -19,7 +19,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; constexpr int BUF_SIZE = 64; diff --git a/test/test_unsigned_to_chars_bases.cu b/test/test_unsigned_to_chars_bases.cu index b67c2bb5..e0081a0b 100644 --- a/test/test_unsigned_to_chars_bases.cu +++ b/test/test_unsigned_to_chars_bases.cu @@ -19,7 +19,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; constexpr int BUF_SIZE = 192; diff --git a/test/test_unsigned_to_chars_bases_sycl.cpp b/test/test_unsigned_to_chars_bases_sycl.cpp index 01066aca..6eaf2ba1 100644 --- a/test/test_unsigned_to_chars_bases_sycl.cpp +++ b/test/test_unsigned_to_chars_bases_sycl.cpp @@ -4,14 +4,14 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { int result {0}; - result |= int128_sycl_test::run_to_chars(2); - result |= int128_sycl_test::run_to_chars(8); - result |= int128_sycl_test::run_to_chars(16); - result |= int128_sycl_test::run_to_chars(36); + result |= int128_sycl_test::run_to_chars(2); + result |= int128_sycl_test::run_to_chars(8); + result |= int128_sycl_test::run_to_chars(16); + result |= int128_sycl_test::run_to_chars(36); return result; } diff --git a/test/test_unsigned_to_chars_sycl.cpp b/test/test_unsigned_to_chars_sycl.cpp index d4dd01f7..6edc4ae2 100644 --- a/test/test_unsigned_to_chars_sycl.cpp +++ b/test/test_unsigned_to_chars_sycl.cpp @@ -4,9 +4,9 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run_to_chars(10); + return int128_sycl_test::run_to_chars(10); } diff --git a/test/test_unsigned_to_signed_conversion.cu b/test/test_unsigned_to_signed_conversion.cu index 67195383..2ec01b13 100644 --- a/test/test_unsigned_to_signed_conversion.cu +++ b/test/test_unsigned_to_signed_conversion.cu @@ -17,8 +17,8 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using signed_type = boost::int128::int128_t; -using unsigned_type = boost::int128::uint128_t; +using signed_type = boost::int128::int128; +using unsigned_type = boost::int128::uint128; /** * CUDA Kernel Device code diff --git a/test/test_unsigned_to_signed_conversion_sycl.cpp b/test/test_unsigned_to_signed_conversion_sycl.cpp index e7c5aac2..4def121a 100644 --- a/test/test_unsigned_to_signed_conversion_sycl.cpp +++ b/test/test_unsigned_to_signed_conversion_sycl.cpp @@ -4,11 +4,11 @@ #include "sycl_test.hpp" -using boost::int128::int128_t; -using boost::int128::uint128_t; +using boost::int128::int128; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t, int) { return static_cast(a); }); + return int128_sycl_test::run( + [](uint128 a, uint128, int) { return static_cast(a); }); } diff --git a/test/test_unsigned_xor.cu b/test/test_unsigned_xor.cu index 1416fc87..9c74489b 100644 --- a/test/test_unsigned_xor.cu +++ b/test/test_unsigned_xor.cu @@ -17,7 +17,7 @@ // For the CUDA runtime routines (prefixed with "cuda_") #include -using test_type = boost::int128::uint128_t; +using test_type = boost::int128::uint128; __global__ void cuda_test(const test_type *in, const test_type *in2, test_type *out, int numElements) { diff --git a/test/test_unsigned_xor_sycl.cpp b/test/test_unsigned_xor_sycl.cpp index 30f9ea1d..bf38790b 100644 --- a/test/test_unsigned_xor_sycl.cpp +++ b/test/test_unsigned_xor_sycl.cpp @@ -4,10 +4,10 @@ #include "sycl_test.hpp" -using boost::int128::uint128_t; +using boost::int128::uint128; int main() { - return int128_sycl_test::run( - [](uint128_t a, uint128_t b, int) { return a ^ b; }); + return int128_sycl_test::run( + [](uint128 a, uint128 b, int) { return a ^ b; }); } diff --git a/test/test_x64_msvc_div.cpp b/test/test_x64_msvc_div.cpp index 40cbb70c..2c6ff896 100644 --- a/test/test_x64_msvc_div.cpp +++ b/test/test_x64_msvc_div.cpp @@ -16,7 +16,7 @@ #if defined(_M_AMD64) && !defined(__GNUC__) && !defined(__clang__) && _MSC_VER >= 1920 -using boost::int128::uint128_t; +using boost::int128::uint128; static std::mt19937_64 rng{42}; static constexpr std::size_t N{4096U}; @@ -26,14 +26,14 @@ static std::uniform_int_distribution dist{UINT64_C(0), UINT64_MAX // uses no 64-bit-divide or multiply intrinsics. static void knuth_oracle(const std::uint64_t uh, const std::uint64_t ul, const std::uint64_t vh, const std::uint64_t vl, - uint128_t& quot, uint128_t& rem) + uint128& quot, uint128& rem) { - const uint128_t u_val{uh, ul}; - const uint128_t v_val{vh, vl}; + const uint128 u_val{uh, ul}; + const uint128 v_val{vh, vl}; if (u_val < v_val) { - quot = uint128_t{UINT64_C(0)}; + quot = uint128{UINT64_C(0)}; rem = u_val; return; } @@ -47,8 +47,8 @@ static void knuth_oracle(const std::uint64_t uh, const std::uint64_t ul, boost::int128::detail::impl::knuth_divide(u, m, v, n, q); - quot = boost::int128::detail::impl::from_words(q); - rem = boost::int128::detail::impl::from_words(u); + quot = boost::int128::detail::impl::from_words(q); + rem = boost::int128::detail::impl::from_words(u); } // _udiv128 (udiv_2by1) versus the portable divlu, for 128/64 -> 64. @@ -82,13 +82,13 @@ static void check_div3by2(const std::uint64_t uh, const std::uint64_t ul, std::uint64_t rl{}; const auto q{boost::int128::detail::div3by2(uh, ul, vh, vl, rh, rl)}; - uint128_t expected_q{}; - uint128_t expected_r{}; + uint128 expected_q{}; + uint128 expected_r{}; knuth_oracle(uh, ul, vh, vl, expected_q, expected_r); BOOST_TEST_EQ(expected_q.high, UINT64_C(0)); BOOST_TEST_EQ(q, expected_q.low); - BOOST_TEST_EQ(uint128_t(rh, rl), expected_r); + BOOST_TEST_EQ(uint128(rh, rl), expected_r); } // _udiv128 + _umul128 (div3by2) versus the 32-bit-limb Knuth reference, for 128/128 -> 64.