CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TestCUDAProducerGPUFirst.cc
Go to the documentation of this file.
7 
11 
13 
15 public:
17  ~TestCUDAProducerGPUFirst() override = default;
18 
19  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
20 
21  void produce(edm::StreamID stream, edm::Event& iEvent, edm::EventSetup const& iSetup) const override;
22 
23 private:
27 };
28 
30  : label_(iConfig.getParameter<std::string>("@module_label")),
31  dstToken_{produces<cms::cuda::Product<cms::cudatest::Thing>>()} {}
32 
35  descriptions.addWithDefaultLabel(desc);
36  descriptions.setComment(
37  "This EDProducer is part of the TestCUDAProducer* family. It models a GPU algorithm this the first algorithm in "
38  "the chain of the GPU EDProducers. Produces cms::cuda::Productcms::cudatest::Thing>.");
39 }
40 
43  edm::EventSetup const& iSetup) const {
44  edm::LogVerbatim("TestCUDAProducerGPUFirst") << label_ << " TestCUDAProducerGPUFirst::produce begin event "
45  << iEvent.id().event() << " stream " << iEvent.streamID();
46 
47  cms::cuda::ScopedContextProduce ctx{streamID};
48 
50  ctx.emplace(iEvent, dstToken_, std::move(output));
51 
52  edm::LogVerbatim("TestCUDAProducerGPUFirst") << label_ << " TestCUDAProducerGPUFirst::produce end event "
53  << iEvent.id().event() << " stream " << iEvent.streamID();
54 }
55 
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
Definition: EventID.h:40
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
TestCUDAProducerGPUKernel const gpuAlgo_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void produce(edm::StreamID stream, edm::Event &iEvent, edm::EventSetup const &iSetup) const override
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
cms::cuda::device::unique_ptr< float[]> runAlgo(const std::string &label, cudaStream_t stream) const
int iEvent
Definition: GenABIO.cc:224
def move
Definition: eostools.py:511
void setComment(std::string const &value)
edm::EDPutTokenT< cms::cuda::Product< cms::cudatest::Thing > > const dstToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EventID id() const
Definition: EventBase.h:59
StreamID streamID() const
Definition: Event.h:98
TestCUDAProducerGPUFirst(edm::ParameterSet const &iConfig)
~TestCUDAProducerGPUFirst() override=default