|
DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
|
Contiguous host_device_vector of non-owning views, mirrored on a device. More...
#include <DeviceStorageHelper.hpp>
Public Member Functions | |
| template<class TGetView > | |
| 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. | |
Public Attributes | |
| host_device_vector< TView > | views |
| Vector of per-entry views, with a device mirror. | |
Contiguous host_device_vector of non-owning views, mirrored on a device.
Many CUDA kernels need "a vector of array views" – e.g., the per-cell adjacency views for a mesh, bundled into one flat array on the GPU. This helper takes a factory callback that produces the i-th view, stores all views in a host_device_vector, and pushes the result to the chosen backend in one call.
| TView | View type to store (must be trivially copyable). |
| B | Target device backend. |
Definition at line 25 of file DeviceStorageHelper.hpp.
|
inline |
Build nViews views via GetView(i) and transfer them to device.
Definition at line 34 of file DeviceStorageHelper.hpp.
|
inline |
Device-side span over the stored views.
Definition at line 43 of file DeviceStorageHelper.hpp.
| host_device_vector<TView> DNDS::deviceViewVector< TView, B >::views |
Vector of per-entry views, with a device mirror.
Definition at line 30 of file DeviceStorageHelper.hpp.