ATLAS Offline Software
TopoAutomatonSplittingImpl.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 //
4 // Dear emacs, this is -*- c++ -*-
5 //
6 
7 #ifndef CALORECGPU_TOPOAUTOMATONSPLITTING_CUDA_H
8 #define CALORECGPU_TOPOAUTOMATONSPLITTING_CUDA_H
9 
11 #include "CaloRecGPU/DataHolders.h"
12 #include "CaloRecGPU/Helpers.h"
13 #include "ExtraTagDefinitions.h"
14 
15 #include "FPHelpers.h"
16 
18 
19 namespace TASplitting
20 {
21 
23 //Any %?
24  {
25  using CaloRecGPU::Tag_1_1_12_32_18::Tag_1_1_12_32_18;
26 
27  protected:
28 
29  static constexpr uint32_t s_start_counter = 0xFFFU;
30  //12 bits.
31 
33 
35 
36  [[nodiscard]] constexpr static uint32_t energy_to_storage(const uint32_t energy_pattern)
37  {
38  return EnergyFPFormat::template to_total_ordering<uint32_t>(energy_pattern);
39  }
40 
41  [[nodiscard]] constexpr static uint32_t storage_to_energy(const uint32_t storage_pattern)
42  {
43  return EnergyFPFormat::template from_total_ordering<uint32_t>(storage_pattern);
44  }
45 
46  public:
47 
48  [[nodiscard]] constexpr static carrier counter_delta()
49  {
51  }
52 
53  [[nodiscard]] constexpr int32_t index() const
54  {
55  return this->get_18_bits();
56  }
57 
58  [[nodiscard]] constexpr static int32_t index(const TASTag tag)
59  {
60  return tag.index();
61  }
62 
63  [[nodiscard]] constexpr uint32_t energy_bits() const
64  {
65  return this->get_32_bits();
66  }
67 
68  [[nodiscard]] constexpr static uint32_t energy_bits(const TASTag tag)
69  {
70  return tag.energy_bits();
71  }
72 
73  [[nodiscard]] constexpr int32_t counter() const
74  {
75  return this->get_12_bits();
76  }
77 
78  [[nodiscard]] static constexpr int32_t counter(const TASTag tag)
79  {
80  return tag.counter();
81  }
82 
83  [[nodiscard]] static constexpr int32_t max_counter()
84  {
85  return s_start_counter;
86  }
87 
88  [[nodiscard]] constexpr bool is_primary() const
89  {
90  return this->get_first_flag();
91  }
92 
93  [[nodiscard]] constexpr static bool is_primary(const TASTag tag)
94  {
95  return tag.is_primary();
96  }
97 
98  [[nodiscard]] constexpr bool is_secondary() const
99  {
100  return !this->is_primary();
101  }
102 
103  [[nodiscard]] constexpr static bool is_secondary(const TASTag tag)
104  {
105  return tag.is_secondary();
106  }
107 
110  [[nodiscard]] static constexpr carrier make_maximum_tag(const int32_t index, const uint32_t maximum_energy_pattern, const bool is_primary)
111  {
112  return make_generic_tag(index, energy_to_storage(maximum_energy_pattern), s_start_counter, true, is_primary);
113  }
114 
115  [[nodiscard]] static constexpr carrier make_original_cluster_tag(const uint16_t original_cluster_index)
116  {
117  return make_generic_tag(original_cluster_index, 0xFFFFFFFFU, s_start_counter, true, true);
118  }
119 
122  [[nodiscard]] static constexpr carrier make_shared_tag(const int32_t index, const uint32_t energy_pattern, const int32_t counter)
123  {
124  return make_generic_tag(index, energy_to_storage(energy_pattern), counter, false, true);
125  }
126 
127  [[nodiscard]] static constexpr carrier make_cluster_cell_tag(const uint16_t original_cluster_index)
128  {
129  return make_generic_tag(original_cluster_index, 1, 0, 0, 0);
130  }
131 
132  protected:
133 
135 
136  public:
137 
138  [[nodiscard]] constexpr carrier set_primary() const
139  {
140  return this->set_first_flag();
141  }
142 
143  [[nodiscard]] static constexpr carrier set_primary(const TASTag tag)
144  {
145  return tag.set_primary();
146  }
147 
148  [[nodiscard]] constexpr carrier clear_primary() const
149  {
150  return this->unset_first_flag();
151  }
152 
153  [[nodiscard]] static constexpr carrier clear_primary(const TASTag tag)
154  {
155  return tag.clear_primary();
156  }
157 
158  [[nodiscard]] constexpr carrier set_shared() const
159  {
160  return this->unset_second_flag();
161  }
162 
163  [[nodiscard]] static constexpr carrier set_shared(const TASTag tag)
164  {
165  return tag.set_shared();
166  }
167 
168  [[nodiscard]] constexpr carrier clear_shared() const
169  {
170  return this->set_second_flag();
171  }
172 
173  [[nodiscard]] static constexpr carrier clear_shared(const TASTag tag)
174  {
175  return tag.clear_shared();
176  }
177 
178  [[nodiscard]] constexpr bool is_valid() const
179  {
180  return value > 0ULL;
181  }
182 
183  [[nodiscard]] static constexpr bool is_valid(const TASTag tag)
184  {
185  return tag.is_valid();
186  }
187 
188  [[nodiscard]] constexpr bool is_invalid() const
189  {
190  return !this->is_valid();
191  }
192 
193  [[nodiscard]] static constexpr bool is_invalid(const TASTag tag)
194  {
195  return tag.is_invalid();
196  }
197 
198  [[nodiscard]] constexpr bool is_part_of_original_cluster() const
199  {
200  return (value & s_32_bit_mask) == s_32_bit_mask;
201  //As original cluster cells have all bits of the energy set to 1
202  //(which would be a NaN for normal energy)
203  }
204 
205  [[nodiscard]] static constexpr bool is_part_of_original_cluster(const TASTag tag)
206  {
207  return tag.is_part_of_original_cluster();
208  }
209 
210  [[nodiscard]] constexpr bool is_part_of_splitter_cluster() const
211  {
213  }
214 
215  [[nodiscard]] static constexpr bool is_part_of_splitter_cluster(const TASTag tag)
216  {
217  return tag.is_part_of_splitter_cluster();
218  }
219 
220  [[nodiscard]] constexpr bool is_shared() const
221  {
222  return !(this->get_second_flag());
223  }
224 
225  [[nodiscard]] constexpr static bool is_shared(const TASTag tag)
226  {
227  return tag.is_shared();
228  }
229 
230  [[nodiscard]] constexpr bool is_non_assigned_part_of_split_cluster() const
231  {
232  return value > 0 && value <= s_last_non_assigned_tag;
233  }
234 
235  [[nodiscard]] static constexpr bool is_non_assigned_part_of_split_cluster(const TASTag tag)
236  {
237  return tag.is_non_assigned_part_of_split_cluster();
238  }
239 
240  [[nodiscard]] constexpr carrier update_cell(const uint32_t new_index, const uint32_t new_energy) const
241  {
242  return make_generic_tag(new_index, energy_to_storage(new_energy), 0, 0, 0) | (value & ~(s_18_bit_mask | s_32_bit_mask));
243  }
244 
245  [[nodiscard]] constexpr carrier update_energy(const uint32_t new_energy) const
246  {
247  return (value & ~s_32_bit_mask) | (energy_to_storage(new_energy) << s_32_bit_offset);
248  }
249 
250  [[nodiscard]] constexpr carrier clear_energy() const
251  {
252  return (value & ~s_32_bit_mask);
253  }
254 
255 
256  [[nodiscard]] constexpr carrier update_index(const uint32_t new_index) const
257  {
258  return (value & (~s_18_bit_mask)) | ( (carrier(new_index) << s_18_bit_offset) & s_18_bit_mask);
259  }
260 
261  [[nodiscard]] constexpr carrier update_counter(const uint32_t new_counter) const
262  {
263  return (value & (~s_12_bit_mask)) | (carrier(new_counter) << s_12_bit_offset);
264  }
265 
266  [[nodiscard]] constexpr carrier ordering_bits() const
267  {
268  return value & (s_32_bit_mask | s_18_bit_mask);
269  }
270 
271  [[nodiscard]] static constexpr carrier ordering_bits(const TASTag tag)
272  {
273  return tag.ordering_bits();
274  }
275 
276  [[nodiscard]] constexpr carrier prepare_for_sharing(const TASTag other_tag) const
277  {
278  return (other_tag & (~s_second_flag_mask)) | s_first_flag_mask | s_12_bit_mask;
279  }
280 
281  protected:
282 
283  static constexpr carrier s_secondary_maxima_eliminator_tag = 0xFFFFFFFFFFFFFFFFULL;
284 
285  public:
286 
289  [[nodiscard]] constexpr bool is_secondary_maximum_seed() const
290  {
291  return this->is_part_of_splitter_cluster() && this->is_secondary();
292  }
293 
294  [[nodiscard]] constexpr static bool is_secondary_maximum_seed(const TASTag tag)
295  {
296  return tag.is_secondary_maximum_seed();
297  }
298 
299  [[nodiscard]] static constexpr carrier secondary_maxima_eliminator()
300  {
302  }
303 
304  [[nodiscard]] constexpr bool is_secondary_maxima_eliminator() const
305  {
307  }
308 
309  [[nodiscard]] static constexpr bool is_secondary_maxima_eliminator(const TASTag tag)
310  {
311  return tag.is_secondary_maxima_eliminator();
312  }
313 
314  [[nodiscard]] constexpr carrier propagate() const
315  {
317  }
318 
319  [[nodiscard]] static constexpr carrier propagate(const TASTag tag)
320  {
321  return tag.propagate();
322  }
323 
324  };
325 
327  {
329 
331 
333 
335 
336  struct PairsArr
337  {
338  constexpr static int s_size = CaloRecGPU::NMaxPairs + CaloRecGPU::NMaxPairs / 2;
340 
341  // I think we would be safe even with just NMaxPairs,
342  // but this way we can store all the four pairs consecutively:
343  //
344  // 0 NMaxPairs NMaxPairs + NMaxPairs/2
345  // ^ ^ ^
346  // | | |
347  // +------------------------------------------------------+---------------------------+
348  // | | |
349  // |normal pairs> <next pairs|prev pairs> <extra pairs|
350  //
351  //
352  // We are far from pressed for memory,
353  // so we can even increase this,
354  // but even NMaxPairs already has a margin
355  // (a factor of a bit less than 2...)
356 
363  };
364 
366 
368 
370 
372 
373 
374  //While somewhat distasteful,
375  //all of this casting is safe
376  //in the sense that everything
377  //is really a POD and CUDA already
378  //gives us just a region of memory...
379 
380  template <size_t i = 0, class Type = float>
381  constexpr const Type * get_cells_extra_array() const
382  {
383  static_assert((i + 1) * sizeof(Type) * CaloRecGPU::NCaloCells <= sizeof(TopoAutomatonSplittingTemporaries),
384  "Cannot access outside of temporary bounds...");
385 
386  return ((Type *) ((void *) secondary_array)) + i * CaloRecGPU::NCaloCells;
387  }
388 
389  template <size_t i = 0, class Type = float>
391  {
392  static_assert((i + 1) * sizeof(Type) * CaloRecGPU::NCaloCells <= sizeof(TopoAutomatonSplittingTemporaries),
393  "Cannot access outside of temporary bounds...");
394 
395  return ((Type *) ((void *) secondary_array)) + i * CaloRecGPU::NCaloCells;
396  }
397 
398  template <size_t i = 0, class Type = float>
399  constexpr const Type & get_cells_extra_array(const int j) const
400  {
401  return this->get_cells_extra_array<i, Type>()[j];
402  }
403 
404  template <size_t i = 0, class Type = float>
405  constexpr Type & get_cells_extra_array(const int j)
406  {
407  return this->get_cells_extra_array<i, Type>()[j];
408  }
409 
410  template <size_t i = 0, class Type = float>
411  constexpr const Type * get_cluster_extra_array() const
412  {
413  static_assert((i + 1) * sizeof(Type) * CaloRecGPU::NMaxClusters <= sizeof(TopoAutomatonSplittingTemporaries),
414  "Cannot access outside of temporary bounds...");
415 
416  return ((Type *) ((void *) secondary_array)) + i * CaloRecGPU::NMaxClusters;
417  }
418 
419  template <size_t i = 0, class Type = float>
421  {
422  static_assert((i + 1) * sizeof(Type) * CaloRecGPU::NMaxClusters <= sizeof(TopoAutomatonSplittingTemporaries),
423  "Cannot access outside of temporary bounds...");
424 
425  return ((Type *) ((void *) secondary_array)) + i * CaloRecGPU::NMaxClusters;
426  }
427 
428  template <size_t i = 0, class Type = float>
429  constexpr const Type & get_cluster_extra_array(const int j) const
430  {
431  return this->get_cluster_extra_array<i, Type>()[j];
432  }
433 
434  template <size_t i = 0, class Type = float>
435  constexpr Type & get_cluster_extra_array(const int j)
436  {
437  return this->get_cluster_extra_array<i, Type>()[j];
438  }
439  };
440 
442  {
445 
448 
450 
454 
457  //WARNING: the CPU version of the algorithm does not seem to have this option. Given the description,
458  // maybe it makes some sense to still allow this here? In our configuration we'll keep it disabled, but...
459 
460  unsigned int neighbour_options;
461 
462  constexpr bool uses_primary_sampling(const unsigned int sampling) const
463  {
464  return (valid_sampling_primary >> sampling) & 1U;
465  }
466  constexpr bool uses_secondary_sampling(const unsigned int sampling) const
467  {
468  return (valid_sampling_secondary >> sampling) & 1U;
469  }
470  constexpr bool uses_sampling(const unsigned int sampling) const
471  {
472  return uses_primary_sampling(sampling) || uses_secondary_sampling(sampling);
473  }
474  };
475 
477  {
479 
481 
482  void allocate()
483  {
484  m_options.allocate();
485  }
486 
487  void sendToGPU(const bool clear_CPU = false);
488  };
489 
491 
493  const CaloRecGPU::ConstantDataHolder & instance_data,
494  const TASOptionsHolder & options,
495  const IGPUKernelSizeOptimizer & optimizer,
496  const bool synchronize = false,
498 
500  const CaloRecGPU::ConstantDataHolder & instance_data,
501  const TASOptionsHolder & options,
502  const IGPUKernelSizeOptimizer & optimizer,
503  const bool synchronize = false,
505 
507  const CaloRecGPU::ConstantDataHolder & instance_data,
508  const TASOptionsHolder & options,
509  const IGPUKernelSizeOptimizer & optimizer,
510  const bool synchronize = false,
512 
514  const CaloRecGPU::ConstantDataHolder & instance_data,
515  const TASOptionsHolder & options,
516  const IGPUKernelSizeOptimizer & optimizer,
517  const bool synchronize = false,
519 
521  const CaloRecGPU::ConstantDataHolder & instance_data,
522  const TASOptionsHolder & options,
523  const IGPUKernelSizeOptimizer & optimizer,
524  const bool synchronize = false,
526 }
527 
528 #endif //CALORECGPU_TOPOAUTOMATONSPLITTING_CUDA_H
TASplitting::TopoAutomatonSplittingOptions::share_border_cells
bool share_border_cells
Definition: TopoAutomatonSplittingImpl.h:451
TASplitting::TopoAutomatonSplittingTemporaries
Definition: TopoAutomatonSplittingImpl.h:327
TASplitting::TASTag::is_secondary
constexpr bool is_secondary() const
Definition: TopoAutomatonSplittingImpl.h:98
TASplitting::TopoAutomatonSplittingTemporaries::PairsArr
Definition: TopoAutomatonSplittingImpl.h:337
TASplitting::TASTag::set_primary
constexpr carrier set_primary() const
Definition: TopoAutomatonSplittingImpl.h:138
TASplitting::TopoAutomatonSplittingTemporaries::pairs
PairsArr pairs
Definition: TopoAutomatonSplittingImpl.h:365
TASplitting::TASTag::clear_primary
constexpr carrier clear_primary() const
Definition: TopoAutomatonSplittingImpl.h:148
CaloRecGPU::NMaxPairs
constexpr int NMaxPairs
Definition: BaseDefinitions.h:36
TASplitting::TASTag::is_part_of_original_cluster
static constexpr bool is_part_of_original_cluster(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:205
CaloRecGPU::Tag_1_1_12_32_18::get_second_flag
constexpr bool get_second_flag() const
Definition: ExtraTagDefinitions.h:484
FloatingPointHelpers::IEEE754_like
Definition: FPHelpers.h:351
TASplitting::TASTag::prepare_for_sharing
constexpr carrier prepare_for_sharing(const TASTag other_tag) const
Definition: TopoAutomatonSplittingImpl.h:276
TASplitting::TopoAutomatonSplittingTemporaries::PairsArr::number_prev
int number_prev
Definition: TopoAutomatonSplittingImpl.h:361
TASplitting
Definition: TopoAutomatonSplittingImpl.h:20
TASplitting::TopoAutomatonSplittingTemporaries::PairsArr::cellID
int cellID[s_size]
Definition: TopoAutomatonSplittingImpl.h:357
TASplitting::TopoAutomatonSplittingOptions
Definition: TopoAutomatonSplittingImpl.h:442
TASplitting::TASOptionsHolder::sendToGPU
void sendToGPU(const bool clear_CPU=false)
TASplitting::TASTag::clear_primary
static constexpr carrier clear_primary(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:153
FPHelpers.h
TASplitting::TASTag::clear_shared
static constexpr carrier clear_shared(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:173
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TASplitting::TASTag::is_non_assigned_part_of_split_cluster
constexpr bool is_non_assigned_part_of_split_cluster() const
Definition: TopoAutomatonSplittingImpl.h:230
IGPUKernelSizeOptimizer.h
index
Definition: index.py:1
ExtraTagDefinitions.h
TASplitting::TASTag::s_last_non_assigned_tag
static constexpr carrier s_last_non_assigned_tag
Definition: TopoAutomatonSplittingImpl.h:134
CaloRecGPU::Tag_1_1_12_32_18::s_12_bit_offset
constexpr static unsigned int s_12_bit_offset
Definition: ExtraTagDefinitions.h:465
TASplitting::TASTag::s_tag_propagation_delta
static constexpr carrier s_tag_propagation_delta
Definition: TopoAutomatonSplittingImpl.h:32
TASplitting::TopoAutomatonSplittingOptions::min_num_cells
int min_num_cells
Definition: TopoAutomatonSplittingImpl.h:446
TASplitting::TopoAutomatonSplittingTemporaries::PairsArr::s_size
constexpr static int s_size
Definition: TopoAutomatonSplittingImpl.h:338
FloatingPointHelpers::StandardFloat
IEEE754_like< 23, 8 > StandardFloat
Definition: FPHelpers.h:832
TASplitting::TASTag::clear_energy
constexpr carrier clear_energy() const
Definition: TopoAutomatonSplittingImpl.h:250
CaloRecGPU::Helpers::SimpleHolder
Holds one objects of type \T in memory context Context.
Definition: Calorimeter/CaloRecGPU/CaloRecGPU/Helpers.h:1070
TASplitting::splitClusterGrowing
void splitClusterGrowing(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TASOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
TASplitting::TopoAutomatonSplittingTemporaries::get_cells_extra_array
constexpr Type * get_cells_extra_array()
Definition: TopoAutomatonSplittingImpl.h:390
TASplitting::TASTag::is_shared
constexpr static bool is_shared(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:225
taskman.template
dictionary template
Definition: taskman.py:317
TASplitting::TopoAutomatonSplittingOptions::use_absolute_energy
bool use_absolute_energy
Definition: TopoAutomatonSplittingImpl.h:452
TASplitting::TopoAutomatonSplittingOptions::valid_sampling_primary
unsigned int valid_sampling_primary
Definition: TopoAutomatonSplittingImpl.h:443
TASplitting::TASTag::is_valid
constexpr bool is_valid() const
Definition: TopoAutomatonSplittingImpl.h:178
TASplitting::TASTag::s_start_counter
static constexpr uint32_t s_start_counter
Definition: TopoAutomatonSplittingImpl.h:29
TASplitting::TASTag::energy_to_storage
constexpr static uint32_t energy_to_storage(const uint32_t energy_pattern)
Definition: TopoAutomatonSplittingImpl.h:36
TASplitting::TASTag::energy_bits
constexpr uint32_t energy_bits() const
Definition: TopoAutomatonSplittingImpl.h:63
TASplitting::TASOptionsHolder::m_options
CaloRecGPU::Helpers::CPU_object< TopoAutomatonSplittingOptions > m_options
Definition: TopoAutomatonSplittingImpl.h:478
CaloRecGPU::Tag_1_1_12_32_18::get_18_bits
constexpr uint32_t get_18_bits() const
Definition: ExtraTagDefinitions.h:519
TASplitting::TASTag::update_index
constexpr carrier update_index(const uint32_t new_index) const
Definition: TopoAutomatonSplittingImpl.h:256
TASplitting::TASTag::index
constexpr static int32_t index(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:58
TASplitting::TopoAutomatonSplittingTemporaries::get_cluster_extra_array
constexpr const Type * get_cluster_extra_array() const
Definition: TopoAutomatonSplittingImpl.h:411
CaloRecGPU::Tag_1_1_12_32_18::get_first_flag
constexpr bool get_first_flag() const
Definition: ExtraTagDefinitions.h:469
TASplitting::TASOptionsHolder
Definition: TopoAutomatonSplittingImpl.h:477
TASplitting::TASTag::propagate
constexpr carrier propagate() const
Definition: TopoAutomatonSplittingImpl.h:314
TASplitting::TASTag::update_cell
constexpr carrier update_cell(const uint32_t new_index, const uint32_t new_energy) const
Definition: TopoAutomatonSplittingImpl.h:240
TASplitting::TopoAutomatonSplittingOptions::uses_primary_sampling
constexpr bool uses_primary_sampling(const unsigned int sampling) const
Definition: TopoAutomatonSplittingImpl.h:462
TASplitting::TASTag::is_secondary_maxima_eliminator
constexpr bool is_secondary_maxima_eliminator() const
Definition: TopoAutomatonSplittingImpl.h:304
TASplitting::TASTag::s_secondary_maxima_eliminator_tag
static constexpr carrier s_secondary_maxima_eliminator_tag
Definition: TopoAutomatonSplittingImpl.h:283
TASplitting::TopoAutomatonSplittingTemporaries::PairsArr::number_normal
int number_normal
Definition: TopoAutomatonSplittingImpl.h:359
TASplitting::TASTag::clear_shared
constexpr carrier clear_shared() const
Definition: TopoAutomatonSplittingImpl.h:168
TASplitting::TASTag::set_primary
static constexpr carrier set_primary(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:143
TASplitting::TASTag::make_cluster_cell_tag
static constexpr carrier make_cluster_cell_tag(const uint16_t original_cluster_index)
Definition: TopoAutomatonSplittingImpl.h:127
TASplitting::TopoAutomatonSplittingTemporaries::original_cluster_map
int original_cluster_map[CaloRecGPU::NMaxClusters]
Definition: TopoAutomatonSplittingImpl.h:332
TASplitting::TASTag::is_valid
static constexpr bool is_valid(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:183
CaloRecGPU::Tag_1_1_12_32_18::set_second_flag
constexpr carrier set_second_flag() const
Definition: ExtraTagDefinitions.h:489
TASplitting::TASTag::propagate
static constexpr carrier propagate(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:319
CaloRecGPU::tag_type
TagBase::carrier tag_type
Definition: TagDefinitions.h:325
CaloRecGPU::EventDataHolder
Definition: DataHolders.h:35
TASplitting::TopoAutomatonSplittingOptions::valid_sampling_secondary
unsigned int valid_sampling_secondary
Definition: TopoAutomatonSplittingImpl.h:444
TASplitting::TASTag::storage_to_energy
constexpr static uint32_t storage_to_energy(const uint32_t storage_pattern)
Definition: TopoAutomatonSplittingImpl.h:41
TASplitting::TASTag::make_original_cluster_tag
static constexpr carrier make_original_cluster_tag(const uint16_t original_cluster_index)
Definition: TopoAutomatonSplittingImpl.h:115
TASplitting::TASTag::set_shared
static constexpr carrier set_shared(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:163
CaloRecGPU::Tag_1_1_12_32_18::set_first_flag
constexpr carrier set_first_flag() const
Definition: ExtraTagDefinitions.h:474
TASplitting::TopoAutomatonSplittingOptions::limit_PS_neighs
bool limit_PS_neighs
Definition: TopoAutomatonSplittingImpl.h:456
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
TASplitting::TopoAutomatonSplittingTemporaries::cell_to_cluster_map
int cell_to_cluster_map[CaloRecGPU::NCaloCells]
Definition: TopoAutomatonSplittingImpl.h:334
lumiFormat.i
int i
Definition: lumiFormat.py:85
TASplitting::TopoAutomatonSplittingTemporaries::reset_counters
int reset_counters[2]
Definition: TopoAutomatonSplittingImpl.h:367
Helpers.h
CaloRecGPU::Tag_1_1_12_32_18::unset_second_flag
constexpr carrier unset_second_flag() const
Definition: ExtraTagDefinitions.h:504
TASplitting::TASTag::is_secondary_maximum_seed
constexpr bool is_secondary_maximum_seed() const
Just to be semantically clearer for the maxima exclusion.
Definition: TopoAutomatonSplittingImpl.h:289
TASplitting::TASTag::max_counter
static constexpr int32_t max_counter()
Definition: TopoAutomatonSplittingImpl.h:83
TASplitting::TASTag::update_energy
constexpr carrier update_energy(const uint32_t new_energy) const
Definition: TopoAutomatonSplittingImpl.h:245
CaloRecGPU::GenericTagBase::value
carrier value
Definition: ExtraTagDefinitions.h:34
TASplitting::register_kernels
void register_kernels(IGPUKernelSizeOptimizer &optimizer)
TASplitting::TopoAutomatonSplittingOptions::uses_secondary_sampling
constexpr bool uses_secondary_sampling(const unsigned int sampling) const
Definition: TopoAutomatonSplittingImpl.h:466
CaloRecGPU::Tag_1_1_12_32_18::s_12_bit_mask
constexpr static carrier s_12_bit_mask
Definition: ExtraTagDefinitions.h:459
TASplitting::TASTag::set_shared
constexpr carrier set_shared() const
Definition: TopoAutomatonSplittingImpl.h:158
CaloRecGPU::Tag_1_1_12_32_18::s_second_flag_mask
constexpr static carrier s_second_flag_mask
Definition: ExtraTagDefinitions.h:458
TASplitting::TopoAutomatonSplittingTemporaries::get_cells_extra_array
constexpr Type & get_cells_extra_array(const int j)
Definition: TopoAutomatonSplittingImpl.h:405
TASplitting::TopoAutomatonSplittingTemporaries::PairsArr::number_next
int number_next
Definition: TopoAutomatonSplittingImpl.h:360
TASplitting::cellWeightingAndFinalization
void cellWeightingAndFinalization(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TASOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
TASplitting::TopoAutomatonSplittingTemporaries::stop_flag
int stop_flag
Definition: TopoAutomatonSplittingImpl.h:371
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
TASplitting::excludeSecondaryMaxima
void excludeSecondaryMaxima(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TASOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
CaloRecGPU::NCaloCells
constexpr int NCaloCells
Definition: BaseDefinitions.h:13
TASplitting::TopoAutomatonSplittingOptions::neighbour_options
unsigned int neighbour_options
Definition: TopoAutomatonSplittingImpl.h:460
TASplitting::TASTag::ordering_bits
constexpr carrier ordering_bits() const
Definition: TopoAutomatonSplittingImpl.h:266
TASplitting::TASOptionsHolder::allocate
void allocate()
Definition: TopoAutomatonSplittingImpl.h:482
xAODType
Definition: ObjectType.h:13
TASplitting::TopoAutomatonSplittingTemporaries::secondary_array
CaloRecGPU::tag_type secondary_array[CaloRecGPU::NCaloCells]
Definition: TopoAutomatonSplittingImpl.h:328
TASplitting::TASTag::index
constexpr int32_t index() const
Definition: TopoAutomatonSplittingImpl.h:53
CaloRecGPU::Tag_1_1_12_32_18::s_32_bit_offset
constexpr static unsigned int s_32_bit_offset
Definition: ExtraTagDefinitions.h:464
CaloRecGPU::Tag_1_1_12_32_18::unset_first_flag
constexpr carrier unset_first_flag() const
Definition: ExtraTagDefinitions.h:479
TASplitting::TASTag::is_part_of_splitter_cluster
constexpr bool is_part_of_splitter_cluster() const
Definition: TopoAutomatonSplittingImpl.h:210
TASplitting::TASTag::is_invalid
static constexpr bool is_invalid(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:193
CaloRecGPU::Tag_1_1_12_32_18::s_18_bit_offset
constexpr static unsigned int s_18_bit_offset
Definition: ExtraTagDefinitions.h:463
CaloRecGPU::Tag_1_1_12_32_18::make_generic_tag
static constexpr carrier make_generic_tag(const uint32_t bits_18, const uint32_t bits_32, const uint32_t bits_12, const bool flag_2, const bool flag_1)
Definition: ExtraTagDefinitions.h:524
TASplitting::TASTag::counter
constexpr int32_t counter() const
Definition: TopoAutomatonSplittingImpl.h:73
CaloRecGPU::Tag_1_1_12_32_18::get_12_bits
constexpr uint32_t get_12_bits() const
Definition: ExtraTagDefinitions.h:509
TASplitting::TopoAutomatonSplittingTemporaries::PairsArr::number_extra
int number_extra
Definition: TopoAutomatonSplittingImpl.h:362
TASplitting::TopoAutomatonSplittingOptions::uses_sampling
constexpr bool uses_sampling(const unsigned int sampling) const
Definition: TopoAutomatonSplittingImpl.h:470
CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder
Definition: Calorimeter/CaloRecGPU/CaloRecGPU/Helpers.h:110
TASplitting::TopoAutomatonSplittingTemporaries::get_cluster_extra_array
constexpr Type * get_cluster_extra_array()
Definition: TopoAutomatonSplittingImpl.h:420
TASplitting::TASTag::is_secondary_maxima_eliminator
static constexpr bool is_secondary_maxima_eliminator(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:309
TASplitting::TASTag::make_shared_tag
static constexpr carrier make_shared_tag(const int32_t index, const uint32_t energy_pattern, const int32_t counter)
Expects energy_pattern to be the bit pattern of the float that represents the energy.
Definition: TopoAutomatonSplittingImpl.h:122
CaloRecGPU::Tag_1_1_12_32_18
Definition: ExtraTagDefinitions.h:450
TASplitting::TASTag::counter
static constexpr int32_t counter(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:78
TASplitting::TASOptionsHolder::m_options_dev
CaloRecGPU::Helpers::CUDA_object< TopoAutomatonSplittingOptions > m_options_dev
Definition: TopoAutomatonSplittingImpl.h:480
TASplitting::TASTag
Definition: TopoAutomatonSplittingImpl.h:24
CaloRecGPU::Tag_1_1_12_32_18::s_32_bit_mask
constexpr static carrier s_32_bit_mask
Definition: ExtraTagDefinitions.h:460
TASplitting::TASTag::update_counter
constexpr carrier update_counter(const uint32_t new_counter) const
Definition: TopoAutomatonSplittingImpl.h:261
TASplitting::TopoAutomatonSplittingTemporaries::get_cluster_extra_array
constexpr Type & get_cluster_extra_array(const int j)
Definition: TopoAutomatonSplittingImpl.h:435
CaloRecGPU::GenericTagBase::carrier
CaloRecGPU::TagBase::carrier carrier
Definition: ExtraTagDefinitions.h:31
CaloRecGPU::Tag_1_1_12_32_18::s_18_bit_mask
constexpr static carrier s_18_bit_mask
Definition: ExtraTagDefinitions.h:461
TASplitting::TASTag::is_secondary_maximum_seed
constexpr static bool is_secondary_maximum_seed(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:294
TASplitting::TopoAutomatonSplittingTemporaries::PairsArr::neighbourID
int neighbourID[s_size]
Definition: TopoAutomatonSplittingImpl.h:358
TASplitting::TopoAutomatonSplittingTemporaries::get_cells_extra_array
constexpr const Type & get_cells_extra_array(const int j) const
Definition: TopoAutomatonSplittingImpl.h:399
TASplitting::TopoAutomatonSplittingOptions::min_maximum_energy
float min_maximum_energy
Definition: TopoAutomatonSplittingImpl.h:447
TASplitting::TASTag::is_non_assigned_part_of_split_cluster
static constexpr bool is_non_assigned_part_of_split_cluster(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:235
TASplitting::TASTag::counter_delta
constexpr static carrier counter_delta()
Definition: TopoAutomatonSplittingImpl.h:48
TASplitting::findLocalMaxima
void findLocalMaxima(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TASOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
CaloRecGPU::NMaxClusters
constexpr int NMaxClusters
Definition: BaseDefinitions.h:28
CUDAFriendlyClasses.h
TASplitting::TASTag::secondary_maxima_eliminator
static constexpr carrier secondary_maxima_eliminator()
Definition: TopoAutomatonSplittingImpl.h:299
TASplitting::TASTag::make_maximum_tag
static constexpr carrier make_maximum_tag(const int32_t index, const uint32_t maximum_energy_pattern, const bool is_primary)
Expects maximum_energy_pattern to be the bit pattern of the float that represents the energy.
Definition: TopoAutomatonSplittingImpl.h:110
CaloRecGPU::Tag_1_1_12_32_18::s_first_flag_mask
constexpr static carrier s_first_flag_mask
Definition: ExtraTagDefinitions.h:457
TASplitting::TASTag::ordering_bits
static constexpr carrier ordering_bits(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:271
TASplitting::TopoAutomatonSplittingTemporaries::continue_flag
int continue_flag
Definition: TopoAutomatonSplittingImpl.h:369
CaloRecGPU::ConstantDataHolder
Definition: DataHolders.h:19
CaloRecGPU::Tag_1_1_12_32_18::get_32_bits
constexpr uint32_t get_32_bits() const
Definition: ExtraTagDefinitions.h:514
TASplitting::TASTag::is_primary
constexpr bool is_primary() const
Definition: TopoAutomatonSplittingImpl.h:88
TASplitting::TASTag::is_invalid
constexpr bool is_invalid() const
Definition: TopoAutomatonSplittingImpl.h:188
TASplitting::TopoAutomatonSplittingTemporaries::PairsArr::s_intermediate_mark
constexpr static int s_intermediate_mark
Definition: TopoAutomatonSplittingImpl.h:339
TASplitting::TASTag::energy_bits
constexpr static uint32_t energy_bits(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:68
TASplitting::TASTag::is_shared
constexpr bool is_shared() const
Definition: TopoAutomatonSplittingImpl.h:220
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
TASplitting::fillNeighbours
void fillNeighbours(CaloRecGPU::EventDataHolder &holder, const CaloRecGPU::ConstantDataHolder &instance_data, const TASOptionsHolder &options, const IGPUKernelSizeOptimizer &optimizer, const bool synchronize=false, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream_to_use={})
TASplitting::TASTag::is_primary
constexpr static bool is_primary(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:93
TASplitting::TASTag::is_part_of_original_cluster
constexpr bool is_part_of_original_cluster() const
Definition: TopoAutomatonSplittingImpl.h:198
TASplitting::TopoAutomatonSplittingOptions::EM_shower_scale
float EM_shower_scale
Definition: TopoAutomatonSplittingImpl.h:449
IGPUKernelSizeOptimizer
Interface for GPU kernel size optimization (allowing adjustment of kernel sizes to the properties of ...
Definition: IGPUKernelSizeOptimizer.h:29
TASplitting::TopoAutomatonSplittingTemporaries::tertiary_array
CaloRecGPU::tag_type tertiary_array[CaloRecGPU::NCaloCells]
Definition: TopoAutomatonSplittingImpl.h:330
DataHolders.h
TASplitting::TopoAutomatonSplittingOptions::treat_L1_predicted_as_good
bool treat_L1_predicted_as_good
Definition: TopoAutomatonSplittingImpl.h:453
TASplitting::TopoAutomatonSplittingTemporaries::get_cells_extra_array
constexpr const Type * get_cells_extra_array() const
Definition: TopoAutomatonSplittingImpl.h:381
TASplitting::TASTag::is_secondary
constexpr static bool is_secondary(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:103
TASplitting::TopoAutomatonSplittingTemporaries::get_cluster_extra_array
constexpr const Type & get_cluster_extra_array(const int j) const
Definition: TopoAutomatonSplittingImpl.h:429
TASplitting::TASTag::is_part_of_splitter_cluster
static constexpr bool is_part_of_splitter_cluster(const TASTag tag)
Definition: TopoAutomatonSplittingImpl.h:215
TASplitting::TopoAutomatonSplittingOptions::limit_HECIW_and_FCal_neighs
bool limit_HECIW_and_FCal_neighs
Definition: TopoAutomatonSplittingImpl.h:455