16 #ifndef STXXL_COMMON_UINT_TYPES_HEADER
17 #define STXXL_COMMON_UINT_TYPES_HEADER
52 template <
typename HighType>
188 return (
low == b.low) && (
high == b.high);
224 return os << a.
ull();
245 __attribute__ ((packed));
259 template <
typename HighType>
264 static const bool is_specialized =
true;
279 static const bool is_signed =
false;
282 static const bool is_integer =
true;
285 static const bool is_exact =
true;
288 static const int radix = 2;
302 static const int min_exponent = 0;
305 static const int min_exponent10 = 0;
308 static const int max_exponent = 0;
311 static const int max_exponent10 = 0;
314 static const bool has_infinity =
false;
319 #endif // !STXXL_COMMON_UINT_TYPES_HEADER
uint_pair< uint8 > uint40
Construct a 40-bit unsigned integer stored in five bytes.
static const int high_bits
number of bits in the higher integer part, used a bit shift value.
friend std::ostream & operator<<(std::ostream &os, const uint_pair &a)
make a uint_pair outputtable via iostreams, using unsigned long long.
static const int bytes
number of bytes in uint_pair
HighType high_type
higher part type, currently either 8-bit or 16-bit
uint32 low_type
lower part type, always 32-bit
Construct an 40-bit or 48-bit unsigned integer stored in five or six bytes.
static uint_pair max()
return an uint_pair instance containing the largest value possible
unsigned long long int uint64
static stxxl::uint_pair< HighType > max()
return an uint_pair instance containing the largest value possible
uint_pair(const uint64 &a)
construct from an uint64 (unsigned long long)
uint64 u64() const
return the number as a uint64
uint_pair< uint16 > uint48
Construct a 48-bit unsigned integer stored in six bytes.
static uint_pair min()
return an uint_pair instance containing the smallest value possible
uint64 ull() const
return the number as an uint64 (unsigned long long)
low_type low
member containing lower significant integer value
static const int digits
number of binary digits (bits) in uint_pair
uint_pair & operator++()
prefix increment operator (directly manipulates the integer parts)
uint_pair(const low_type &l, const high_type &h)
construct unit pair from lower and higher parts.
uint64 ull() const
return the number as an uint64 (unsigned long long)
static stxxl::uint_pair< HighType > min()
return an uint_pair instance containing the smallest value possible
uint32 low_type
lower part type, always 32-bit
static low_type low_max()
return highest value storable in lower part, also used as a mask.
static const stxxl::uint_pair< HighType > epsilon()
epsilon is zero
uint_pair & operator+=(const uint_pair &b)
addition operator (uses 64-bit arithmetic)
static uint_pair min()
return an uint_pair instance containing the smallest value possible
bool operator!=(const uint_pair &b) const
inequality checking operator
static const stxxl::uint_pair< HighType > round_error()
rounding error is zero
bool operator<=(const uint_pair &b) const
less-or-equal comparison operator
static const int low_bits
number of bits in the lower integer part, used a bit shift value.
bool operator>(const uint_pair &b) const
greater comparison operator
low_type low
member containing lower significant integer value
bool operator>=(const uint_pair &b) const
greater-or-equal comparison operator
bool operator<(const uint_pair &b) const
less-than comparison operator
#define STXXL_BEGIN_NAMESPACE
static high_type high_max()
return highest value storable in higher part, also used as a mask.
uint_pair & operator--()
prefix decrement operator (directly manipulates the integer parts)
high_type high
member containing higher significant integer value
static uint_pair max()
return an uint_pair instance containing the largest value possible
#define STXXL_STATIC_ASSERT(x)
static stxxl::uint_pair< HighType > lowest()
return an uint_pair instance containing the smallest value possible
high_type high
member containing higher significant integer value
uint_pair(const int32 &a)
const from a simple 32-bit signed integer
uint_pair()
empty constructor, does not even initialize to zero!
uint_pair()
empty constructor, does not even initialize to zero!
HighType high_type
higher part type, currently either 8-bit or 16-bit
bool operator==(const uint_pair &b) const
equality checking operator
uint_pair(const uint_pair &a)
copy constructor
#define STXXL_END_NAMESPACE
uint_pair(const uint32 &a)
const from a simple 32-bit unsigned integer