CMS 3D CMS Logo

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

Public Member Functions

void produce (device::Event &event, device::EventSetup const &) override
 
 TestAlpakaProducer (edm::ParameterSet const &config)
 
- Public Member Functions inherited from ALPAKA_ACCELERATOR_NAMESPACE::stream::EDProducer<>
void produce (edm::Event &iEvent, edm::EventSetup const &iSetup) final
 
- Public Member Functions inherited from ALPAKA_ACCELERATOR_NAMESPACE::ProducerBase< edm::stream::EDProducer, Args... >
auto produces () noexcept
 
auto produces (std::string instanceName) noexcept
 
- Public Member Functions inherited from edm::stream::EDProducer< Args..., edm::Transformer >
 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 Attributes

TestAlgo algo_
 
const device::EDPutToken< portabletest::TestDeviceCollectiondeviceToken_
 
const int32_t size_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer< Args..., edm::Transformer >
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 19 of file TestAlpakaProducer.cc.

Constructor & Destructor Documentation

◆ TestAlpakaProducer()

ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaProducer::TestAlpakaProducer ( edm::ParameterSet const &  config)
inline

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 33 of file TestAlpakaProducer.cc.

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

33  {
35  desc.add<int32_t>("size");
36  descriptions.addWithDefaultLabel(desc);
37  }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ produce()

void ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaProducer::produce ( device::Event event,
device::EventSetup const &   
)
inlineoverridevirtual

Implements ALPAKA_ACCELERATOR_NAMESPACE::stream::EDProducer<>.

Definition at line 24 of file TestAlpakaProducer.cc.

References algo_, deviceToken_, ALPAKA_ACCELERATOR_NAMESPACE::TestAlgo::fill(), eostools::move(), and size_.

24  {
25  // run the algorithm, potentially asynchronously
26  portabletest::TestDeviceCollection deviceProduct{size_, event.queue()};
27  algo_.fill(event.queue(), deviceProduct);
28 
29  // put the asynchronous product into the event without waiting
30  event.emplace(deviceToken_, std::move(deviceProduct));
31  }
void fill(Queue &queue, portabletest::TestDeviceCollection &collection) const
Definition: TestAlgo.dev.cc:39
PortableCollection< TestSoA > TestDeviceCollection
const device::EDPutToken< portabletest::TestDeviceCollection > deviceToken_
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1

Member Data Documentation

◆ algo_

TestAlgo ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaProducer::algo_
private

Definition at line 44 of file TestAlpakaProducer.cc.

Referenced by produce().

◆ deviceToken_

const device::EDPutToken<portabletest::TestDeviceCollection> ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaProducer::deviceToken_
private

Definition at line 40 of file TestAlpakaProducer.cc.

Referenced by produce().

◆ size_

const int32_t ALPAKA_ACCELERATOR_NAMESPACE::TestAlpakaProducer::size_
private

Definition at line 41 of file TestAlpakaProducer.cc.

Referenced by produce().