template<int dim, typename Number, typename MemorySpace, typename Object>
class ryujin::SelectView< dim, Number, MemorySpace, Object >
A small helper class that stores a scalar and a vectorized view of an equation object object (such as the hyperbolic system, the indicator, the limiter, or the wave speed estimator) and hands out the appropriate one depending on the number type T that the loop body operates on.
This is meant to be used in conjunction with loop(): the loop body receives a "sentinel" of the number type it operates on and simply queries the matching view:
const auto views = make_select_view<dim, Number, MemorySpace>(object);
const auto body = [=](auto sentinel, unsigned int i) {
using T = decltype(sentinel);
const auto view = views.template view<T>();
};
DEAL_II_HOST_DEVICE_ALWAYS_INLINE const auto & view() const
- Note
- This class is meant to be captured by value in computation loops with access to either the host or device memory space. Both views are created on the host in the constructor, the view() access operator is host and device callable.
Definition at line 640 of file gpu.h.