diff --git a/CUDADataFormats/HcalCommon/interface/Common.h b/CUDADataFormats/HcalCommon/interface/Common.h index 1a2592889a6c7..53d49d06a89d1 100644 --- a/CUDADataFormats/HcalCommon/interface/Common.h +++ b/CUDADataFormats/HcalCommon/interface/Common.h @@ -4,6 +4,7 @@ #include #include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h" +#include "HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h" namespace hcal { namespace common { @@ -13,6 +14,7 @@ namespace hcal { struct Vec {}; struct Ptr {}; + struct DevPtr {}; } // namespace tags @@ -24,6 +26,11 @@ namespace hcal { uint32_t size; }; + template<> + struct AddSize { + uint32_t size; + }; + struct ViewStoragePolicy { using TagType = tags::Ptr; @@ -33,6 +40,15 @@ namespace hcal { }; }; + struct DevStoragePolicy { + using TagType = tags::DevPtr; + + template + struct StorageSelector { + using type = cms::cuda::device::unique_ptr; + }; + }; + template