1 #include <cuda_runtime.h> 25 template <
typename TrackerTraits>
48 template <
typename TrackerTraits>
52 template <
typename TrackerTraits>
60 template <
typename TrackerTraits>
66 auto const& tracks_d = ctx.get(inputDataWrapped);
68 cudaCheck(cudaMemcpyAsync(tracks_h_.buffer().get(),
69 tracks_d.const_buffer().get(),
70 tracks_d.bufferSize(),
71 cudaMemcpyDeviceToHost,
75 template <
typename TrackerTraits>
77 auto maxTracks = tracks_h_.view().metadata().size();
78 auto nTracks = tracks_h_.view().nTracks();
86 #ifdef PIXEL_DEBUG_PRODUCE 88 std::cout <<
"found " <<
nTracks <<
" tracks in cpu SoA at " << &tsoa << std::endl;
91 for (int32_t it = 0; it <
maxTracks; ++it) {
93 assert(
nHits ==
int(tracks_h_.view().hitIndices().size(it)));
103 assert(!tracks_h_.buffer());
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
void produce(edm::Event &iEvent, edm::EventSetup const &iSetup) override
edm::EDGetTokenT< cms::cuda::Product< TrackSoADevice > > tokenCUDA_
void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder waitingTaskHolder) override
edm::EDPutTokenT< TrackSoAHost > tokenSOA_
PixelTrackSoAFromCUDAT(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_MODULE(type)
~PixelTrackSoAFromCUDAT() override=default
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr __host__ __device__ int nHits(const TrackSoAConstView &tracks, int i)
#define cudaCheck(ARG,...)
Log< level::Warning, false > LogWarning
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits