16#ifndef ALICEO2_ITSMFT_TRACKING_CAPACITYESTIMATOR_H_
17#define ALICEO2_ITSMFT_TRACKING_CAPACITYESTIMATOR_H_
40constexpr const char*
const SlabSiteNames[
SlabSite::NSlabSite]{
"Tracklets",
"CellCandidates",
"Cells",
"Neighbours",
"RoadCandidates",
"Roads",
"TrackSeeds",
"TracksExtended",
"Tracks"};
80 return (
static_cast<KeyType>(site) << 56) |
81 (
static_cast<KeyType>(iteration & 0xFF) << 48) |
82 (
static_cast<KeyType>(variant & 0xFFFF) << 32) |
86 template <
typename Identifier>
89 return makeKey(site, iteration, variant,
static_cast<int>(identifier.value()));
96 .iteration =
static_cast<int>((
key >> 48) & 0xFF),
97 .variant =
static_cast<int>((
key >> 32) & 0xFFFF),
98 .slot =
static_cast<int>(
static_cast<uint32_t>(
key & 0xFFFFFFFF))};
103 return ((high & 0xFF) << 8) | (low & 0xFF);
108 return (variant >> 8) & 0xFF;
113 return variant & 0xFF;
130 void update(
uint64_t key,
double scale,
size_t emitted,
size_t capacityUsed,
bool overflowed,
bool memoryLimited);
131 void update(
uint64_t key,
double scale,
size_t requested,
size_t granted,
size_t emitted,
132 size_t spilled,
bool overflowed,
bool memoryLimited);
140template <typename Emit>
143 const auto toInt = [](
const size_t v) {
return static_cast<int>(std::min(
v,
static_cast<size_t>(std::numeric_limits<int>::max()))); };
144 const int initialCapacity = toInt(estimator.capacity(
key, scale));
145 int capacity = std::max(initialCapacity, toInt(floorCapacity));
147 bool overflowed =
false;
148 bool needsRetry =
false;
150 const int attemptCapacity =
capacity;
151 emitted = emit(attemptCapacity);
152 needsRetry = emitted > attemptCapacity;
153 overflowed |= needsRetry;
155 }
while (needsRetry);
156 estimator.update(
key, scale, emitted, initialCapacity, overflowed,
false);
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
static constexpr int makeVariant(int high, int low) noexcept
void commitTransaction() noexcept
static constexpr int getVariantHigh(int variant) noexcept
static constexpr KeyType makeKey(SlabSite site, int iteration, int variant, int slot) noexcept
void rollbackTransaction() noexcept
static constexpr KeyType makeKey(SlabSite site, int iteration, int variant, Identifier identifier) noexcept
Statistics statistics(uint64_t key) const
size_t capacity(uint64_t key, double scale) const
size_t peakCapacity(uint64_t key) const
CapacityEstimator & operator=(const CapacityEstimator &)=delete
static constexpr int getVariantLow(int variant) noexcept
void update(uint64_t key, double scale, size_t emitted, size_t capacityUsed, bool overflowed, bool memoryLimited)
CapacityEstimator(const CapacityEstimator &)=delete
static constexpr Decoded decodeKey(KeyType key) noexcept
GLfloat GLfloat GLfloat alpha
uint32_t trackClusterIndicesSize noexcept
constexpr const char *const SlabSiteNames[SlabSite::NSlabSite]
float marginOverflowSlack
std::map< std::string, ID > expected