CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
SiStripClustersSOAtoHost Class Referencefinal
Inheritance diagram for SiStripClustersSOAtoHost:
edm::stream::EDProducer< edm::ExternalWork >

Public Member Functions

 SiStripClustersSOAtoHost (const edm::ParameterSet &conf)
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::ExternalWork >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void acquire (edm::Event const &ev, edm::EventSetup const &es, edm::WaitingTaskWithArenaHolder waitingTaskHolder) override
 
void produce (edm::Event &ev, const edm::EventSetup &es) override
 

Private Attributes

SiStripSOAtoHost gpuAlgo_
 
edm::EDGetTokenT< cms::cuda::Product< SiStripClustersCUDADevice > > inputToken_
 
edm::EDPutTokenT< SiStripClustersCUDAHostoutputToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer< edm::ExternalWork >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 33 of file SiStripClustersSOAtoHost.cc.

Constructor & Destructor Documentation

◆ SiStripClustersSOAtoHost()

SiStripClustersSOAtoHost::SiStripClustersSOAtoHost ( const edm::ParameterSet conf)
inlineexplicit

Definition at line 35 of file SiStripClustersSOAtoHost.cc.

36  : inputToken_(
38  outputToken_(produces<SiStripClustersCUDAHost>()) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDPutTokenT< SiStripClustersCUDAHost > outputToken_
edm::EDGetTokenT< cms::cuda::Product< SiStripClustersCUDADevice > > inputToken_

Member Function Documentation

◆ acquire()

void SiStripClustersSOAtoHost::acquire ( edm::Event const &  ev,
edm::EventSetup const &  es,
edm::WaitingTaskWithArenaHolder  waitingTaskHolder 
)
inlineoverrideprivate

Definition at line 48 of file SiStripClustersSOAtoHost.cc.

References makeMEIFBenchmarkPlots::ev, gpuAlgo_, input, inputToken_, SiStripSOAtoHost::makeAsync(), eostools::move(), and wrapper.

50  {
51  const auto& wrapper = ev.get(inputToken_);
52 
53  // Sets the current device and creates a CUDA stream
54  cms::cuda::ScopedContextAcquire ctx{wrapper, std::move(waitingTaskHolder)};
55 
56  const auto& input = ctx.get(wrapper);
57 
58  // Queues asynchronous data transfers and kernels to the CUDA stream
59  // returned by cms::cuda::ScopedContextAcquire::stream()
60  gpuAlgo_.makeAsync(input, ctx.stream());
61 
62  // Destructor of ctx queues a callback to the CUDA stream notifying
63  // waitingTaskHolder when the queued asynchronous work has finished
64  }
static std::string const input
Definition: EdmProvDump.cc:50
edm::EDGetTokenT< cms::cuda::Product< SiStripClustersCUDADevice > > inputToken_
void makeAsync(const SiStripClustersCUDADevice &clusters_d, cudaStream_t stream)
def move(src, dest)
Definition: eostools.py:511
static HepMC::HEPEVT_Wrapper wrapper

◆ fillDescriptions()

static void SiStripClustersSOAtoHost::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 40 of file SiStripClustersSOAtoHost.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), and submitPVResolutionJobs::desc.

40  {
42 
43  desc.add("ProductLabel", edm::InputTag("siStripClusterizerFromRawGPU"));
44  descriptions.addWithDefaultLabel(desc);
45  }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ produce()

void SiStripClustersSOAtoHost::produce ( edm::Event ev,
const edm::EventSetup es 
)
inlineoverrideprivate

Member Data Documentation

◆ gpuAlgo_

SiStripSOAtoHost SiStripClustersSOAtoHost::gpuAlgo_
private

Definition at line 69 of file SiStripClustersSOAtoHost.cc.

Referenced by acquire(), and produce().

◆ inputToken_

edm::EDGetTokenT<cms::cuda::Product<SiStripClustersCUDADevice> > SiStripClustersSOAtoHost::inputToken_
private

Definition at line 71 of file SiStripClustersSOAtoHost.cc.

Referenced by acquire().

◆ outputToken_

edm::EDPutTokenT<SiStripClustersCUDAHost> SiStripClustersSOAtoHost::outputToken_
private

Definition at line 72 of file SiStripClustersSOAtoHost.cc.