CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HGCUncalibRecHitDevice.cc
Go to the documentation of this file.
2 
3 HGCUncalibRecHitDevice::HGCUncalibRecHitDevice(uint32_t nhits, const cudaStream_t& stream) : nhits_(nhits) {
4  size_tot_ = std::accumulate(sizes_.begin(), sizes_.end(), 0); //this might be done at compile time
5  pad_ = ((nhits - 1) / 32 + 1) * 32; //align to warp boundary (assumption: warpSize = 32)
6  ptr_ = cms::cuda::make_device_unique<std::byte[]>(pad_ * size_tot_, stream);
7 
9 }
10 
12  soa_.amplitude_ = reinterpret_cast<float*>(ptr_.get());
18  soa_.flags_ = reinterpret_cast<uint32_t*>(soa_.OOTchi2_ + pad_);
19  soa_.aux_ = soa_.flags_ + pad_;
20  soa_.id_ = soa_.aux_ + pad_;
21 
23  soa_.nhits_ = nhits_;
24  soa_.pad_ = pad_;
25 }
cms::cuda::device::unique_ptr< std::byte[]> ptr_
HGCUncalibRecHitDevice()=default
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
static constexpr std::array< int, memory::npointers::ntypes_hgcuncalibrechits_soa > sizes_
std::uint32_t * flags_