24 template <
class TView, DeviceBackend B>
27 static_assert(std::is_trivially_copyable_v<TView> && std::is_default_constructible_v<TView>,
28 "view elements must be trivially_copyable and default_constructible");
33 template <
class TGetView>
37 for (int32_t i = 0; i < nViews; i++)
38 views[i] = GetView(i);
45 return views.template deviceView<B>();
Device memory abstraction layer with backend-specific storage and factory creation.
Host-device vector types with optional GPU storage and device-side views.
Host + optional device vector of trivially copyable T.
the host side operators are provided as implemented
Contiguous host_device_vector of non-owning views, mirrored on a device.
host_device_vector< TView > views
Vector of per-entry views, with a device mirror.
deviceViewVector(int32_t nViews, TGetView &&GetView)
Build nViews views via GetView(i) and transfer them to device.
auto deviceView()
Device-side span over the stored views.