1 #include <cuda_runtime.h> 3 #include <fmt/printf.h> 28 template <
typename TrackerTraits>
53 template <
typename TrackerTraits>
55 : hitsTokenGPU_(consumes(iConfig.getParameter<
edm::
InputTag>(
"pixelRecHitSrc"))),
59 template <
typename TrackerTraits>
67 template <
typename TrackerTraits>
73 auto const& inputData = ctx.get(inputDataWrapped);
75 nHits_ = inputData.nHits();
77 cudaCheck(cudaMemcpyAsync(hits_h_.buffer().get(),
78 inputData.const_buffer().get(),
79 inputData.bufferSize(),
80 cudaMemcpyDeviceToHost,
82 LogDebug(
"SiPixelRecHitSoAFromCUDA") <<
"copying to cpu SoA" << inputData.nHits() <<
" Hits";
85 template <
typename TrackerTraits>
90 std::copy(hits_h_.view().hitsModuleStart().begin(), hits_h_.view().hitsModuleStart().end(), hmsp.get());
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const edm::EDPutTokenT< HitsOnHost > hitsPutTokenCPU_
~SiPixelRecHitSoAFromCUDAT() override=default
constexpr uint16_t numberOfModules
void produce(edm::Event &iEvent, edm::EventSetup const &iSetup) override
SiPixelRecHitSoAFromCUDAT(const edm::ParameterSet &iConfig)
const edm::EDGetTokenT< cms::cuda::Product< HitsOnDevice > > hitsTokenGPU_
const edm::EDPutTokenT< HMSstorage > hostPutToken_
#define DEFINE_FWK_MODULE(type)
void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder waitingTaskHolder) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define cudaCheck(ARG,...)