1 #include <cuda_runtime.h> 23 BeamSpotHost() : data_h_{cms::cuda::make_host_noncached_unique<BeamSpotPOD>(cudaHostAllocWriteCombined)} {}
25 BeamSpotHost(BeamSpotHost
const&) =
delete;
26 BeamSpotHost(BeamSpotHost&&) =
default;
28 BeamSpotHost& operator=(BeamSpotHost
const&) =
delete;
29 BeamSpotHost& operator=(BeamSpotHost&&) =
default;
53 return std::make_unique<BeamSpotHost>();
67 bsPutToken_{produces<cms::cuda::Product<BeamSpotCUDA>>()} {}
72 descriptions.
add(
"offlineBeamSpotToCUDA",
desc);
80 auto& bsHost = streamCache(streamID)->ptr();
86 bsHost->sigmaZ =
bs.sigmaZ();
87 bsHost->beamWidthX =
bs.BeamWidthX();
88 bsHost->beamWidthY =
bs.BeamWidthY();
89 bsHost->dxdz =
bs.dxdz();
90 bsHost->dydz =
bs.dydz();
91 bsHost->emittanceX =
bs.emittanceX();
92 bsHost->emittanceY =
bs.emittanceY();
93 bsHost->betaStar =
bs.betaStar();
const edm::EDGetTokenT< reco::BeamSpot > bsGetToken_
T getParameter(std::string const &) const
~BeamSpotToCUDA() override=default
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< T, impl::HostDeleter > unique_ptr
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
std::unique_ptr< BeamSpotHost > beginStream(edm::StreamID) const override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
char data[epos_bytes_allocation]
const edm::EDPutTokenT< cms::cuda::Product< BeamSpotCUDA > > bsPutToken_
BeamSpotToCUDA(const edm::ParameterSet &iConfig)
void produce(edm::StreamID streamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override