Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HeterogeneousCore_AlpakaCore_interface_alpaka_typelookup_h
0002 #define HeterogeneousCore_AlpakaCore_interface_alpaka_typelookup_h
0003 
0004 #include "FWCore/Utilities/interface/typelookup.h"
0005 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/ESDeviceProduct.h"
0006 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0007 
0008 // TODO: this place is suboptimal given that the framework's
0009 // typelookup.h is in FWCore/Utilities (i.e. independent of the
0010 // framework itself). The ESDeviceProduct should be in the same
0011 // package.
0012 
0013 // Models 1 and 3 for ESProducts with Alpaka: ESProduct class is defined in ALPAKA_ACCELERATOR_NAMESPACE
0014 
0015 // force expanding ALPAKA_ACCELERATOR_NAMESPACE before stringification inside TYPELOOKUP_DATA_REG
0016 #define TYPELOOKUP_ALPAKA_DATA_REG2(name) TYPELOOKUP_DATA_REG(name)
0017 #define TYPELOOKUP_ALPAKA_DATA_REG(name) \
0018   TYPELOOKUP_ALPAKA_DATA_REG2(ALPAKA_ACCELERATOR_NAMESPACE::ESDeviceProduct<ALPAKA_ACCELERATOR_NAMESPACE::name>)
0019 
0020 // Model 2 for ESProducts with Alpaka: ESProduct class templated over device type
0021 // TODO: should really instantiated and registered per "memory space" rather than per backend
0022 
0023 // force expanding ALPAKA_ACCELERATOR_NAMESPACE before stringification inside TYPELOOKUP_DATA_REG
0024 #define TYPELOOKUP_ALPAKA_TEMPLATED_DATA_REG2(name) TYPELOOKUP_DATA_REG(name)
0025 #define TYPELOOKUP_ALPAKA_TEMPLATED_DATA_REG(name) \
0026   TYPELOOKUP_ALPAKA_TEMPLATED_DATA_REG2(           \
0027       ALPAKA_ACCELERATOR_NAMESPACE::ESDeviceProduct<name<ALPAKA_ACCELERATOR_NAMESPACE::Device>>)
0028 
0029 #endif