17#ifndef RANS_INTERNAL_CONTAINERS_SYMBOL_H_
18#define RANS_INTERNAL_CONTAINERS_SYMBOL_H_
24#include <fairlogger/Logger.h>
41 :
mSymbol{frequency, cumulative} {};
59template <
typename source_T>
82 os << fmt::format(
"Symbol:{{Symbol: {}, Frequency: {}, Cumulative: {}}}",
107 assert(cumulative <=
utils::pow2(symbolTablePrecision));
108 assert(frequency <=
utils::pow2(symbolTablePrecision) - cumulative);
127 mFrequency = frequency;
156 mReciprocalFrequency =
static_cast<state_type>(~0ul);
157 mReciprocalShift = 0;
158 mCumulative = cumulative + (
utils::pow2(symbolTablePrecision)) - 1;
161 const uint32_t shift = std::ceil(std::log2(frequency));
170 x0 += (
x1 % frequency) << 32;
173 mReciprocalFrequency =
t0 + (
t1 << 32);
175 mReciprocalShift = shift - 1;
179 mCumulative = cumulative;
193 os << fmt::format(
"PrecomputedSymbol{{Frequency: {},Cumulative: {}, ReciprocalFrequency {}, FrequencyComplement {}, mReciprocalShift {}}}",
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
common helper classes and functions
constexpr const value_type & getDecoderSymbol() const noexcept
bool operator==(const DecoderSymbol &other) const
source_type mSourceSymbol
constexpr source_type getSourceSymbol() const noexcept
bool operator!=(const DecoderSymbol &other) const
constexpr DecoderSymbol(source_type symbol, typename value_type::value_type frequency, typename value_type::value_type cumulative)
constexpr DecoderSymbol(source_type sourceSymbol, Symbol decoderSymbol)
friend std::ostream & operator<<(std::ostream &os, const DecoderSymbol &symbol)
constexpr DecoderSymbol() noexcept
std::ptrdiff_t difference_type
constexpr const value_type * getDecoderSymbolPtr() const noexcept
constexpr state_type getReciprocalFrequency() const noexcept
bool operator==(const PrecomputedSymbol &other) const
constexpr value_type getCumulative() const noexcept
friend std::ostream & operator<<(std::ostream &os, const PrecomputedSymbol &symbol)
constexpr value_type getFrequencyComplement() const noexcept
std::ptrdiff_t difference_type
constexpr PrecomputedSymbol() noexcept
constexpr value_type getReciprocalShift() const noexcept
bool operator!=(const PrecomputedSymbol &other) const
constexpr value_type getFrequency() const noexcept
constexpr PrecomputedSymbol(value_type frequency, value_type cumulative, size_t symbolTablePrecision)
constexpr const value_type * data() const noexcept
constexpr Symbol() noexcept
constexpr value_type getCumulative() const noexcept
constexpr value_type getFrequency() const noexcept
bool operator!=(const Symbol &other) const
friend std::ostream & operator<<(std::ostream &os, const Symbol &symbol)
std::ptrdiff_t difference_type
bool operator==(const Symbol &other) const
std::array< value_type, 2 > mSymbol
constexpr Symbol(value_type frequency, value_type cumulative, size_t symbolTablePrecision=0)
GLuint GLfloat GLfloat GLfloat x1
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
constexpr size_t pow2(size_t n) noexcept
VectorOfTObjectPtrs other