CMS 3D CMS Logo

HeterogeneousHGCalEEConditions.h
Go to the documentation of this file.
1 #ifndef HeterogeneousHGCalEEConditions_h
2 #define HeterogeneousHGCalEEConditions_h
3 
4 #include <numeric> //accumulate
5 #include <typeinfo>
6 
15 
17 
18 // Declare the wrapper ESProduct. The corresponding ESProducer should
19 // produce objects of this type.
21 public:
22  // Constructor takes the standard CPU ESProduct, and transforms the
23  // necessary data to array(s) in pinned host memory
25 
26  // Deallocates all pinned host memory
28 
29  // Function to return the actual payload on the memory of the current device
31  cudaStream_t stream) const;
32 
33 private:
34  // Holds the data in pinned CPU memory
35  // Contrary to its non-heterogeneous counterpart (constructor argument) it is *not* a pointer (so to avoid an extra allocation)
37 
38  std::vector<size_t> sizes_;
39  size_t chunk_;
40 
42 
43  // Helper struct to hold all information that has to be allocated and
44  // deallocated per device
45  struct GPUData {
46  // Destructor should free all member pointers
47  ~GPUData();
48  // internal pointers are on device, struct itself is on CPU
50  // internal pounters and struct are on device
52  };
53 
54  // Helper that takes care of complexity of transferring the data to
55  // multiple devices
57 };
58 
59 #endif //HeterogeneousHGCalEEConditions_h
hgcal_conditions::HeterogeneousEEConditionsESProduct * host
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
hgcal_conditions::HeterogeneousEEConditionsESProduct const * getHeterogeneousConditionsESProductAsync(cudaStream_t stream) const
cp::HeterogeneousHGCalEEParameters params_
hgcal_conditions::HeterogeneousEEConditionsESProduct * device