77
88#include < alpaka/alpaka.hpp>
99
10+ #include " DataFormats/Common/interface/Uninitialized.h"
11+ #include " DataFormats/Portable/interface/PortableCollectionCommon.h"
1012#include " HeterogeneousCore/AlpakaInterface/interface/config.h"
1113#include " HeterogeneousCore/AlpakaInterface/interface/memory.h"
12- #include " DataFormats/Portable/interface/PortableCollectionCommon.h"
1314
1415// generic SoA-based product in device memory
1516template <typename T, typename TDev, typename = std::enable_if_t <alpaka::isDevice<TDev>>>
@@ -24,7 +25,9 @@ class PortableDeviceCollection {
2425 using Buffer = cms::alpakatools::device_buffer<TDev, std::byte[]>;
2526 using ConstBuffer = cms::alpakatools::const_device_buffer<TDev, std::byte[]>;
2627
27- PortableDeviceCollection () = default ;
28+ PortableDeviceCollection () = delete ;
29+
30+ explicit PortableDeviceCollection (edm::Uninitialized) noexcept {}
2831
2932 PortableDeviceCollection (int32_t elements, TDev const & device)
3033 : buffer_{cms::alpakatools::make_device_buffer<std::byte[]>(device, Layout::computeDataSize (elements))},
@@ -144,7 +147,9 @@ class PortableDeviceMultiCollection {
144147 }
145148
146149public:
147- PortableDeviceMultiCollection () = default ;
150+ PortableDeviceMultiCollection () = delete ;
151+
152+ explicit PortableDeviceMultiCollection (edm::Uninitialized) noexcept {};
148153
149154 PortableDeviceMultiCollection (int32_t elements, TDev const & device)
150155 : buffer_{cms::alpakatools::make_device_buffer<std::byte[]>(device, Layout<>::computeDataSize (elements))},
0 commit comments