Project
Loading...
Searching...
No Matches
o2::rans Namespace Reference

Namespaces

namespace  compat
 
namespace  defaults
 
namespace  encoderImpl
 
namespace  histogramview_impl
 
namespace  internal
 
namespace  renormImpl
 
namespace  utils
 

Classes

class  AdaptiveHistogram
 
class  AdaptiveSymbolTable
 
class  BitPtr
 
struct  CoderProperties
 
class  CodingError
 
class  CombinedInputIterator
 
class  CombinedOutputIterator
 
struct  CombinedOutputIteratorFactory
 
struct  DatasetProperties
 
class  Decoder
 
class  DecoderConcept
 
class  DecodingError
 
class  DenseHistogram
 
class  DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)==4 > >
 
class  DenseSymbolTable
 
class  Encoder
 
class  EncodingError
 
class  Exception
 
class  HighRangeDecoderTable
 
class  HistogramError
 
class  HistogramView
 
class  IOError
 
class  LowRangeDecoderTable
 
class  makeDecoder
 
struct  makeDenseHistogram
 
class  Metrics
 
class  OutOfBoundsError
 
class  OverflowError
 
class  PackingError
 
class  ParsingError
 
class  RangeWrapper
 
class  RenormedHistogramConcept
 
class  RuntimeError
 
class  SizeEstimate
 
class  SourceCache
 
class  SourceProxy
 
class  SparseHistogram
 
class  SparseSymbolTable
 
class  ValueError
 

Typedefs

using makeAdaptiveHistogram = internal::makeHistogram< AdaptiveHistogram >
 
using makeSparseHistogram = internal::makeHistogram< SparseHistogram >
 
template<CoderTag coderTag_V = defaults::DefaultTag, size_t nStreams_V = defaults::CoderPreset<coderTag_V>::nStreams, size_t renormingLowerBound_V = defaults::CoderPreset<coderTag_V>::renormingLowerBound>
using makeDenseEncoder = internal::makeEncoder< DenseSymbolTable, coderTag_V, nStreams_V, renormingLowerBound_V >
 
template<CoderTag coderTag_V = defaults::DefaultTag, size_t nStreams_V = defaults::CoderPreset<coderTag_V>::nStreams, size_t renormingLowerBound_V = defaults::CoderPreset<coderTag_V>::renormingLowerBound>
using makeAdaptiveEncoder = internal::makeEncoder< AdaptiveSymbolTable, coderTag_V, nStreams_V, renormingLowerBound_V >
 
template<CoderTag coderTag_V = defaults::DefaultTag, size_t nStreams_V = defaults::CoderPreset<coderTag_V>::nStreams, size_t renormingLowerBound_V = defaults::CoderPreset<coderTag_V>::renormingLowerBound>
using makeSparseEncoder = internal::makeEncoder< SparseSymbolTable, coderTag_V, nStreams_V, renormingLowerBound_V >
 
template<typename source_T >
using denseEncoder_type = decltype(makeDenseEncoder<>::fromRenormed(RenormedDenseHistogram< source_T >{}))
 
template<typename source_T >
using adaptiveEncoder_type = decltype(makeAdaptiveEncoder<>::fromRenormed(RenormedAdaptiveHistogram< source_T >{}))
 
template<typename source_T >
using sparseEncoder_type = decltype(makeSparseEncoder<>::fromRenormed(RenormedSparseHistogram< source_T >{}))
 
template<typename source_T >
using defaultDecoder_type = decltype(makeDecoder<>::fromRenormed(RenormedDenseHistogram< source_T >{}))
 
template<typename source_T >
using RenormedDenseHistogram = RenormedHistogramConcept< internal::VectorContainer< source_T, uint32_t > >
 
template<typename source_T >
using RenormedAdaptiveHistogram = RenormedHistogramConcept< internal::SparseVectorContainer< source_T, uint32_t > >
 
template<typename source_T >
using RenormedSparseHistogram = RenormedHistogramConcept< internal::SetContainer< source_T, uint32_t > >
 
using count_t = uint32_t
 

Enumerations

enum class  CoderTag : uint8_t { Compat , SingleStream , SSE , AVX2 }
 
enum class  RenormingPolicy { Auto , ForceIncompressible }
 

Functions

constexpr std::uint8_t operator""_u8 (unsigned long long int value)
 
constexpr std::int8_t operator""_i8 (unsigned long long int value)
 
constexpr std::uint16_t operator""_u16 (unsigned long long int value)
 
constexpr std::int16_t operator""_i16 (unsigned long long int value)
 
template<typename source_T >
size_t countNUsedAlphabetSymbols (const AdaptiveHistogram< source_T > &histogram)
 
template<typename source_T , typename symbol_T >
std::pair< source_T, source_TgetMinMax (const AdaptiveSymbolTable< source_T, symbol_T > &symbolTable)
 
template<typename source_T , typename symbol_T >
size_t countNUsedAlphabetSymbols (const AdaptiveSymbolTable< source_T, symbol_T > &histogram)
 
std::ostream & operator<< (std::ostream &os, const BitPtr bitPtr)
 
template<typename source_T >
class DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > > :public internal::VectorContainer< source_T, uint32_t >, internal::HistogramConcept< source_T, typename internal::VectorContainer< source_T, uint32_t >::value_type, typename internal::VectorContainer< source_T, uint32_t >::difference_type, DenseHistogram< source_T > >{ using containerBase_type=internal::VectorContainer< source_T, uint32_t >;using HistogramConcept_type=internal::HistogramConcept< source_T, typename internal::VectorContainer< source_T, uint32_t >::value_type, typename internal::VectorContainer< source_T, uint32_t >::difference_type, DenseHistogram< source_T > >;friend containerBase_type;friend HistogramConcept_type;public:using source_type=source_T;using value_type=typename containerBase_type::value_type;using container_type=typename containerBase_type::container_type;using size_type=typename containerBase_type::size_type;using difference_type=typename containerBase_type::difference_type;using reference=typename containerBase_type::reference;using const_reference=typename containerBase_type::const_reference;using pointer=typename containerBase_type::pointer;using const_pointer=typename containerBase_type::const_pointer;using const_iterator=typename containerBase_type::const_iterator;DenseHistogram() :containerBase_type{MaxSize, std::numeric_limits< source_type >::min()} {};template< typename freq_IT > DenseHistogram(freq_IT begin, freq_IT end, difference_type offset) :containerBase_type{MaxSize, std::numeric_limits< source_type >::min()}, HistogramConcept_type{begin, end, offset} {};using HistogramConcept_type::addSamples;template< typename source_IT > inline DenseHistogram &addSamples(source_IT begin, source_IT end, source_type min, source_type max) { return addSamplesImpl(begin, end);};template< typename source_IT > DenseHistogram &addSamples(gsl::span< const source_type > span, source_type min, source_type max) { return addSamplesImpl(span);};using HistogramConcept_type::addFrequencies;protected:template< typename source_IT > DenseHistogram &addSamplesImpl(source_IT begin, source_IT end);DenseHistogram &addSamplesImpl(gsl::span< const source_type > samples);template< typename freq_IT > DenseHistogram &addFrequenciesImpl(freq_IT begin, freq_IT end, difference_type offset);private:inline static constexpr size_t MaxSize=utils::pow2(utils::toBits< source_type >());};template< typename source_T >template< typename source_IT >auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addSamplesImpl(source_IT begin, source_IT end) -> DenseHistogram &{ if constexpr(std::is_pointer_v< source_IT >) { return addSamplesImpl({begin, end});} else { std::for_each(begin, end,[this](const source_type &symbol) {++this->mNSamples;++this->mContainer[symbol];});} return *this;}template< typename source_T >auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addSamplesImpl(gsl::span< const source_type > samples) -> DenseHistogram &{ using namespace internal;using namespace utils;if(samples.empty()) { return *this;} const auto begin=samples.data();const auto end=begin+samples.size();constexpr size_t ElemsPerQWord=sizeof(uint64_t)/sizeof(source_type);constexpr size_t nUnroll=2 *ElemsPerQWord;auto iter=begin;if constexpr(sizeof(source_type)==1) { std::array< ShiftableVector< source_type, value_type >, 3 > histograms{ {{this-> mContainer size ()
 
class DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > > :public internal::VectorContainer< source_T, uint32_t >, internal::HistogramConcept< source_T, typename internal::VectorContainer< source_T, uint32_t >::value_type, typename internal::VectorContainer< source_T, uint32_t >::difference_type, DenseHistogram< source_T > >{ using containerBase_type=internal::VectorContainer< source_T, uint32_t >;using HistogramConcept_type=internal::HistogramConcept< source_T, typename internal::VectorContainer< source_T, uint32_t >::value_type, typename internal::VectorContainer< source_T, uint32_t >::difference_type, DenseHistogram< source_T > >;friend containerBase_type;friend HistogramConcept_type;public:using source_type=source_T;using value_type=typename containerBase_type::value_type;using container_type=typename containerBase_type::container_type;using size_type=typename containerBase_type::size_type;using difference_type=typename containerBase_type::difference_type;using reference=typename containerBase_type::reference;using const_reference=typename containerBase_type::const_reference;using pointer=typename containerBase_type::pointer;using const_pointer=typename containerBase_type::const_pointer;using const_iterator=typename containerBase_type::const_iterator;DenseHistogram() :containerBase_type{MaxSize, std::numeric_limits< source_type >::min()} {};template< typename freq_IT > DenseHistogram(freq_IT begin, freq_IT end, difference_type offset) :containerBase_type{MaxSize, std::numeric_limits< source_type >::min()}, HistogramConcept_type{begin, end, offset} {};using HistogramConcept_type::addSamples;template< typename source_IT > inline DenseHistogram &addSamples(source_IT begin, source_IT end, source_type min, source_type max) { return addSamplesImpl(begin, end);};template< typename source_IT > DenseHistogram &addSamples(gsl::span< const source_type > span, source_type min, source_type max) { return addSamplesImpl(span);};using HistogramConcept_type::addFrequencies;protected:template< typename source_IT > DenseHistogram &addSamplesImpl(source_IT begin, source_IT end);DenseHistogram &addSamplesImpl(gsl::span< const source_type > samples);template< typename freq_IT > DenseHistogram &addFrequenciesImpl(freq_IT begin, freq_IT end, difference_type offset);private:inline static constexpr size_t MaxSize=utils::pow2(utils::toBits< source_type >());};template< typename source_T >template< typename source_IT >auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addSamplesImpl(source_IT begin, source_IT end) -> DenseHistogram &{ if constexpr(std::is_pointer_v< source_IT >) { return addSamplesImpl({begin, end});} else { std::for_each(begin, end, [this](const source_type &symbol) {++this->mNSamples;++this->mContainer[symbol];});} return *this;}template< typename source_T >auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addSamplesImpl(gsl::span< const source_type > samples) -> DenseHistogram &{ using namespace internal;using namespace utils;if(samples.empty()) { return *this;} const auto begin=samples.data();const auto end=begin+samples.size();constexpr size_t ElemsPerQWord=sizeof(uint64_t)/sizeof(source_type);constexpr size_t nUnroll=2 *ElemsPerQWord;auto iter=begin;if constexpr(sizeof(source_type)==1) { std::array< ShiftableVector< source_type, value_type >, 3 > histograms{ {{this-> mContainer this mContainer getOffset ()}
 
 if (end - nUnroll > begin)
 
 while (iter !=end)
 
 for (size_t j=0;j< 3;++j)
 
 for (size_t i=0;i< this->size();++i)
 
if constexpr (std::is_unsigned_v< source_T >)
 
if constexpr (std::is_signed_v< source_T >)
 
 if (isInvalidFrequencyRange)
 
 for (freq_IT iter=addedHistogramView.begin();iter !=addedHistogramView.end();++iter)
 
template<typename source_T >
size_t countNUsedAlphabetSymbols (const DenseHistogram< source_T > &histogram)
 
template<typename source_T , typename symbol_T >
std::pair< source_T, source_TgetMinMax (const DenseSymbolTable< source_T, symbol_T > &symbolTable)
 
template<typename source_T , typename symbol_T >
size_t countNUsedAlphabetSymbols (const DenseSymbolTable< source_T, symbol_T > &symbolTable)
 
template<typename Hist_IT >
HistogramView< Hist_IT > trim (const HistogramView< Hist_IT > &buffer)
 
template<typename HistA_IT , typename HistB_IT >
std::ptrdiff_t getLeftOffset (const HistogramView< HistA_IT > &histA, const HistogramView< HistB_IT > &histB) noexcept
 
template<typename HistA_IT , typename HistB_IT >
std::ptrdiff_t getRightOffset (const HistogramView< HistA_IT > &histA, const HistogramView< HistB_IT > &histB)
 
template<typename HistA_IT , typename HistB_IT >
HistogramView< HistA_IT > getIntersection (const HistogramView< HistA_IT > &histA, const HistogramView< HistB_IT > &histB)
 
template<typename HistA_IT , typename HistB_IT >
HistogramView< HistA_IT > getLeftTail (const HistogramView< HistA_IT > &histA, const HistogramView< HistB_IT > &histB)
 
template<typename HistA_IT , typename HistB_IT >
HistogramView< HistA_IT > getRightTail (const HistogramView< HistA_IT > &histA, const HistogramView< HistB_IT > &histB)
 
template<typename container_T >
auto makeHistogramView (container_T &container, std::ptrdiff_t offset) noexcept -> HistogramView< decltype(std::begin(container))>
 
template<typename container_T >
auto makeHistogramView (const container_T &container, std::ptrdiff_t offset) noexcept -> HistogramView< decltype(std::cbegin(container))>
 
template<typename container_T , std::enable_if_t< histogramview_impl::has_getOffset_v< container_T >, bool > = true>
auto makeHistogramView (const container_T &container) noexcept -> HistogramView< decltype(std::cbegin(container))>
 
template<typename container_T , std::enable_if_t< histogramview_impl::has_getOffset_v< container_T >, bool > = true>
auto makeHistogramView (container_T &container) noexcept -> HistogramView< decltype(std::begin(container))>
 
template<typename container_T >
size_t countNUsedAlphabetSymbols (const RenormedHistogramConcept< container_T > &histogram)
 
template<typename source_T >
size_t countNUsedAlphabetSymbols (const SparseHistogram< source_T > &histogram)
 
template<typename source_T , typename symbol_T >
std::pair< source_T, source_TgetMinMax (const SparseSymbolTable< source_T, symbol_T > &symbolTable)
 
template<typename source_T , typename symbol_T >
size_t countNUsedAlphabetSymbols (const SparseSymbolTable< source_T, symbol_T > &symbolTable)
 
template<CoderTag tag_V = defaults::DefaultTag, size_t lowerBound_V = defaults::CoderPreset<tag_V>::renormingLowerBound>
constexpr size_t addEncoderOverheadEstimateB (size_t sizeB) noexcept
 
template<typename source_T >
double_t computeExpectedCodewordLength (const DenseHistogram< source_T > &histogram, const RenormedDenseHistogram< source_T > &rescaledHistogram)
 
template<typename storageBuffer_T = uint8_t>
constexpr size_t computePackingBufferSize (size_t extent, size_t packingWidthBits) noexcept
 
template<typename input_T , typename output_T >
constexpr BitPtr pack (const input_T *__restrict inputBegin, size_t extent, output_T *__restrict outputBegin, size_t packingWidth, input_T offset=static_cast< input_T >(0))
 
template<typename input_IT , typename output_T >
constexpr BitPtr pack (input_IT inputBegin, size_t extent, output_T *__restrict outputBegin, size_t packingWidth, typename std::iterator_traits< input_IT >::value_type offset=0)
 
template<typename input_T , typename output_IT >
void unpack (const input_T *__restrict inputBegin, size_t extent, output_IT outputBegin, size_t packingWidth, typename std::iterator_traits< output_IT >::value_type offset=static_cast< typename std::iterator_traits< output_IT >::value_type >(0))
 
template<typename histogram_T >
decltype(auto) renorm (histogram_T histogram, size_t newPrecision, RenormingPolicy renormingPolicy=RenormingPolicy::Auto, size_t lowProbabilityCutoffBits=0)
 
template<typename histogram_T >
decltype(auto) renorm (histogram_T histogram, Metrics< typename histogram_T::source_type > &metrics, RenormingPolicy renormingPolicy=RenormingPolicy::Auto, size_t lowProbabilityCutoffBits=0)
 
template<typename histogram_T >
decltype(auto) renorm (histogram_T histogram, RenormingPolicy renormingPolicy=RenormingPolicy::Auto)
 
template<typename container_T , typename dest_IT >
dest_IT compressRenormedDictionary (const container_T &container, dest_IT dstBufferBegin)
 
template<typename source_T , typename buffer_IT >
RenormedDenseHistogram< source_TreadRenormedDictionary (buffer_IT begin, buffer_IT end, source_T min, source_T max, size_t renormingPrecision)
 
template<typename source_T , typename buffer_IT >
RenormedSparseHistogram< source_TreadRenormedSetDictionary (buffer_IT begin, buffer_IT end, source_T min, source_T max, size_t renormingPrecision)
 

Variables

class DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > > :public internal::VectorContainer< source_T, uint32_t >, internal::HistogramConcept< source_T, typename internal::VectorContainer< source_T, uint32_t >::value_type, typename internal::VectorContainer< source_T, uint32_t >::difference_type, DenseHistogram< source_T > >{ using containerBase_type=internal::VectorContainer< source_T, uint32_t >;using HistogramConcept_type=internal::HistogramConcept< source_T, typename internal::VectorContainer< source_T, uint32_t >::value_type, typename internal::VectorContainer< source_T, uint32_t >::difference_type, DenseHistogram< source_T > >;friend containerBase_type;friend HistogramConcept_type;public:using source_type=source_T;using value_type=typename containerBase_type::value_type;using container_type=typename containerBase_type::container_type;using size_type=typename containerBase_type::size_type;using difference_type=typename containerBase_type::difference_type;using reference=typename containerBase_type::reference;using const_reference=typename containerBase_type::const_reference;using pointer=typename containerBase_type::pointer;using const_pointer=typename containerBase_type::const_pointer;using const_iterator=typename containerBase_type::const_iterator;DenseHistogram() :containerBase_type{MaxSize, std::numeric_limits< source_type >::min()} {};template< typename freq_IT > DenseHistogram(freq_IT begin, freq_IT end, difference_type offset) :containerBase_type{MaxSize, std::numeric_limits< source_type >::min()}, HistogramConcept_type{begin, end, offset} {};using HistogramConcept_type::addSamples;template< typename source_IT > inline DenseHistogram &addSamples(source_IT begin, source_IT end, source_type min, source_type max) { return addSamplesImpl(begin, end);};template< typename source_IT > DenseHistogram &addSamples(gsl::span< const source_type > span, source_type min, source_type max) { return addSamplesImpl(span);};using HistogramConcept_type::addFrequencies;protected:template< typename source_IT > DenseHistogram &addSamplesImpl(source_IT begin, source_IT end);DenseHistogram &addSamplesImpl(gsl::span< const source_type > samples);template< typename freq_IT > DenseHistogram &addFrequenciesImpl(freq_IT begin, freq_IT end, difference_type offset);private:inline static constexpr size_t MaxSize=utils::pow2(utils::toBits< source_type >());};template< typename source_T >template< typename source_IT >auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addSamplesImpl(source_IT begin, source_IT end) -> DenseHistogram &{ if constexpr(std::is_pointer_v< source_IT >) { return addSamplesImpl({begin, end});} else { std::for_each(begin, end, [this](const source_type &symbol) {++this->mNSamples;++this->mContainer[symbol];});} return *this;}template< typename source_T >auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addSamplesImpl(gsl::span< const source_type > samples) -> DenseHistogram &{ using namespace internal;using namespace utils;if(samples.empty()) { return *this;} const auto begin=samples.data();const auto end=begin+samples.size();constexpr size_t ElemsPerQWord=sizeof(uint64_t)/sizeof(source_type);constexpr size_t nUnroll=2 *ElemsPerQWord;auto iter=begin;if constexpr(sizeof(source_type)==1) { std::array< ShiftableVector< source_type, value_type >, 3 > histograms{ {{this-> mContainer this mContainer auto addQWord
 
 else
 
return * this
 
template<typename freq_IT >
auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addFrequenciesImpl(freq_IT begin, freq_IT end, difference_type offset) -> DenseHistogram &HistogramView addedHistogramView {begin, end, offset}
 
const auto thisHistogramView = makeHistogramView(this->mContainer)
 
const bool isInvalidFrequencyRange = utils::toBytes(utils::getRangeBits(addedHistogramView.getMin(), addedHistogramView.getMax())) > sizeof(source_T)
 
auto idx = static_cast<source_type>(addedHistogramView.getOffset())
 

Typedef Documentation

◆ adaptiveEncoder_type

template<typename source_T >
using o2::rans::adaptiveEncoder_type = typedef decltype(makeAdaptiveEncoder<>::fromRenormed(RenormedAdaptiveHistogram<source_T>{}))

Definition at line 232 of file factory.h.

◆ count_t

using o2::rans::count_t = typedef uint32_t

Definition at line 34 of file defaults.h.

◆ defaultDecoder_type

template<typename source_T >
using o2::rans::defaultDecoder_type = typedef decltype(makeDecoder<>::fromRenormed(RenormedDenseHistogram<source_T>{}))

Definition at line 238 of file factory.h.

◆ denseEncoder_type

template<typename source_T >
using o2::rans::denseEncoder_type = typedef decltype(makeDenseEncoder<>::fromRenormed(RenormedDenseHistogram<source_T>{}))

Definition at line 229 of file factory.h.

◆ makeAdaptiveEncoder

template<CoderTag coderTag_V = defaults::DefaultTag, size_t nStreams_V = defaults::CoderPreset<coderTag_V>::nStreams, size_t renormingLowerBound_V = defaults::CoderPreset<coderTag_V>::renormingLowerBound>
using o2::rans::makeAdaptiveEncoder = typedef internal::makeEncoder<AdaptiveSymbolTable, coderTag_V, nStreams_V, renormingLowerBound_V>

Definition at line 180 of file factory.h.

◆ makeAdaptiveHistogram

◆ makeDenseEncoder

template<CoderTag coderTag_V = defaults::DefaultTag, size_t nStreams_V = defaults::CoderPreset<coderTag_V>::nStreams, size_t renormingLowerBound_V = defaults::CoderPreset<coderTag_V>::renormingLowerBound>
using o2::rans::makeDenseEncoder = typedef internal::makeEncoder<DenseSymbolTable, coderTag_V, nStreams_V, renormingLowerBound_V>

Definition at line 175 of file factory.h.

◆ makeSparseEncoder

template<CoderTag coderTag_V = defaults::DefaultTag, size_t nStreams_V = defaults::CoderPreset<coderTag_V>::nStreams, size_t renormingLowerBound_V = defaults::CoderPreset<coderTag_V>::renormingLowerBound>
using o2::rans::makeSparseEncoder = typedef internal::makeEncoder<SparseSymbolTable, coderTag_V, nStreams_V, renormingLowerBound_V>

Definition at line 185 of file factory.h.

◆ makeSparseHistogram

◆ RenormedAdaptiveHistogram

Definition at line 81 of file containertraits.h.

◆ RenormedDenseHistogram

Definition at line 78 of file containertraits.h.

◆ RenormedSparseHistogram

Definition at line 84 of file containertraits.h.

◆ sparseEncoder_type

template<typename source_T >
using o2::rans::sparseEncoder_type = typedef decltype(makeSparseEncoder<>::fromRenormed(RenormedSparseHistogram<source_T>{}))

Definition at line 235 of file factory.h.

Enumeration Type Documentation

◆ CoderTag

enum class o2::rans::CoderTag : uint8_t
strong
Enumerator
Compat 
SingleStream 
SSE 
AVX2 

Definition at line 29 of file defaults.h.

◆ RenormingPolicy

enum class o2::rans::RenormingPolicy
strong
Enumerator
Auto 
ForceIncompressible 

Definition at line 32 of file renorm.h.

Function Documentation

◆ addEncoderOverheadEstimateB()

template<CoderTag tag_V = defaults::DefaultTag, size_t lowerBound_V = defaults::CoderPreset<tag_V>::renormingLowerBound>
constexpr size_t o2::rans::addEncoderOverheadEstimateB ( size_t  sizeB)
inlineconstexprnoexcept

Definition at line 34 of file SizeEstimate.h.

◆ compressRenormedDictionary()

template<typename container_T , typename dest_IT >
dest_IT o2::rans::compressRenormedDictionary ( const container_T &  container,
dest_IT  dstBufferBegin 
)

Definition at line 142 of file serialize.h.

◆ computeExpectedCodewordLength()

template<typename source_T >
double_t o2::rans::computeExpectedCodewordLength ( const DenseHistogram< source_T > &  histogram,
const RenormedDenseHistogram< source_T > &  rescaledHistogram 
)

Definition at line 33 of file utils.h.

◆ computePackingBufferSize()

template<typename storageBuffer_T = uint8_t>
constexpr size_t o2::rans::computePackingBufferSize ( size_t  extent,
size_t  packingWidthBits 
)
constexprnoexcept

Definition at line 34 of file pack.h.

◆ constexpr() [1/2]

if o2::rans::constexpr ( std::is_signed_v< source_T )
constexpr

Definition at line 589 of file DenseHistogram.h.

◆ constexpr() [2/2]

if o2::rans::constexpr ( std::is_unsigned_v< source_T )
constexpr

Definition at line 586 of file DenseHistogram.h.

◆ countNUsedAlphabetSymbols() [1/7]

template<typename source_T >
size_t o2::rans::countNUsedAlphabetSymbols ( const AdaptiveHistogram< source_T > &  histogram)

Definition at line 123 of file AdaptiveHistogram.h.

◆ countNUsedAlphabetSymbols() [2/7]

template<typename source_T , typename symbol_T >
size_t o2::rans::countNUsedAlphabetSymbols ( const AdaptiveSymbolTable< source_T, symbol_T > &  histogram)

Definition at line 127 of file AdaptiveSymbolTable.h.

◆ countNUsedAlphabetSymbols() [3/7]

template<typename source_T >
size_t o2::rans::countNUsedAlphabetSymbols ( const DenseHistogram< source_T > &  histogram)

Definition at line 621 of file DenseHistogram.h.

◆ countNUsedAlphabetSymbols() [4/7]

template<typename source_T , typename symbol_T >
size_t o2::rans::countNUsedAlphabetSymbols ( const DenseSymbolTable< source_T, symbol_T > &  symbolTable)

Definition at line 151 of file DenseSymbolTable.h.

◆ countNUsedAlphabetSymbols() [5/7]

template<typename container_T >
size_t o2::rans::countNUsedAlphabetSymbols ( const RenormedHistogramConcept< container_T > &  histogram)

Definition at line 88 of file RenormedHistogram.h.

◆ countNUsedAlphabetSymbols() [6/7]

template<typename source_T >
size_t o2::rans::countNUsedAlphabetSymbols ( const SparseHistogram< source_T > &  histogram)

Definition at line 138 of file SparseHistogram.h.

◆ countNUsedAlphabetSymbols() [7/7]

template<typename source_T , typename symbol_T >
size_t o2::rans::countNUsedAlphabetSymbols ( const SparseSymbolTable< source_T, symbol_T > &  symbolTable)

Definition at line 125 of file SparseSymbolTable.h.

◆ for() [1/3]

o2::rans::for ( freq_IT  iter = addedHistogramView.begin(); iter != addedHistogramView.end(); ++iter)

Definition at line 612 of file DenseHistogram.h.

◆ for() [2/3]

o2::rans::for ( size_t  i = 0; i < this->size(); ++i)

Definition at line 568 of file DenseHistogram.h.

◆ for() [3/3]

o2::rans::for ( )

Definition at line 532 of file DenseHistogram.h.

◆ getIntersection()

template<typename HistA_IT , typename HistB_IT >
HistogramView< HistA_IT > o2::rans::getIntersection ( const HistogramView< HistA_IT > &  histA,
const HistogramView< HistB_IT > &  histB 
)

Definition at line 135 of file HistogramView.h.

◆ getLeftOffset()

template<typename HistA_IT , typename HistB_IT >
std::ptrdiff_t o2::rans::getLeftOffset ( const HistogramView< HistA_IT > &  histA,
const HistogramView< HistB_IT > &  histB 
)
inlinenoexcept

Definition at line 123 of file HistogramView.h.

◆ getLeftTail()

template<typename HistA_IT , typename HistB_IT >
HistogramView< HistA_IT > o2::rans::getLeftTail ( const HistogramView< HistA_IT > &  histA,
const HistogramView< HistB_IT > &  histB 
)

Definition at line 157 of file HistogramView.h.

◆ getMinMax() [1/3]

template<typename source_T , typename symbol_T >
std::pair< source_T, source_T > o2::rans::getMinMax ( const AdaptiveSymbolTable< source_T, symbol_T > &  symbolTable)

Definition at line 121 of file AdaptiveSymbolTable.h.

◆ getMinMax() [2/3]

template<typename source_T , typename symbol_T >
std::pair< source_T, source_T > o2::rans::getMinMax ( const DenseSymbolTable< source_T, symbol_T > &  symbolTable)

Definition at line 145 of file DenseSymbolTable.h.

◆ getMinMax() [3/3]

template<typename source_T , typename symbol_T >
std::pair< source_T, source_T > o2::rans::getMinMax ( const SparseSymbolTable< source_T, symbol_T > &  symbolTable)

Definition at line 119 of file SparseSymbolTable.h.

◆ getOffset()

class DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > > :public internal::VectorContainer< source_T, uint32_t >, internal::HistogramConcept< source_T, typename internal::VectorContainer< source_T, uint32_t >::value_type, typename internal::VectorContainer< source_T, uint32_t >::difference_type, DenseHistogram< source_T > >{ using containerBase_type=internal::VectorContainer< source_T, uint32_t >;using HistogramConcept_type=internal::HistogramConcept< source_T, typename internal::VectorContainer< source_T, uint32_t >::value_type, typename internal::VectorContainer< source_T, uint32_t >::difference_type, DenseHistogram< source_T > >;friend containerBase_type;friend HistogramConcept_type;public:using source_type=source_T;using value_type=typename containerBase_type::value_type;using container_type=typename containerBase_type::container_type;using size_type=typename containerBase_type::size_type;using difference_type=typename containerBase_type::difference_type;using reference=typename containerBase_type::reference;using const_reference=typename containerBase_type::const_reference;using pointer=typename containerBase_type::pointer;using const_pointer=typename containerBase_type::const_pointer;using const_iterator=typename containerBase_type::const_iterator;DenseHistogram() :containerBase_type{MaxSize, std::numeric_limits< source_type >::min()} {};template< typename freq_IT > DenseHistogram(freq_IT begin, freq_IT end, difference_type offset) :containerBase_type{MaxSize, std::numeric_limits< source_type >::min()}, HistogramConcept_type{begin, end, offset} {};using HistogramConcept_type::addSamples;template< typename source_IT > inline DenseHistogram &addSamples(source_IT begin, source_IT end, source_type min, source_type max) { return addSamplesImpl(begin, end);};template< typename source_IT > DenseHistogram &addSamples(gsl::span< const source_type > span, source_type min, source_type max) { return addSamplesImpl(span);};using HistogramConcept_type::addFrequencies;protected:template< typename source_IT > DenseHistogram &addSamplesImpl(source_IT begin, source_IT end);DenseHistogram &addSamplesImpl(gsl::span< const source_type > samples);template< typename freq_IT > DenseHistogram &addFrequenciesImpl(freq_IT begin, freq_IT end, difference_type offset);private:inline static constexpr size_t MaxSize=utils::pow2(utils::toBits< source_type >());};template< typename source_T >template< typename source_IT >auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addSamplesImpl(source_IT begin, source_IT end) -> DenseHistogram &{ if constexpr(std::is_pointer_v< source_IT >) { return addSamplesImpl({begin, end});} else { std::for_each(begin, end,[this](const source_type &symbol) {++this->mNSamples;++this->mContainer[symbol];});} return *this;}template< typename source_T >auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addSamplesImpl(gsl::span< const source_type > samples) -> DenseHistogram &{ using namespace internal;using namespace utils;if(samples.empty()) { return *this;} const auto begin=samples.data();const auto end=begin+samples.size();constexpr size_t ElemsPerQWord=sizeof(uint64_t)/sizeof(source_type);constexpr size_t nUnroll=2 *ElemsPerQWord;auto iter=begin;if constexpr(sizeof(source_type)==1) { std::array< ShiftableVector< source_type, value_type >, 3 > histograms{ {{this-> mContainer this mContainer o2::rans::getOffset ( )

◆ getRightOffset()

template<typename HistA_IT , typename HistB_IT >
std::ptrdiff_t o2::rans::getRightOffset ( const HistogramView< HistA_IT > &  histA,
const HistogramView< HistB_IT > &  histB 
)
inline

Definition at line 129 of file HistogramView.h.

◆ getRightTail()

template<typename HistA_IT , typename HistB_IT >
HistogramView< HistA_IT > o2::rans::getRightTail ( const HistogramView< HistA_IT > &  histA,
const HistogramView< HistB_IT > &  histB 
)

Definition at line 177 of file HistogramView.h.

◆ if() [1/2]

o2::rans::if ( end nUnroll,
begin   
)

Definition at line 515 of file DenseHistogram.h.

◆ if() [2/2]

o2::rans::if ( isInvalidFrequencyRange  )

Definition at line 602 of file DenseHistogram.h.

◆ makeHistogramView() [1/4]

template<typename container_T , std::enable_if_t< histogramview_impl::has_getOffset_v< container_T >, bool > = true>
auto o2::rans::makeHistogramView ( const container_T &  container) -> HistogramView<decltype(std::cbegin(container))>
inlinenoexcept

Definition at line 227 of file HistogramView.h.

◆ makeHistogramView() [2/4]

template<typename container_T >
auto o2::rans::makeHistogramView ( const container_T &  container,
std::ptrdiff_t  offset 
) -> HistogramView<decltype(std::cbegin(container))>
inlinenoexcept

Definition at line 205 of file HistogramView.h.

◆ makeHistogramView() [3/4]

template<typename container_T , std::enable_if_t< histogramview_impl::has_getOffset_v< container_T >, bool > = true>
auto o2::rans::makeHistogramView ( container_T &  container) -> HistogramView<decltype(std::begin(container))>
inlinenoexcept

Definition at line 233 of file HistogramView.h.

◆ makeHistogramView() [4/4]

template<typename container_T >
auto o2::rans::makeHistogramView ( container_T &  container,
std::ptrdiff_t  offset 
) -> HistogramView<decltype(std::begin(container))>
inlinenoexcept

Definition at line 199 of file HistogramView.h.

◆ operator""_i16()

constexpr std::int16_t o2::rans::operator""_i16 ( unsigned long long int  value)
inlineconstexpr

Definition at line 159 of file utils.h.

◆ operator""_i8()

constexpr std::int8_t o2::rans::operator""_i8 ( unsigned long long int  value)
inlineconstexpr

Definition at line 156 of file utils.h.

◆ operator""_u16()

constexpr std::uint16_t o2::rans::operator""_u16 ( unsigned long long int  value)
inlineconstexpr

Definition at line 158 of file utils.h.

◆ operator""_u8()

constexpr std::uint8_t o2::rans::operator""_u8 ( unsigned long long int  value)
inlineconstexpr

Definition at line 155 of file utils.h.

◆ operator<<()

std::ostream & o2::rans::operator<< ( std::ostream &  os,
const BitPtr  bitPtr 
)
inline

Definition at line 160 of file BitPtr.h.

◆ pack() [1/2]

template<typename input_T , typename output_T >
constexpr BitPtr o2::rans::pack ( const input_T *__restrict  inputBegin,
size_t  extent,
output_T *__restrict  outputBegin,
size_t  packingWidth,
input_T  offset = static_cast<input_T>(0) 
)
inlineconstexpr

Definition at line 196 of file pack.h.

◆ pack() [2/2]

template<typename input_IT , typename output_T >
constexpr BitPtr o2::rans::pack ( input_IT  inputBegin,
size_t  extent,
output_T *__restrict  outputBegin,
size_t  packingWidth,
typename std::iterator_traits< input_IT >::value_type  offset = 0 
)
inlineconstexpr

Definition at line 321 of file pack.h.

◆ readRenormedDictionary()

template<typename source_T , typename buffer_IT >
RenormedDenseHistogram< source_T > o2::rans::readRenormedDictionary ( buffer_IT  begin,
buffer_IT  end,
source_T  min,
source_T  max,
size_t  renormingPrecision 
)

Definition at line 188 of file serialize.h.

◆ readRenormedSetDictionary()

template<typename source_T , typename buffer_IT >
RenormedSparseHistogram< source_T > o2::rans::readRenormedSetDictionary ( buffer_IT  begin,
buffer_IT  end,
source_T  min,
source_T  max,
size_t  renormingPrecision 
)

Definition at line 215 of file serialize.h.

◆ renorm() [1/3]

template<typename histogram_T >
decltype(auto) o2::rans::renorm ( histogram_T  histogram,
Metrics< typename histogram_T::source_type > &  metrics,
RenormingPolicy  renormingPolicy = RenormingPolicy::Auto,
size_t  lowProbabilityCutoffBits = 0 
)

Definition at line 214 of file renorm.h.

◆ renorm() [2/3]

template<typename histogram_T >
decltype(auto) o2::rans::renorm ( histogram_T  histogram,
RenormingPolicy  renormingPolicy = RenormingPolicy::Auto 
)

Definition at line 220 of file renorm.h.

◆ renorm() [3/3]

template<typename histogram_T >
decltype(auto) o2::rans::renorm ( histogram_T  histogram,
size_t  newPrecision,
RenormingPolicy  renormingPolicy = RenormingPolicy::Auto,
size_t  lowProbabilityCutoffBits = 0 
)

Definition at line 203 of file renorm.h.

◆ size()

template<typename source_T >
class DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > > :public internal::VectorContainer< source_T, uint32_t >, internal::HistogramConcept< source_T, typename internal::VectorContainer< source_T, uint32_t >::value_type, typename internal::VectorContainer< source_T, uint32_t >::difference_type, DenseHistogram< source_T > >{ using containerBase_type=internal::VectorContainer< source_T, uint32_t >;using HistogramConcept_type=internal::HistogramConcept< source_T, typename internal::VectorContainer< source_T, uint32_t >::value_type, typename internal::VectorContainer< source_T, uint32_t >::difference_type, DenseHistogram< source_T > >;friend containerBase_type;friend HistogramConcept_type;public:using source_type=source_T;using value_type=typename containerBase_type::value_type;using container_type=typename containerBase_type::container_type;using size_type=typename containerBase_type::size_type;using difference_type=typename containerBase_type::difference_type;using reference=typename containerBase_type::reference;using const_reference=typename containerBase_type::const_reference;using pointer=typename containerBase_type::pointer;using const_pointer=typename containerBase_type::const_pointer;using const_iterator=typename containerBase_type::const_iterator;DenseHistogram() :containerBase_type{MaxSize, std::numeric_limits< source_type >::min()} {};template< typename freq_IT > DenseHistogram(freq_IT begin, freq_IT end, difference_type offset) :containerBase_type{MaxSize, std::numeric_limits< source_type >::min()}, HistogramConcept_type{begin, end, offset} {};using HistogramConcept_type::addSamples;template< typename source_IT > inline DenseHistogram &addSamples(source_IT begin, source_IT end, source_type min, source_type max) { return addSamplesImpl(begin, end);};template< typename source_IT > DenseHistogram &addSamples(gsl::span< const source_type > span, source_type min, source_type max) { return addSamplesImpl(span);};using HistogramConcept_type::addFrequencies;protected:template< typename source_IT > DenseHistogram &addSamplesImpl(source_IT begin, source_IT end);DenseHistogram &addSamplesImpl(gsl::span< const source_type > samples);template< typename freq_IT > DenseHistogram &addFrequenciesImpl(freq_IT begin, freq_IT end, difference_type offset);private:inline static constexpr size_t MaxSize=utils::pow2(utils::toBits< source_type >());};template< typename source_T >template< typename source_IT >auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addSamplesImpl(source_IT begin, source_IT end) -> DenseHistogram &{ if constexpr(std::is_pointer_v< source_IT >) { return addSamplesImpl({begin, end});} else { std::for_each(begin, end, [this](const source_type &symbol) {++this->mNSamples;++this->mContainer[symbol];});} return *this;}template< typename source_T >auto DenseHistogram< source_T, std::enable_if_t< sizeof(source_T)<=2 > >::addSamplesImpl(gsl::span< const source_type > samples) -> DenseHistogram &{ using namespace internal;using namespace utils;if(samples.empty()) { return *this;} const auto begin=samples.data();const auto end=begin+samples.size();constexpr size_t ElemsPerQWord=sizeof(uint64_t)/sizeof(source_type);constexpr size_t nUnroll=2 *ElemsPerQWord;auto iter=begin;if constexpr(sizeof(source_type)==1) { std::array< ShiftableVector< source_type, value_type >, 3 > histograms{ {{this-> mContainer o2::rans::size ( )

◆ trim()

template<typename Hist_IT >
HistogramView< Hist_IT > o2::rans::trim ( const HistogramView< Hist_IT > &  buffer)

Definition at line 103 of file HistogramView.h.

◆ unpack()

template<typename input_T , typename output_IT >
void o2::rans::unpack ( const input_T *__restrict  inputBegin,
size_t  extent,
output_IT  outputBegin,
size_t  packingWidth,
typename std::iterator_traits< output_IT >::value_type  offset = static_cast<typename std::iterator_traits<output_IT>::value_type>(0) 
)
inline

Definition at line 346 of file pack.h.

◆ while()

o2::rans::while ( iter !  = end)

Definition at line 524 of file DenseHistogram.h.

Variable Documentation

◆ addedHistogramView

template<typename freq_IT >
o2::rans::addedHistogramView {begin, end, offset}

Definition at line 583 of file DenseHistogram.h.

◆ addQWord

auto o2::rans::addQWord
Initial value:
= [&, this](uint64_t in64) {
uint64_t i = in64;
++histograms[0][static_cast<source_type>(i)];
++histograms[1][static_cast<source_type>(static_cast<uint16_t>(i) >> 8)];
i >>= 16;
++histograms[2][static_cast<source_type>(i)];
++this->mContainer[static_cast<source_type>(static_cast<uint16_t>(i) >> 8)];
i = in64 >>= 32;
++histograms[0][static_cast<source_type>(i)];
++histograms[1][static_cast<source_type>(static_cast<uint16_t>(i) >> 8)];
i >>= 16;
++histograms[2][static_cast<source_type>(i)];
++this->mContainer[static_cast<source_type>(static_cast<uint16_t>(i) >> 8)];
}
int32_t i
uint32_t source_type

Definition at line 500 of file DenseHistogram.h.

◆ else

o2::rans::else
Initial value:
{
container_type histogram{this->mContainer.size(), this->mContainer.getOffset()}

Definition at line 540 of file DenseHistogram.h.

◆ idx

auto o2::rans::idx = static_cast<source_type>(addedHistogramView.getOffset())

Definition at line 610 of file DenseHistogram.h.

◆ isInvalidFrequencyRange

const bool o2::rans::isInvalidFrequencyRange = utils::toBytes(utils::getRangeBits(addedHistogramView.getMin(), addedHistogramView.getMax())) > sizeof(source_T)

Definition at line 600 of file DenseHistogram.h.

◆ this

return * o2::rans::this

Definition at line 573 of file DenseHistogram.h.

◆ thisHistogramView

const auto o2::rans::thisHistogramView = makeHistogramView(this->mContainer)

Definition at line 599 of file DenseHistogram.h.