7#ifndef CALORECGPU_TOPOAUTOMATONSPLITTING_CUDA_H
8#define CALORECGPU_TOPOAUTOMATONSPLITTING_CUDA_H
25 using CaloRecGPU::Tag_1_1_12_32_18::Tag_1_1_12_32_18;
38 return EnergyFPFormat::template to_total_ordering<uint32_t>(energy_pattern);
43 return EnergyFPFormat::template from_total_ordering<uint32_t>(storage_pattern);
53 [[nodiscard]]
constexpr int32_t
index()
const
58 [[nodiscard]]
constexpr static int32_t
index(
const TASTag tag)
63 [[nodiscard]]
constexpr int32_t
counter()
const
73 [[nodiscard]]
constexpr carrier update_cell(
const uint32_t new_index,
const uint32_t new_energy)
const
123 return tag.is_valid();
133 return tag.is_invalid();
143 return tag.is_part_of_splitter_cluster();
153 return tag.is_not_shared();
163 return tag.is_shared();
173 return tag.set_shared();
183 return tag.clear_shared();
198 return tag.is_first();
208 return tag.propagate();
229 return tag.is_secondary_maxima_eliminator();
239 return tag.is_primary_maximum();
249 return tag.is_secondary_maximum();
259 return tag.unset_secondary();
286 return (pattern >> sampling) & 1U;
325 const bool synchronize =
false,
332 const bool synchronize =
false,
339 const bool synchronize =
false,
346 const bool synchronize =
false,
353 const bool synchronize =
false,
Contains functions to deal with arbitrary IEEE754-like floating point formats.
Holds CPU and GPU versions of the geometry and cell noise information, which are assumed to be consta...
Holds the mutable per-event information (clusters and cells) and provides utilities to convert betwee...
Interface for GPU kernel size optimization (allowing adjustment of kernel sizes to the properties of ...
SimpleHolder< T, MemoryContext::CUDAGPU, true > CUDA_object
Holds an object of type T in CUDA GPU memory.
SimpleHolder< T, MemoryContext::CPU, true > CPU_object
Holds an object of type T in CPU memory.
IEEE754_like< 23, 8 > StandardFloat
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={})
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={})
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={})
void register_kernels(IGPUKernelSizeOptimizer &optimizer)
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={})
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::TagBase::carrier carrier
A tag with two bit flags, then 12 bits (for a counter), 32 bits (for a float) and 18 bits (for a cell...
static constexpr unsigned int s_32_bit_offset
constexpr uint32_t get_18_bits() const
static constexpr carrier s_32_bit_mask
constexpr uint32_t get_12_bits() const
constexpr carrier unset_second_flag() const
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)
constexpr carrier set_second_flag() const
static constexpr unsigned int s_18_bit_offset
static constexpr carrier s_12_bit_mask
static constexpr carrier s_second_flag_mask
static constexpr carrier s_18_bit_mask
static constexpr carrier s_first_flag_mask
static constexpr unsigned int s_12_bit_offset
constexpr bool get_second_flag() const
constexpr carrier set_first_flag() const
constexpr bool get_first_flag() const
void sendToGPU(const bool clear_CPU=false)
CaloRecGPU::Helpers::CPU_object< TopoAutomatonSplittingOptions > m_options
CaloRecGPU::Helpers::CUDA_object< TopoAutomatonSplittingOptions > m_options_dev
static constexpr uint32_t s_start_counter
constexpr carrier prepare_for_sharing(const TASTag other_tag) const
static constexpr carrier secondary_maxima_eliminator()
constexpr int32_t index() const
static constexpr carrier clear_shared(const TASTag tag)
constexpr int32_t counter() const
constexpr bool is_not_shared() const
static constexpr bool is_valid(const TASTag tag)
constexpr bool is_secondary_maximum() const
static constexpr bool is_part_of_splitter_cluster(const TASTag tag)
constexpr bool is_part_of_splitter_cluster() const
FloatingPointHelpers::StandardFloat EnergyFPFormat
static constexpr bool is_not_shared(const TASTag tag)
static constexpr carrier s_tag_propagation_delta
static constexpr bool is_secondary_maximum(const TASTag tag)
constexpr bool is_shared() const
static constexpr int32_t index(const TASTag tag)
constexpr carrier clear_energy() const
static constexpr carrier make_maximum_tag(const int32_t index, const uint32_t energy_pattern, const bool is_primary)
Expects maximum_energy_pattern to be the bit pattern of the float that represents the energy.
constexpr bool is_valid() const
static constexpr uint32_t energy_to_storage(const uint32_t energy_pattern)
static constexpr carrier make_non_split_cluster_tag()
constexpr bool is_secondary_maxima_eliminator() const
constexpr carrier unset_secondary() const
constexpr carrier clear_shared() const
constexpr bool is_invalid() const
static constexpr bool is_primary_maximum(const TASTag tag)
static constexpr carrier set_shared(const TASTag tag)
static constexpr bool is_shared(const TASTag tag)
static constexpr bool is_invalid(const TASTag tag)
constexpr carrier propagate() const
constexpr carrier set_shared() const
constexpr bool is_first() const
constexpr carrier update_index(const uint32_t new_index) const
constexpr carrier update_counter(const uint32_t new_counter) const
constexpr carrier update_energy(const uint32_t new_energy) const
static constexpr carrier unset_secondary(const TASTag tag)
constexpr carrier update_cell(const uint32_t new_index, const uint32_t new_energy) const
static constexpr carrier s_unassigned_tag
static constexpr bool is_secondary_maxima_eliminator(const TASTag tag)
static constexpr uint32_t storage_to_energy(const uint32_t storage_pattern)
static constexpr carrier s_secondary_maxima_eliminator_tag
static constexpr carrier counter_delta()
static constexpr int32_t counter(const TASTag tag)
constexpr bool is_primary_maximum() const
static constexpr carrier propagate(const TASTag tag)
static constexpr bool is_first(const TASTag tag)
constexpr bool uses_secondary_sampling(const unsigned int sampling) const
unsigned int valid_sampling_secondary
bool treat_L1_predicted_as_good
unsigned int valid_sampling_primary
unsigned int neighbour_options
constexpr bool uses_primary_sampling(const unsigned int sampling) const
bool limit_HECIW_and_FCal_neighs
static constexpr bool uses_this_sampling(const unsigned int pattern, const unsigned int sampling)
constexpr bool uses_sampling(const unsigned int sampling) const