7#ifndef CALORECGPU_DATAHOLDERS_H
8#define CALORECGPU_DATAHOLDERS_H
15#define CALORECGPU_USE_PINNED_MEMORY 1
30 void sendToGPU(
const bool clear_CPU =
true);
79 void importCells(
const void * cell_collection,
const std::vector<int> & extra_cells_to_fill = {});
85 void importClusters(
const void * cluster_collection,
87 const bool output_tags =
true,
88 const bool consider_shared_cells =
true,
89 const bool output_moments =
false,
90 const bool output_extra_moments =
false,
91 const std::vector<int> & extra_cells_to_fill = {});
101 const bool full_copy =
false,
102 const bool clear_CPU =
false,
103 const bool synchronize =
false,
115 const bool full_copy =
false,
117 const bool synchronize =
false,
119 const bool also_return_cells =
false);
132 void exportClusters(
void * cluster_collection,
133 const void * cell_collection_link,
135 const bool sort_clusters =
true,
136 const bool save_uncalibrated =
true,
137 const bool output_extra_moments =
false,
138 const std::vector<int> & extra_cells_to_fill = {},
139 size_t * time_measurements =
nullptr);
153 const void * cell_collection_link,
155 const bool sort_clusters =
true,
156 const bool save_uncalibrated =
true,
157 const bool output_extra_moments =
false,
158 const std::vector<int> & extra_cells_to_fill = {},
159 size_t * time_measurements =
nullptr,
162 void allocate(
const bool also_GPU =
true);
166#if CALORECGPU_USE_PINNED_MEMORY
Holds CPU and GPU versions of the geometry and cell noise information, which are assumed to be consta...
CaloRecGPU::Helpers::CPU_object< CaloRecGPU::GeometryArr > m_geometry
void sendToGPU(const bool clear_CPU=true)
CaloRecGPU::Helpers::CUDA_object< CaloRecGPU::CellNoiseArr > m_cell_noise_dev
CaloRecGPU::Helpers::CUDA_object< CaloRecGPU::GeometryArr > m_geometry_dev
CaloRecGPU::Helpers::CPU_object< CaloRecGPU::CellNoiseArr > m_cell_noise
Holds the mutable per-event information (clusters and cells) and provides utilities to convert betwee...
CaloRecGPU::Helpers::CUDA_pinned_CPU_object< CaloRecGPU::CellInfoArr > m_cell_info
CaloRecGPU::Helpers::CUDA_object< CaloRecGPU::CellInfoArr > m_cell_info_dev
CaloRecGPU::Helpers::CUDA_pinned_CPU_object< CaloRecGPU::ClusterInfoArr > m_clusters
void allocate(const bool also_GPU=true)
CaloRecGPU::Helpers::CUDA_object< CaloRecGPU::ClusterInfoArr > m_clusters_dev
void returnAndExportClusters(void *cluster_collection, const void *cell_collection_link, const MomentsOptionsArray &moments_to_add, const bool sort_clusters=true, const bool save_uncalibrated=true, const bool output_extra_moments=false, const std::vector< int > &extra_cells_to_fill={}, size_t *time_measurements=nullptr, CaloRecGPU::CUDA_Helpers::CUDAStreamPtrHolder stream={})
We are using a void* for API to make this able to compile on the GPU without Athena-specific dependen...
SimpleHolder< T, MemoryContext::CUDAGPU, true > CUDA_object
Holds an object of type T in CUDA GPU memory.
SimpleHolder< T, MemoryContext::CUDAPinnedCPU, true > CUDA_pinned_CPU_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.
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
Holds an array of bools to represent the different moments that may be calculated and transferred to/...
bool array[num_moments+1]
static MomentsOptionsArray all()
static int moment_to_linear(const int moment)
bool & operator[](const int moment)
static constexpr int num_moments