Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
czangela committed Jul 15, 2021
1 parent 0f0d65b commit 1e4bc66
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -85,7 +85,8 @@ void SiPixelRecHitFromCUDA::acquire(edm::Event const& iEvent,
void SiPixelRecHitFromCUDA::produce(edm::Event& iEvent, edm::EventSetup const& es) {
// allocate a buffer for the indices of the clusters
auto hmsp = std::make_unique<uint32_t[]>(gpuClustering::maxNumModules + 1);
std::copy(hitsModuleStart_.get(), hitsModuleStart_.get() + gpuClustering::maxNumModules + 1, hmsp.get());
if (hitsModuleStart_)
std::copy(hitsModuleStart_.get(), hitsModuleStart_.get() + gpuClustering::maxNumModules + 1, hmsp.get());
// wrap the buffer in a HostProduct, and move it to the Event, without reallocating the buffer or affecting hitsModuleStart
iEvent.emplace(hostPutToken_, std::move(hmsp));

Expand Down

0 comments on commit 1e4bc66

Please sign in to comment.