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

Classes

class  JSONArrayLogger
 
class  RANSTimer
 

Functions

template<typename T >
constexpr size_t toBits () noexcept
 
constexpr size_t toBytes (size_t bits) noexcept
 
constexpr size_t pow2 (size_t n) noexcept
 
constexpr size_t toBits (size_t bytes) noexcept
 
template<typename T >
constexprlog2UInt (T x) noexcept
 
template<typename Freq_IT >
Freq_IT advanceIter (Freq_IT iter, std::ptrdiff_t distance)
 
uint32_t symbolLengthBits (uint32_t x) noexcept
 
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true>
constexpr uint32_t getRangeBits (T min, T max) noexcept
 
size_t sanitizeRenormingBitRange (size_t renormPrecision)
 
template<typename T >
size_t constexpr nBytesTo (size_t nBytes) noexcept
 
constexpr bool isValidRenormingPrecision (size_t renormPrecision)
 
template<typename IT >
void checkBounds (IT iteratorPosition, IT upperBound)
 
template<typename source_T >
std::pair< source_T, source_Tminmax (gsl::span< const source_T > range)
 

Variables

template<typename T , typename IT >
constexpr bool isCompatibleIter_v = std::is_convertible_v<typename std::iterator_traits<IT>::value_type, T>
 
template<typename IT >
constexpr bool isIntegralIter_v = std::is_integral_v<typename std::iterator_traits<IT>::value_type>
 

Function Documentation

◆ advanceIter()

template<typename Freq_IT >
Freq_IT o2::rans::utils::advanceIter ( Freq_IT  iter,
std::ptrdiff_t  distance 
)
inline

Definition at line 191 of file utils.h.

◆ checkBounds()

template<typename IT >
void o2::rans::utils::checkBounds ( IT  iteratorPosition,
IT  upperBound 
)

Definition at line 244 of file utils.h.

◆ getRangeBits()

template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true>
constexpr uint32_t o2::rans::utils::getRangeBits ( min,
max 
)
inlineconstexprnoexcept

Definition at line 200 of file utils.h.

◆ isValidRenormingPrecision()

constexpr bool o2::rans::utils::isValidRenormingPrecision ( size_t  renormPrecision)
inlineconstexpr

Definition at line 236 of file utils.h.

◆ log2UInt()

template<typename T >
constexpr T o2::rans::utils::log2UInt ( x)
inlineconstexprnoexcept

Definition at line 179 of file utils.h.

◆ minmax()

template<typename source_T >
std::pair< source_T, source_T > o2::rans::utils::minmax ( gsl::span< const source_T range)
inline

Definition at line 87 of file DenseHistogram.h.

◆ nBytesTo()

template<typename T >
size_t constexpr o2::rans::utils::nBytesTo ( size_t  nBytes)
inlineconstexprnoexcept

Definition at line 230 of file utils.h.

◆ pow2()

constexpr size_t o2::rans::utils::pow2 ( size_t  n)
inlineconstexprnoexcept

Definition at line 165 of file utils.h.

◆ sanitizeRenormingBitRange()

size_t o2::rans::utils::sanitizeRenormingBitRange ( size_t  renormPrecision)
inline

Definition at line 212 of file utils.h.

◆ symbolLengthBits()

uint32_t o2::rans::utils::symbolLengthBits ( uint32_t  x)
inlinenoexcept

Definition at line 197 of file utils.h.

◆ toBits() [1/2]

template<typename T >
constexpr size_t o2::rans::utils::toBits ( )
inlineconstexprnoexcept

Definition at line 173 of file utils.h.

◆ toBits() [2/2]

constexpr size_t o2::rans::utils::toBits ( size_t  bytes)
inlineconstexprnoexcept

Definition at line 170 of file utils.h.

◆ toBytes()

constexpr size_t o2::rans::utils::toBytes ( size_t  bits)
inlineconstexprnoexcept

Definition at line 163 of file utils.h.

Variable Documentation

◆ isCompatibleIter_v

template<typename T , typename IT >
constexpr bool o2::rans::utils::isCompatibleIter_v = std::is_convertible_v<typename std::iterator_traits<IT>::value_type, T>
inlineconstexpr

Definition at line 313 of file utils.h.

◆ isIntegralIter_v

template<typename IT >
constexpr bool o2::rans::utils::isIntegralIter_v = std::is_integral_v<typename std::iterator_traits<IT>::value_type>
inlineconstexpr

Definition at line 316 of file utils.h.