1 #ifndef DataFormats_TrackingRecHitSoA_interface_alpaka_TrackingRecHitsSoACollection_h 2 #define DataFormats_TrackingRecHitSoA_interface_alpaka_TrackingRecHitsSoACollection_h 7 #include <alpaka/alpaka.hpp> 19 template <
typename TrackerTraits>
32 template <
typename TrackerTraits,
typename TDevice>
34 template <
typename TQueue>
39 if (deviceData.
view().metadata().size() == 0) {
40 std::memset(hostData.buffer().data(),
42 alpaka::getExtentProduct(hostData.buffer()) *
47 alpaka::memcpy(
queue, hostData.buffer(), deviceData.
buffer());
49 printf(
"TrackingRecHitsSoACollection: I'm copying to host.\n");
57 pbv.assoc = &(hostData.view().phiBinner());
59 pbv.offStorage =
nullptr;
60 pbv.contentSize = hostData.nHits();
61 pbv.contentStorage = hostData.view().phiBinnerStorage();
62 hostData.view().phiBinner().initStorage(pbv);
73 #endif // DataFormats_TrackingRecHitSoA_interface_alpaka_TrackingRecHitsSoACollection_h
typename PhiBinner::View PhiBinnerView
#define ASSERT_DEVICE_MATCHES_HOST_COLLECTION(DEVICE_COLLECTION, HOST_COLLECTION)
TrackingRecHitsSoACollection< pixelTopology::Phase2 > TrackingRecHitSoAPhase2
TrackingRecHitsSoACollection< pixelTopology::Phase1 > TrackingRecHitSoAPhase1
TrackingRecHitsSoACollection< pixelTopology::HIonPhase1 > TrackingRecHitSoAHIonPhase1
std::conditional_t< std::is_same_v< Device, alpaka::DevCpu >, TrackingRecHitHost< TrackerTraits >, TrackingRecHitDevice< TrackerTraits, Device > > TrackingRecHitsSoACollection
int32_t offsetBPIX2() const
cms::cuda::host::unique_ptr< std::byte[]> Buffer