STXXL
1.4-dev
|
#include <stxxl/bits/config.h>
#include <stxxl/bits/namespace.h>
#include <stxxl/bits/common/utils.h>
#include <stxxl/bits/common/types.h>
#include <limits>
#include <ostream>
#include <cassert>
Go to the source code of this file.
Classes | |
class | std::numeric_limits< stxxl::uint_pair< HighType > > |
template class providing some numeric_limits fields for uint_pair types. More... | |
class | stxxl::uint_pair< HighType > |
Construct an 40-bit or 48-bit unsigned integer stored in five or six bytes. More... | |
Namespaces | |
stxxl | |
STXXL library namespace | |
Typedefs | |
typedef HighType | high_type |
higher part type, currently either 8-bit or 16-bit More... | |
typedef uint32 | low_type |
lower part type, always 32-bit More... | |
typedef uint_pair< uint8 > | stxxl::uint40 |
Construct a 40-bit unsigned integer stored in five bytes. More... | |
typedef uint_pair< uint16 > | stxxl::uint48 |
Construct a 48-bit unsigned integer stored in six bytes. More... | |
Functions | |
template<typename HighType > | |
class stxxl::uint_pair | stxxl::__attribute__ ((packed)) |
static unsigned_type | high_max () |
return highest value storable in higher part, also used as a mask. More... | |
static unsigned_type | low_max () |
return highest value storable in lower part, also used as a mask. More... | |
static uint_pair | max () |
return an uint_pair instance containing the largest value possible More... | |
static uint_pair | min () |
return an uint_pair instance containing the smallest value possible More... | |
operator uint64 () const | |
implicit cast to an unsigned long long More... | |
bool | operator!= (const uint_pair &b) const |
inequality checking operator More... | |
uint_pair & | operator++ () |
prefix increment operator (directly manipulates the integer parts) More... | |
uint_pair & | operator+= (const uint_pair &b) |
addition operator (uses 64-bit arithmetic) More... | |
uint_pair & | operator-- () |
prefix decrement operator (directly manipulates the integer parts) More... | |
bool | operator< (const uint_pair &b) const |
less-than comparison operator More... | |
std::ostream & | operator<< (std::ostream &os, const uint_pair &a) |
make a uint_pair outputtable via iostreams, using unsigned long long. More... | |
bool | operator<= (const uint_pair &b) const |
less-or-equal comparison operator More... | |
bool | operator== (const uint_pair &b) const |
equality checking operator More... | |
bool | operator> (const uint_pair &b) const |
greater comparison operator More... | |
bool | operator>= (const uint_pair &b) const |
greater-or-equal comparison operator More... | |
uint64 | u64 () const |
return the number as a uint64 More... | |
uint_pair () | |
empty constructor, does not even initialize to zero! More... | |
uint_pair (const low_type &l, const high_type &h) | |
construct unit pair from lower and higher parts. More... | |
uint_pair (const uint_pair &a) | |
copy constructor More... | |
uint_pair (const uint32 &a) | |
const from a simple 32-bit unsigned integer More... | |
uint_pair (const int32 &a) | |
const from a simple 32-bit signed integer More... | |
uint_pair (const uint64 &a) | |
construct from an uint64 (unsigned long long) More... | |
uint64 | ull () const |
return the number as an uint64 (unsigned long long) More... | |
Variables | |
class std::numeric_limits < stxxl::uint_pair< HighType > > | std::__attribute__ |
static const size_t | bytes = sizeof(low_type) + sizeof(high_type) |
number of bytes in uint_pair More... | |
static const size_t | digits = low_bits + high_bits |
number of binary digits (bits) in uint_pair More... | |
high_type | high |
member containing higher significant integer value More... | |
static const size_t | high_bits = 8 * sizeof(high_type) |
number of bits in the higher integer part, used a bit shift value. More... | |
low_type | low |
member containing lower significant integer value More... | |
static const size_t | low_bits = 8 * sizeof(low_type) |
number of bits in the lower integer part, used a bit shift value. More... | |
typedef HighType high_type |
higher part type, currently either 8-bit or 16-bit
Definition at line 65 of file uint_types.h.
typedef uint32 low_type |
lower part type, always 32-bit
Definition at line 63 of file uint_types.h.
|
staticprivate |
return highest value storable in higher part, also used as a mask.
Definition at line 83 of file uint_types.h.
Referenced by stxxl::uint_pair< HighType >::operator+=(), and uint_pair().
|
staticprivate |
return highest value storable in lower part, also used as a mask.
Definition at line 74 of file uint_types.h.
Referenced by stxxl::uint_pair< HighType >::operator+=(), stxxl::uint_pair< HighType >::operator--(), and u64().
|
static |
return an uint_pair instance containing the largest value possible
Definition at line 241 of file uint_types.h.
Referenced by stxxl::hash_map::hash_map< KeyType, MappedType, HashType, CompareType, SubBlockSize, SubBlocksPerBlock, AllocType >::_bkt_num(), stxxl::mem_file::discard(), stxxl::uint_pair< HighType >::high_max(), stxxl::new_alloc< Type >::max_size(), stxxl::hash_map::hash_map< KeyType, MappedType, HashType, CompareType, SubBlockSize, SubBlocksPerBlock, AllocType >::max_size(), stxxl::btree::btree< KeyType, DataType, CompareType, RawNodeSize, RawLeafSize, PDAllocStrategy >::max_size(), stxxl::deque< ValueType, VectorType >::max_size(), stxxl::tuple< typename Input1::value_type, typename Input2::value_type, typename Input3::value_type, typename Input4::value_type >::max_value(), stxxl::tuple< T1, Plug, Plug, Plug, Plug >::max_value(), stxxl::tuple< T1, T2, Plug, Plug, Plug, Plug >::max_value(), stxxl::tuple< T1, T2, T3, Plug, Plug, Plug >::max_value(), stxxl::tuple< T1, T2, T3, T4, Plug, Plug >::max_value(), stxxl::tuple< T1, T2, T3, T4, T5, Plug >::max_value(), stxxl::hash_map::hash_map< KeyType, MappedType, HashType, KeyCompareType, SubBlockSize, SubBlocksPerBlock, AllocatorType >::Cmp::max_value(), min(), stxxl::parallel::multiseq_partition(), stxxl::parallel::multiseq_selection(), stxxl::block_scheduler_algorithm_offline_lfd< SwappableBlockType >::priority::priority(), stxxl::syscall_file::serve(), stxxl::custom_stats_counter< ValueType >::set_max(), stxxl::mem_file::set_size(), and stxxl::swap_vector< external_array_type >::swap_back().
|
static |
return an uint_pair instance containing the smallest value possible
Definition at line 234 of file uint_types.h.
References max(), and uint_pair().
Referenced by stxxl::matrix_local::matrix_operations< ValueType, BlockSideLength >::choose_level_for_feedable_sw(), stxxl::block_scheduler< SwappableBlockType >::get_free_internal_block(), std::numeric_limits< stxxl::uint_pair< HighType > >::lowest(), stxxl::matrix_local::matrix_operations< ValueType, BlockSideLength >::matrix_col_vector_multiply_and_add_swappable_block(), stxxl::matrix_local::matrix_operations< ValueType, BlockSideLength >::matrix_from_vectors_swappable_block(), stxxl::matrix_local::matrix_operations< ValueType, BlockSideLength >::matrix_row_vector_multiply_and_add_swappable_block(), stxxl::tuple< typename Input1::value_type, typename Input2::value_type, typename Input3::value_type, typename Input4::value_type >::min_value(), stxxl::tuple< T1, Plug, Plug, Plug, Plug >::min_value(), stxxl::tuple< T1, T2, Plug, Plug, Plug, Plug >::min_value(), stxxl::tuple< T1, T2, T3, Plug, Plug, Plug >::min_value(), stxxl::tuple< T1, T2, T3, T4, Plug, Plug >::min_value(), stxxl::tuple< T1, T2, T3, T4, T5, Plug >::min_value(), stxxl::hash_map::hash_map< KeyType, MappedType, HashType, KeyCompareType, SubBlockSize, SubBlocksPerBlock, AllocatorType >::Cmp::min_value(), stxxl::matrix_local::matrix_operations< ValueType, BlockSideLength >::multi_level_strassen_winograd_multiply_and_add(), stxxl::matrix_local::matrix_operations< ValueType, BlockSideLength >::multi_level_strassen_winograd_multiply_and_add_block_grained(), stxxl::parallel::multiseq_partition(), stxxl::parallel::multiseq_selection(), stxxl::parallel::multiway_merge_3_combined(), stxxl::parallel::multiway_merge_4_combined(), stxxl::parallel::multiway_merge_loser_tree(), stxxl::parallel::multiway_merge_loser_tree_combined(), stxxl::parallel::multiway_merge_loser_tree_unguarded(), operator<<(), stxxl::parallel_priority_queue< ValueType, CompareType, AllocStrategy, BlockSize, DefaultMemSize, MaxItems >::pop(), stxxl::parallel::prepare_unguarded(), stxxl::parallel_priority_queue< ValueType, CompareType, AllocStrategy, BlockSize, DefaultMemSize, MaxItems >::top(), stxxl::ppq_local::external_array< ValueType, BlockSize, AllocStrategy >::wait_all_hinted_blocks(), and stxxl::ppq_local::external_array< ValueType, BlockSize, AllocStrategy >::wait_next_blocks().
|
inline |
implicit cast to an unsigned long long
Definition at line 151 of file uint_types.h.
|
inline |
inequality checking operator
Definition at line 198 of file uint_types.h.
References stxxl::uint_pair< HighType >::high, high, stxxl::uint_pair< HighType >::low, and low.
Referenced by stxxl::btree::btree_iterator< self_type >::operator!=(), stxxl::btree::btree_const_iterator< BTreeType >::operator!=(), stxxl::hash_map::hash_map_iterator< HashMap >::operator!=(), and stxxl::hash_map::hash_map_const_iterator< HashMap >::operator!=().
|
inline |
prefix increment operator (directly manipulates the integer parts)
Definition at line 163 of file uint_types.h.
Referenced by stxxl::hash_map::buffered_reader< CacheType, BidIterator >::next_subblock(), stxxl::blocked_index< modulo >::operator++(), stxxl::double_blocked_index< SizeType, modulo2, modulo1 >::operator++(), stxxl::array_of_sequences_iterator< ArrayType, ValueType, modulo >::operator++(), stxxl::vector_bufwriter< VectorIteratorType >::operator<<(), stxxl::vector_bufreader< VectorIteratorType >::operator>>(), and stxxl::vector_bufreader_reverse< VectorIteratorType >::operator>>().
addition operator (uses 64-bit arithmetic)
Definition at line 183 of file uint_types.h.
|
inline |
prefix decrement operator (directly manipulates the integer parts)
Definition at line 173 of file uint_types.h.
Referenced by stxxl::blocked_index< modulo >::operator--(), stxxl::double_blocked_index< SizeType, modulo2, modulo1 >::operator--(), and stxxl::array_of_sequences_iterator< ArrayType, ValueType, modulo >::operator--().
|
inline |
less-than comparison operator
Definition at line 204 of file uint_types.h.
References stxxl::uint_pair< HighType >::high, high, stxxl::uint_pair< HighType >::low, and low.
friend std::ostream& __attribute__::operator<< | ( | std::ostream & | os, |
const uint_pair & | a | ||
) |
make a uint_pair outputtable via iostreams, using unsigned long long.
Definition at line 228 of file uint_types.h.
References min(), and uint_pair().
Referenced by stxxl::buf_ostream< BlockType, BidIteratorType >::fill().
|
inline |
less-or-equal comparison operator
Definition at line 210 of file uint_types.h.
References stxxl::uint_pair< HighType >::high, high, stxxl::uint_pair< HighType >::low, and low.
|
inline |
equality checking operator
Definition at line 192 of file uint_types.h.
References stxxl::uint_pair< HighType >::high, high, stxxl::uint_pair< HighType >::low, and low.
Referenced by stxxl::hash_map::hash_map_iterator_base< HashMap >::operator!=(), stxxl::btree::btree_iterator< self_type >::operator==(), stxxl::btree::btree_const_iterator< BTreeType >::operator==(), stxxl::hash_map::hash_map_iterator< HashMap >::operator==(), and stxxl::hash_map::hash_map_const_iterator< HashMap >::operator==().
|
inline |
greater comparison operator
Definition at line 216 of file uint_types.h.
References stxxl::uint_pair< HighType >::high, high, stxxl::uint_pair< HighType >::low, and low.
|
inline |
greater-or-equal comparison operator
Definition at line 222 of file uint_types.h.
References stxxl::uint_pair< HighType >::ull().
|
inline |
|
inline |
empty constructor, does not even initialize to zero!
Definition at line 99 of file uint_types.h.
Referenced by min(), and operator<<().
construct unit pair from lower and higher parts.
Definition at line 111 of file uint_types.h.
|
inline |
copy constructor
Definition at line 116 of file uint_types.h.
|
inline |
const from a simple 32-bit unsigned integer
Definition at line 121 of file uint_types.h.
References high, high_max(), and low.
|
inline |
const from a simple 32-bit signed integer
Definition at line 126 of file uint_types.h.
|
inline |
construct from an uint64 (unsigned long long)
Definition at line 136 of file uint_types.h.
|
inline |
return the number as an uint64 (unsigned long long)
Definition at line 145 of file uint_types.h.
number of bytes in uint_pair
Definition at line 96 of file uint_types.h.
Referenced by stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::operator new(), and stxxl::typed_block< RawSize, Type, NRef, MetaInfoType >::operator new[]().
number of binary digits (bits) in uint_pair
Definition at line 93 of file uint_types.h.
high_type high |
member containing higher significant integer value
Definition at line 71 of file uint_types.h.
Referenced by operator uint64(), operator!=(), stxxl::uint_pair< HighType >::operator+=(), stxxl::uint_pair< HighType >::operator--(), operator<(), operator<=(), stxxl::uint_pair< HighType >::operator==(), operator==(), operator>(), u64(), uint_pair(), and stxxl::uint_pair< HighType >::ull().
|
static |
number of bits in the higher integer part, used a bit shift value.
Definition at line 89 of file uint_types.h.
Referenced by stxxl::uint_pair< HighType >::uint_pair().
low_type low |
member containing lower significant integer value
Definition at line 69 of file uint_types.h.
Referenced by operator uint64(), operator!=(), stxxl::uint_pair< HighType >::operator+=(), stxxl::uint_pair< HighType >::operator--(), operator<(), operator<=(), stxxl::uint_pair< HighType >::operator==(), operator==(), operator>(), u64(), uint_pair(), and stxxl::uint_pair< HighType >::ull().
|
static |
number of bits in the lower integer part, used a bit shift value.
Definition at line 80 of file uint_types.h.
Referenced by operator uint64(), stxxl::uint_pair< HighType >::operator+=(), stxxl::uint_pair< HighType >::uint_pair(), and stxxl::uint_pair< HighType >::ull().