File: uint256_t.cpp

package info (click to toggle)
libsdsl 2.1.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 3,980 kB
  • sloc: cpp: 42,286; makefile: 1,171; ansic: 318; sh: 201; python: 27
file content (17 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "sdsl/uint256_t.hpp"

//! Namespace for the succinct data structure library
namespace sdsl
{
std::ostream& operator<<(std::ostream& os, const uint256_t& x)
{
    uint64_t X[4] = {(uint64_t)(x.m_high >> 64), (uint64_t)x.m_high, x.m_mid, x.m_lo};
    for (int j=0; j < 4; ++j) {
        for (int i=0; i < 16; ++i) {
            os << std::hex << ((X[j]>>60)&0xFULL) << std::dec;
            X[j] <<= 4;
        }
    }
    return os;
}
} // end namespace