Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-11-24 00:02:24

0001 #ifndef HeterogeneousCore_AlpakaTest_plugins_alpaka_TestHelperClass_h
0002 #define HeterogeneousCore_AlpakaTest_plugins_alpaka_TestHelperClass_h
0003 
0004 #include "DataFormats/PortableTestObjects/interface/TestHostCollection.h"
0005 #include "DataFormats/PortableTestObjects/interface/alpaka/TestDeviceCollection.h"
0006 #include "FWCore/Framework/interface/ConsumesCollector.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/EDPutToken.h"
0009 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/ESGetToken.h"
0010 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/Event.h"
0011 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/EventSetup.h"
0012 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0013 #include "HeterogeneousCore/AlpakaTest/interface/AlpakaESTestRecords.h"
0014 #include "HeterogeneousCore/AlpakaTest/interface/ESTestData.h"
0015 #include "HeterogeneousCore/AlpakaTest/interface/alpaka/AlpakaESTestData.h"
0016 
0017 namespace ALPAKA_ACCELERATOR_NAMESPACE {
0018   class TestHelperClass {
0019   public:
0020     TestHelperClass(edm::ParameterSet const& iConfig, edm::ConsumesCollector iC);
0021 
0022     void makeAsync(device::Event const& iEvent, device::EventSetup const& iSetup);
0023 
0024     portabletest::TestHostCollection moveFrom() { return std::move(hostProduct_); }
0025 
0026   private:
0027     const device::EDGetToken<portabletest::TestDeviceCollection> getToken_;
0028     const edm::ESGetToken<cms::alpakatest::ESTestDataA, AlpakaESTestRecordA> esTokenHost_;
0029     const device::ESGetToken<AlpakaESTestDataCDevice, AlpakaESTestRecordC> esTokenDevice_;
0030 
0031     // hold the output product between acquire() and produce()
0032     portabletest::TestHostCollection hostProduct_;
0033   };
0034 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE
0035 
0036 #endif