16 #ifndef STXXL_COMMON_UINT_TYPES_HEADER
17 #define STXXL_COMMON_UINT_TYPES_HEADER
51 template <
typename HighType>
223 return os << a.
ull();
244 __attribute__ ((packed));
263 template <
typename HighType>
268 static const bool is_specialized =
true;
283 static const bool is_signed =
false;
286 static const bool is_integer =
true;
289 static const bool is_exact =
true;
292 static const int radix = 2;
306 static const int min_exponent = 0;
309 static const int min_exponent10 = 0;
312 static const int max_exponent = 0;
315 static const int max_exponent10 = 0;
318 static const bool has_infinity =
false;
323 #endif // !STXXL_COMMON_UINT_TYPES_HEADER
friend std::ostream & operator<<(std::ostream &os, const uint_pair &a)
make a uint_pair outputtable via iostreams, using unsigned long long.
static unsigned_type high_max()
return highest value storable in higher part, also used as a mask.
static const size_t low_bits
number of bits in the lower integer part, used a bit shift value.
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 unsigned_type high_max()
return highest value storable in higher part, also used as a mask.
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
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
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 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
uint_pair< uint8 > uint40
Construct a 40-bit unsigned integer stored in five bytes.
static unsigned_type low_max()
return highest value storable in lower part, also used as a mask.
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 size_t high_bits
number of bits in the higher 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
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
static unsigned_type low_max()
return highest value storable in lower part, also used as a mask.
high_type high
member containing higher significant integer value
choose_int_types< my_pointer_size >::unsigned_type unsigned_type
static const size_t bytes
number of bytes in uint_pair
static const size_t digits
number of binary digits (bits) in uint_pair
uint_pair(const int32 &a)
const from a simple 32-bit signed integer
uint_pair< uint16 > uint48
Construct a 48-bit unsigned integer stored in six bytes.
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