tudocomp
– The TU Dortmund Compression Framework
tdc::uint_impl_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_impl_t< bits >:
tdc::IntegerBaseCombiner<... >

Public Member Functions

constexpr uint_impl_t ()
 
constexpr uint_impl_t (uint_impl_t &&i)
 
constexpr uint_impl_t (const uint_impl_t &i)
 
uint_impl_toperator= (const uint_impl_t &b)
 
constexpr uint_impl_t (unsigned char i)
 
uint_impl_toperator= (unsigned char data)
 
constexpr operator unsigned char () const
 
constexpr uint_impl_t (signed char i)
 
uint_impl_toperator= (signed char data)
 
constexpr operator signed char () const
 
constexpr uint_impl_t (char i)
 
constexpr uint_impl_toperator= (char data)
 
constexpr operator char () const
 
constexpr uint_impl_t (unsigned int i)
 
uint_impl_toperator= (unsigned int data)
 
constexpr operator unsigned int () const
 
constexpr uint_impl_t (unsigned short int i)
 
uint_impl_toperator= (unsigned short int data)
 
constexpr operator unsigned short int () const
 
constexpr uint_impl_t (unsigned long int i)
 
uint_impl_toperator= (unsigned long int data)
 
constexpr operator unsigned long int () const
 
constexpr uint_impl_t (unsigned long long int i)
 
uint_impl_toperator= (unsigned long long int data)
 
constexpr operator unsigned long long int () const
 
constexpr uint_impl_t (int i)
 
uint_impl_toperator= (int data)
 
constexpr operator int () const
 
constexpr uint_impl_t (short int i)
 
uint_impl_toperator= (short int data)
 
constexpr operator short int () const
 
constexpr uint_impl_t (long int i)
 
uint_impl_toperator= (long int data)
 
constexpr operator long int () const
 
constexpr uint_impl_t (long long int i)
 
uint_impl_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_impl_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

◆ uint_impl_t() [1/14]

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

Definition at line 80 of file uint_t.hpp.

◆ uint_impl_t() [2/14]

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

Definition at line 81 of file uint_t.hpp.

◆ uint_impl_t() [3/14]

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

Definition at line 84 of file uint_t.hpp.

◆ uint_impl_t() [4/14]

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

Definition at line 88 of file uint_t.hpp.

◆ uint_impl_t() [5/14]

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

Definition at line 92 of file uint_t.hpp.

◆ uint_impl_t() [6/14]

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

Definition at line 96 of file uint_t.hpp.

◆ uint_impl_t() [7/14]

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

Definition at line 101 of file uint_t.hpp.

◆ uint_impl_t() [8/14]

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

Definition at line 105 of file uint_t.hpp.

◆ uint_impl_t() [9/14]

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

Definition at line 109 of file uint_t.hpp.

◆ uint_impl_t() [10/14]

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

Definition at line 113 of file uint_t.hpp.

◆ uint_impl_t() [11/14]

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

Definition at line 117 of file uint_t.hpp.

◆ uint_impl_t() [12/14]

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

Definition at line 121 of file uint_t.hpp.

◆ uint_impl_t() [13/14]

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

Definition at line 125 of file uint_t.hpp.

◆ uint_impl_t() [14/14]

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

Definition at line 129 of file uint_t.hpp.

Member Function Documentation

◆ operator char()

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

Definition at line 98 of file uint_t.hpp.

◆ operator int()

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

Definition at line 119 of file uint_t.hpp.

◆ operator long int()

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

Definition at line 127 of file uint_t.hpp.

◆ operator long long int()

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

Definition at line 131 of file uint_t.hpp.

◆ operator short int()

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

Definition at line 123 of file uint_t.hpp.

◆ operator signed char()

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

Definition at line 94 of file uint_t.hpp.

◆ operator unsigned char()

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

Definition at line 90 of file uint_t.hpp.

◆ operator unsigned int()

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

Definition at line 103 of file uint_t.hpp.

◆ operator unsigned long int()

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

Definition at line 111 of file uint_t.hpp.

◆ operator unsigned long long int()

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

Definition at line 115 of file uint_t.hpp.

◆ operator unsigned short int()

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

Definition at line 107 of file uint_t.hpp.

◆ operator=() [1/12]

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

Definition at line 85 of file uint_t.hpp.

◆ operator=() [2/12]

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

Definition at line 89 of file uint_t.hpp.

◆ operator=() [3/12]

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

Definition at line 93 of file uint_t.hpp.

◆ operator=() [4/12]

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

Definition at line 97 of file uint_t.hpp.

◆ operator=() [5/12]

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

Definition at line 102 of file uint_t.hpp.

◆ operator=() [6/12]

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

Definition at line 106 of file uint_t.hpp.

◆ operator=() [7/12]

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

Definition at line 110 of file uint_t.hpp.

◆ operator=() [8/12]

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

Definition at line 114 of file uint_t.hpp.

◆ operator=() [9/12]

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

Definition at line 118 of file uint_t.hpp.

◆ operator=() [10/12]

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

Definition at line 122 of file uint_t.hpp.

◆ operator=() [11/12]

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

Definition at line 126 of file uint_t.hpp.

◆ operator=() [12/12]

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

Definition at line 130 of file uint_t.hpp.

Friends And Related Function Documentation

◆ UinttDispatch< uint32_t >

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

Definition at line 76 of file uint_t.hpp.

◆ UinttDispatch< uint64_t >

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

Definition at line 77 of file uint_t.hpp.


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