CMS 3D CMS Logo

TestCUDAProducerGPUFirst.cc
Go to the documentation of this file.
7 
11 
13 
15 public:
16  explicit TestCUDAProducerGPUFirst(edm::ParameterSet const& iConfig);
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
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
TestCUDAProducerGPUKernel const gpuAlgo_
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
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void setComment(std::string const &value)
edm::EDPutTokenT< cms::cuda::Product< cms::cudatest::Thing > > const dstToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: output.py:1
cms::cuda::device::unique_ptr< float[]> runAlgo(const std::string &label, cudaStream_t stream) const
def move(src, dest)
Definition: eostools.py:511
TestCUDAProducerGPUFirst(edm::ParameterSet const &iConfig)
~TestCUDAProducerGPUFirst() override=default