CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducerToDevice Class Reference
Inheritance diagram for ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducerToDevice:
ALPAKA_ACCELERATOR_NAMESPACE::stream::SynchronizingEDProducer<> edm::ProducerBase< edm::stream::EDProducer, edm::ExternalWork, Args... >

Public Member Functions

void acquire (device::Event const &iEvent, device::EventSetup const &iSetup) override
 
void produce (device::Event &iEvent, device::EventSetup const &iSetup) override
 
 TestAlpakaStreamSynchronizingProducerToDevice (edm::ParameterSet const &iConfig)
 
- Public Member Functions inherited from ALPAKA_ACCELERATOR_NAMESPACE::stream::SynchronizingEDProducer<>
void acquire (edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder holder) final
 
void produce (edm::Event &iEvent, edm::EventSetup const &iSetup) final
 
- Public Member Functions inherited from edm::ProducerBase< edm::stream::EDProducer, edm::ExternalWork, Args... >
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

TestAlgo algo_
 
std::unique_ptr< portabletest::TestDeviceCollectiondeviceProduct_
 
const device::EDPutToken< portabletest::TestDeviceCollectionputToken_
 
const int32_t size_
 

Additional Inherited Members

- Public Types inherited from edm::ProducerBase< edm::stream::EDProducer, edm::ExternalWork, Args... >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Protected Member Functions inherited from edm::ProducerBase< edm::stream::EDProducer, edm::ExternalWork, Args... >
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
BranchAliasSetterT< ProductType > produces ()
 
auto produces () noexcept
 
ProducesCollector producesCollector ()
 

Detailed Description

This class demonstrates a stream EDProducer that

Definition at line 19 of file TestAlpakaStreamSynchronizingProducerToDevice.cc.

Constructor & Destructor Documentation

◆ TestAlpakaStreamSynchronizingProducerToDevice()

ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducerToDevice::TestAlpakaStreamSynchronizingProducerToDevice ( edm::ParameterSet const &  iConfig)
inline

Member Function Documentation

◆ acquire()

void ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducerToDevice::acquire ( device::Event const &  iEvent,
device::EventSetup const &  iSetup 
)
inlineoverridevirtual

Implements ALPAKA_ACCELERATOR_NAMESPACE::stream::SynchronizingEDProducer<>.

Definition at line 26 of file TestAlpakaStreamSynchronizingProducerToDevice.cc.

References algo_, deviceProduct_, ALPAKA_ACCELERATOR_NAMESPACE::TestAlgo::fill(), iEvent, and size_.

26  {
27  deviceProduct_ = std::make_unique<portabletest::TestDeviceCollection>(size_, iEvent.queue());
28 
29  // run the algorithm, potentially asynchronously
30  algo_.fill(iEvent.queue(), *deviceProduct_);
31  }
int iEvent
Definition: GenABIO.cc:224
void fill(Queue &queue, portabletest::TestDeviceCollection &collection, double xvalue=0.) const
Definition: TestAlgo.dev.cc:82

◆ fillDescriptions()

static void ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducerToDevice::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 37 of file TestAlpakaStreamSynchronizingProducerToDevice.cc.

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

37  {
39 
41  psetSize.add<int32_t>("alpaka_serial_sync");
42  psetSize.add<int32_t>("alpaka_cuda_async");
43  psetSize.add<int32_t>("alpaka_rocm_async");
44  desc.add("size", psetSize);
45 
46  descriptions.addWithDefaultLabel(desc);
47  }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)

◆ produce()

void ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducerToDevice::produce ( device::Event iEvent,
device::EventSetup const &  iSetup 
)
inlineoverridevirtual

Member Data Documentation

◆ algo_

TestAlgo ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducerToDevice::algo_
private

Definition at line 54 of file TestAlpakaStreamSynchronizingProducerToDevice.cc.

Referenced by acquire().

◆ deviceProduct_

std::unique_ptr<portabletest::TestDeviceCollection> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducerToDevice::deviceProduct_
private

Definition at line 56 of file TestAlpakaStreamSynchronizingProducerToDevice.cc.

Referenced by acquire(), and produce().

◆ putToken_

const device::EDPutToken<portabletest::TestDeviceCollection> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducerToDevice::putToken_
private

Definition at line 50 of file TestAlpakaStreamSynchronizingProducerToDevice.cc.

Referenced by produce().

◆ size_

const int32_t ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaStreamSynchronizingProducerToDevice::size_
private

Definition at line 51 of file TestAlpakaStreamSynchronizingProducerToDevice.cc.

Referenced by acquire().