![]() |
Project
|
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_T > | getMinMax (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_T > | getMinMax (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_T > | getMinMax (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_T > | readRenormedDictionary (buffer_IT begin, buffer_IT end, source_T min, source_T max, size_t renormingPrecision) |
template<typename source_T , typename buffer_IT > | |
RenormedSparseHistogram< source_T > | readRenormedSetDictionary (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()) |
using o2::rans::adaptiveEncoder_type = typedef decltype(makeAdaptiveEncoder<>::fromRenormed(RenormedAdaptiveHistogram<source_T>{})) |
using o2::rans::count_t = typedef uint32_t |
Definition at line 34 of file defaults.h.
using o2::rans::defaultDecoder_type = typedef decltype(makeDecoder<>::fromRenormed(RenormedDenseHistogram<source_T>{})) |
using o2::rans::denseEncoder_type = typedef decltype(makeDenseEncoder<>::fromRenormed(RenormedDenseHistogram<source_T>{})) |
using o2::rans::makeAdaptiveEncoder = typedef internal::makeEncoder<AdaptiveSymbolTable, coderTag_V, nStreams_V, renormingLowerBound_V> |
using o2::rans::makeAdaptiveHistogram = typedef internal::makeHistogram<AdaptiveHistogram> |
using o2::rans::makeDenseEncoder = typedef internal::makeEncoder<DenseSymbolTable, coderTag_V, nStreams_V, renormingLowerBound_V> |
using o2::rans::makeSparseEncoder = typedef internal::makeEncoder<SparseSymbolTable, coderTag_V, nStreams_V, renormingLowerBound_V> |
using o2::rans::makeSparseHistogram = typedef internal::makeHistogram<SparseHistogram> |
using o2::rans::RenormedAdaptiveHistogram = typedef RenormedHistogramConcept<internal::SparseVectorContainer<source_T, uint32_t> > |
Definition at line 81 of file containertraits.h.
using o2::rans::RenormedDenseHistogram = typedef RenormedHistogramConcept<internal::VectorContainer<source_T, uint32_t> > |
Definition at line 78 of file containertraits.h.
using o2::rans::RenormedSparseHistogram = typedef RenormedHistogramConcept<internal::SetContainer<source_T, uint32_t> > |
Definition at line 84 of file containertraits.h.
using o2::rans::sparseEncoder_type = typedef decltype(makeSparseEncoder<>::fromRenormed(RenormedSparseHistogram<source_T>{})) |
|
strong |
Enumerator | |
---|---|
Compat | |
SingleStream | |
SSE | |
AVX2 |
Definition at line 29 of file defaults.h.
|
strong |
|
inlineconstexprnoexcept |
Definition at line 34 of file SizeEstimate.h.
dest_IT o2::rans::compressRenormedDictionary | ( | const container_T & | container, |
dest_IT | dstBufferBegin | ||
) |
Definition at line 142 of file serialize.h.
double_t o2::rans::computeExpectedCodewordLength | ( | const DenseHistogram< source_T > & | histogram, |
const RenormedDenseHistogram< source_T > & | rescaledHistogram | ||
) |
|
constexprnoexcept |
Definition at line 589 of file DenseHistogram.h.
Definition at line 586 of file DenseHistogram.h.
size_t o2::rans::countNUsedAlphabetSymbols | ( | const AdaptiveHistogram< source_T > & | histogram | ) |
Definition at line 123 of file AdaptiveHistogram.h.
size_t o2::rans::countNUsedAlphabetSymbols | ( | const AdaptiveSymbolTable< source_T, symbol_T > & | histogram | ) |
Definition at line 127 of file AdaptiveSymbolTable.h.
size_t o2::rans::countNUsedAlphabetSymbols | ( | const DenseHistogram< source_T > & | histogram | ) |
Definition at line 621 of file DenseHistogram.h.
size_t o2::rans::countNUsedAlphabetSymbols | ( | const DenseSymbolTable< source_T, symbol_T > & | symbolTable | ) |
Definition at line 151 of file DenseSymbolTable.h.
size_t o2::rans::countNUsedAlphabetSymbols | ( | const RenormedHistogramConcept< container_T > & | histogram | ) |
Definition at line 88 of file RenormedHistogram.h.
size_t o2::rans::countNUsedAlphabetSymbols | ( | const SparseHistogram< source_T > & | histogram | ) |
Definition at line 138 of file SparseHistogram.h.
size_t o2::rans::countNUsedAlphabetSymbols | ( | const SparseSymbolTable< source_T, symbol_T > & | symbolTable | ) |
Definition at line 125 of file SparseSymbolTable.h.
o2::rans::for | ( | freq_IT | iter = addedHistogramView.begin(); iter != addedHistogramView.end(); ++iter | ) |
Definition at line 612 of file DenseHistogram.h.
Definition at line 568 of file DenseHistogram.h.
o2::rans::for | ( | ) |
Definition at line 532 of file DenseHistogram.h.
HistogramView< HistA_IT > o2::rans::getIntersection | ( | const HistogramView< HistA_IT > & | histA, |
const HistogramView< HistB_IT > & | histB | ||
) |
Definition at line 135 of file HistogramView.h.
|
inlinenoexcept |
Definition at line 123 of file HistogramView.h.
HistogramView< HistA_IT > o2::rans::getLeftTail | ( | const HistogramView< HistA_IT > & | histA, |
const HistogramView< HistB_IT > & | histB | ||
) |
Definition at line 157 of file HistogramView.h.
std::pair< source_T, source_T > o2::rans::getMinMax | ( | const AdaptiveSymbolTable< source_T, symbol_T > & | symbolTable | ) |
Definition at line 121 of file AdaptiveSymbolTable.h.
std::pair< source_T, source_T > o2::rans::getMinMax | ( | const DenseSymbolTable< source_T, symbol_T > & | symbolTable | ) |
Definition at line 145 of file DenseSymbolTable.h.
std::pair< source_T, source_T > o2::rans::getMinMax | ( | const SparseSymbolTable< source_T, symbol_T > & | symbolTable | ) |
Definition at line 119 of file SparseSymbolTable.h.
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 | ( | ) |
|
inline |
Definition at line 129 of file HistogramView.h.
HistogramView< HistA_IT > o2::rans::getRightTail | ( | const HistogramView< HistA_IT > & | histA, |
const HistogramView< HistB_IT > & | histB | ||
) |
Definition at line 177 of file HistogramView.h.
o2::rans::if | ( | end - | nUnroll, |
begin | |||
) |
Definition at line 515 of file DenseHistogram.h.
o2::rans::if | ( | isInvalidFrequencyRange | ) |
Definition at line 602 of file DenseHistogram.h.
|
inlinenoexcept |
Definition at line 227 of file HistogramView.h.
|
inlinenoexcept |
Definition at line 205 of file HistogramView.h.
|
inlinenoexcept |
Definition at line 233 of file HistogramView.h.
|
inlinenoexcept |
Definition at line 199 of file HistogramView.h.
|
inline |
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.
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.
decltype(auto) o2::rans::renorm | ( | histogram_T | histogram, |
Metrics< typename histogram_T::source_type > & | metrics, | ||
RenormingPolicy | renormingPolicy = RenormingPolicy::Auto , |
||
size_t | lowProbabilityCutoffBits = 0 |
||
) |
decltype(auto) o2::rans::renorm | ( | histogram_T | histogram, |
RenormingPolicy | renormingPolicy = RenormingPolicy::Auto |
||
) |
decltype(auto) o2::rans::renorm | ( | histogram_T | histogram, |
size_t | newPrecision, | ||
RenormingPolicy | renormingPolicy = RenormingPolicy::Auto , |
||
size_t | lowProbabilityCutoffBits = 0 |
||
) |
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 | ( | ) |
HistogramView< Hist_IT > o2::rans::trim | ( | const HistogramView< Hist_IT > & | buffer | ) |
Definition at line 103 of file HistogramView.h.
|
inline |
o2::rans::while | ( | iter ! | = end | ) |
Definition at line 524 of file DenseHistogram.h.
Definition at line 583 of file DenseHistogram.h.
auto o2::rans::addQWord |
o2::rans::else |
Definition at line 540 of file DenseHistogram.h.
auto o2::rans::idx = static_cast<source_type>(addedHistogramView.getOffset()) |
Definition at line 610 of file DenseHistogram.h.
const bool o2::rans::isInvalidFrequencyRange = utils::toBytes(utils::getRangeBits(addedHistogramView.getMin(), addedHistogramView.getMax())) > sizeof(source_T) |
Definition at line 600 of file DenseHistogram.h.
return * o2::rans::this |
Definition at line 573 of file DenseHistogram.h.
const auto o2::rans::thisHistogramView = makeHistogramView(this->mContainer) |
Definition at line 599 of file DenseHistogram.h.