1 #ifndef DataFormats_Portable_interface_PortableDeviceObject_h 2 #define DataFormats_Portable_interface_PortableDeviceObject_h 8 #include <alpaka/alpaka.hpp> 14 template <
typename T,
typename TDev,
typename = std::enable_if_t<alpaka::isDevice<TDev>>>
16 static_assert(not std::is_same_v<TDev, alpaka_common::DevHost>,
17 "Use PortableHostObject<T> instead of PortableDeviceObject<T, DevHost>");
28 :
buffer_{cms::alpakatools::make_device_buffer<Product>(device)} {
32 template <
typename TQueue,
typename = std::enable_if_t<alpaka::isQueue<TQueue>>>
35 :
buffer_{cms::alpakatools::make_device_buffer<Product>(
queue)} {
72 #endif // DataFormats_Portable_interface_PortableDeviceObject_h Product const & operator*() const
PortableDeviceObject(TQueue const &queue)
~PortableDeviceObject()=default
Product const & value() const
ConstBuffer buffer() const
PortableDeviceObject()=default
PortableDeviceObject(TDev const &device)
cms::alpakatools::device_buffer< TDev, Product > Buffer
Product const * data() const
std::optional< Buffer > buffer_
ConstBuffer const_buffer() const
cms::alpakatools::const_device_buffer< TDev, Product > ConstBuffer
PortableDeviceObject & operator=(PortableDeviceObject const &)=delete
Product const * operator->() const