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 
edm::StreamID
Definition: StreamID.h:30
TestCUDAProducerGPUFirst::label_
const std::string label_
Definition: TestCUDAProducerGPUFirst.cc:24
TestCUDAProducerGPUKernel::runAlgo
cms::cuda::device::unique_ptr< float[]> runAlgo(const std::string &label, cudaStream_t stream) const
Definition: TestCUDAProducerGPUKernel.h:27
cms::cuda::ScopedContextProduce
Definition: ScopedContext.h:149
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
edm::EDPutTokenT
Definition: EDPutToken.h:33
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
TestCUDAProducerGPUFirst::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TestCUDAProducerGPUFirst.cc:33
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TestCUDAProducerGPUKernel.h
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TestCUDAProducerGPUFirst
Definition: TestCUDAProducerGPUFirst.cc:14
TestCUDAProducerGPUFirst::produce
void produce(edm::StreamID stream, edm::Event &iEvent, edm::EventSetup const &iSetup) const override
Definition: TestCUDAProducerGPUFirst.cc:41
TestCUDAProducerGPUFirst::~TestCUDAProducerGPUFirst
~TestCUDAProducerGPUFirst() override=default
ParameterSetDescription.h
TestCUDAProducerGPUFirst::TestCUDAProducerGPUFirst
TestCUDAProducerGPUFirst(edm::ParameterSet const &iConfig)
Definition: TestCUDAProducerGPUFirst.cc:29
edm::global::EDProducer
Definition: EDProducer.h:32
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
edm::ConfigurationDescriptions::setComment
void setComment(std::string const &value)
Definition: ConfigurationDescriptions.cc:48
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:57
cms::cuda::device::unique_ptr
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
Definition: device_unique_ptr.h:33
TestCUDAProducerGPUKernel
Definition: TestCUDAProducerGPUKernel.h:19
Product.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
Frameworkfwd.h
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
ScopedContext.h
Thing.h
TestCUDAProducerGPUFirst::gpuAlgo_
const TestCUDAProducerGPUKernel gpuAlgo_
Definition: TestCUDAProducerGPUFirst.cc:26
ParameterSet.h
EDProducer.h
edm::Event
Definition: Event.h:73
TestCUDAProducerGPUFirst::dstToken_
const edm::EDPutTokenT< cms::cuda::Product< cms::cudatest::Thing > > dstToken_
Definition: TestCUDAProducerGPUFirst.cc:25
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:87