template <>
inline int BitParity(Unsigned128 v) {
- return BitParity(Lower64of128(v)) ^ BitParity(Upper64of128(v));
+ return BitParity(Lower64of128(v) ^ Upper64of128(v));
+}
+
+template <>
+inline Unsigned128 EndianSwapValue(Unsigned128 v) {
+ return (Unsigned128{EndianSwapValue(Lower64of128(v))} << 64) |
+ EndianSwapValue(Upper64of128(v));
+}
+
+template <>
+inline Unsigned128 ReverseBits(Unsigned128 v) {
+ return (Unsigned128{ReverseBits(Lower64of128(v))} << 64) |
+ ReverseBits(Upper64of128(v));
+}
+
+template <>
+inline Unsigned128 DownwardInvolution(Unsigned128 v) {
+ return (Unsigned128{DownwardInvolution(Upper64of128(v))} << 64) |
+ DownwardInvolution(Upper64of128(v) ^ Lower64of128(v));
}
template <typename T>