Skip to content

Commit

Permalink
initialise phiBinner in device-to-host copy of TrackingRecHitsSoAColl…
Browse files Browse the repository at this point in the history
…ection<TrackerTraits>

Fix to the device-to-host copy of TrackingRecHitsSoACollection<TrackerTraits>,
in order to initialise the phiBinner data member on the host side.

A more complete explanation of the issue is provided by @makortel in
cms-sw#45708 (comment)
  • Loading branch information
missirol authored and mmusich committed Aug 19, 2024
1 parent 0ea027d commit d50e7b0
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ namespace cms::alpakatools {
assert(deviceData.nHits() == hostData.nHits());
assert(deviceData.offsetBPIX2() == hostData.offsetBPIX2());
#endif
// Update the contents address of the phiBinner histo container after the copy from device happened
alpaka::wait(queue);
typename TrackingRecHitSoA<TrackerTraits>::PhiBinnerView pbv;
pbv.assoc = &(hostData.view().phiBinner());
pbv.offSize = -1;
pbv.offStorage = nullptr;
pbv.contentSize = hostData.nHits();
pbv.contentStorage = hostData.view().phiBinnerStorage();
hostData.view().phiBinner().initStorage(pbv);

return hostData;
}
};
Expand Down

0 comments on commit d50e7b0

Please sign in to comment.