Skip to content

Commit d1172f7

Browse files
missirolmmusich
authored andcommitted
initialise phiBinner in device-to-host copy of TrackingRecHitsSoACollection<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 #45708 (comment)
1 parent f529d2a commit d1172f7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

DataFormats/TrackingRecHitSoA/interface/alpaka/TrackingRecHitsSoACollection.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ namespace cms::alpakatools {
4141
assert(deviceData.nHits() == hostData.nHits());
4242
assert(deviceData.offsetBPIX2() == hostData.offsetBPIX2());
4343
#endif
44+
// Update the contents address of the phiBinner histo container after the copy from device happened
45+
alpaka::wait(queue);
46+
typename TrackingRecHitSoA<TrackerTraits>::PhiBinnerView pbv;
47+
pbv.assoc = &(hostData.view().phiBinner());
48+
pbv.offSize = -1;
49+
pbv.offStorage = nullptr;
50+
pbv.contentSize = hostData.nHits();
51+
pbv.contentStorage = hostData.view().phiBinnerStorage();
52+
hostData.view().phiBinner().initStorage(pbv);
53+
4454
return hostData;
4555
}
4656
};

0 commit comments

Comments
 (0)