tudocomp
– The TU Dortmund Compression Framework
tdc::uint_t< bits > Class Template Reference

Custom integer type for storing values of arbitrary bit size bits. More...

#include <uint_t.hpp>

Inheritance diagram for tdc::uint_t< bits >:
tdc::IntegerBaseCombiner<... >

Public Member Functions

constexpr uint_t ()
 
constexpr uint_t (uint_t &&i)
 
constexpr uint_t (const uint_t &i)
 
uint_toperator= (const uint_t &b)
 
constexpr uint_t (unsigned char i)
 
uint_toperator= (unsigned char data)
 
constexpr operator unsigned char () const
 
constexpr uint_t (signed char i)
 
uint_toperator= (signed char data)
 
constexpr operator signed char () const
 
constexpr uint_t (char i)
 
constexpr uint_toperator= (char data)
 
constexpr operator char () const
 
constexpr uint_t (unsigned int i)
 
uint_toperator= (unsigned int data)
 
constexpr operator unsigned int () const
 
constexpr uint_t (unsigned short int i)
 
uint_toperator= (unsigned short int data)
 
constexpr operator unsigned short int () const
 
constexpr uint_t (unsigned long int i)
 
uint_toperator= (unsigned long int data)
 
constexpr operator unsigned long int () const
 
constexpr uint_t (unsigned long long int i)
 
uint_toperator= (unsigned long long int data)
 
constexpr operator unsigned long long int () const
 
constexpr uint_t (int i)
 
uint_toperator= (int data)
 
constexpr operator int () const
 
constexpr uint_t (short int i)
 
uint_toperator= (short int data)
 
constexpr operator short int () const
 
constexpr uint_t (long int i)
 
uint_toperator= (long int data)
 
constexpr operator long int () const
 
constexpr uint_t (long long int i)
 
uint_toperator= (long long int data)
 
constexpr operator long long int () const
 

Friends

struct UinttDispatch< uint32_t >
 
struct UinttDispatch< uint64_t >
 

Detailed Description

template<size_t bits>
class tdc::uint_t< bits >

Custom integer type for storing values of arbitrary bit size bits.

It is guaranteed that this type will only have a byte size as large as needed to store all bits, but there will be padding bits for values not multiples of 8.

In practice useful sizes are 40, 48 and 56 bits. 40 bit indices correspond to 1TiB of addressable memory, and 48 bit correspond to today's hardware limits of the x86_64 architecture.

Definition at line 11 of file uint_t.hpp.

Constructor & Destructor Documentation

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( )
inline

Definition at line 69 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( uint_t< bits > &&  i)
inline

Definition at line 70 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( const uint_t< bits > &  i)
inline

Definition at line 73 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( unsigned char  i)
inline

Definition at line 77 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( signed char  i)
inline

Definition at line 81 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( char  i)
inline

Definition at line 85 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( unsigned int  i)
inline

Definition at line 90 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( unsigned short int  i)
inline

Definition at line 94 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( unsigned long int  i)
inline

Definition at line 98 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( unsigned long long int  i)
inline

Definition at line 102 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( int  i)
inline

Definition at line 106 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( short int  i)
inline

Definition at line 110 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( long int  i)
inline

Definition at line 114 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::uint_t ( long long int  i)
inline

Definition at line 118 of file uint_t.hpp.

Member Function Documentation

template<size_t bits>
constexpr tdc::uint_t< bits >::operator char ( ) const
inline

Definition at line 87 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::operator int ( ) const
inline

Definition at line 108 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::operator long int ( ) const
inline

Definition at line 116 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::operator long long int ( ) const
inline

Definition at line 120 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::operator short int ( ) const
inline

Definition at line 112 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::operator signed char ( ) const
inline

Definition at line 83 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::operator unsigned char ( ) const
inline

Definition at line 79 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::operator unsigned int ( ) const
inline

Definition at line 92 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::operator unsigned long int ( ) const
inline

Definition at line 100 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::operator unsigned long long int ( ) const
inline

Definition at line 104 of file uint_t.hpp.

template<size_t bits>
constexpr tdc::uint_t< bits >::operator unsigned short int ( ) const
inline

Definition at line 96 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( const uint_t< bits > &  b)
inline

Definition at line 74 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( unsigned char  data)
inline

Definition at line 78 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( signed char  data)
inline

Definition at line 82 of file uint_t.hpp.

template<size_t bits>
constexpr uint_t& tdc::uint_t< bits >::operator= ( char  data)
inline

Definition at line 86 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( unsigned int  data)
inline

Definition at line 91 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( unsigned short int  data)
inline

Definition at line 95 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( unsigned long int  data)
inline

Definition at line 99 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( unsigned long long int  data)
inline

Definition at line 103 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( int  data)
inline

Definition at line 107 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( short int  data)
inline

Definition at line 111 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( long int  data)
inline

Definition at line 115 of file uint_t.hpp.

template<size_t bits>
uint_t& tdc::uint_t< bits >::operator= ( long long int  data)
inline

Definition at line 119 of file uint_t.hpp.

Friends And Related Function Documentation

template<size_t bits>
friend struct UinttDispatch< uint32_t >
friend

Definition at line 65 of file uint_t.hpp.

template<size_t bits>
friend struct UinttDispatch< uint64_t >
friend

Definition at line 66 of file uint_t.hpp.


The documentation for this class was generated from the following file: