Celeritas
0.5.0-86+4a8eea4
|
Apply a functor to a type-deleted local surface. More...
#include <LocalSurfaceVisitor.hh>
Public Types | |
Type aliases | |
using | ParamsRef = NativeCRef< OrangeParamsData > |
Public Member Functions | |
CELER_FUNCTION | LocalSurfaceVisitor (ParamsRef const ¶ms, SurfacesRecord const &local_surfaces) |
Construct from ORANGE data ans local surfaces. More... | |
CELER_FUNCTION | LocalSurfaceVisitor (ParamsRef const ¶ms, SimpleUnitId unit) |
Construct from ORANGE data with surfaces from a simple unit. | |
template<class F > | |
decltype(auto) CELER_FUNCTION | operator() (F &&typed_visitor, LocalSurfaceId t) |
template<class T , class U > | |
CELER_FORCEINLINE_FUNCTION T | get_item (Items< T > const &items, ItemRange< T > const &offsets, ItemId< U > item) |
Get a pointer to the item offset using the given range in a given collection. | |
Apply a functor to a type-deleted local surface.
An instance of this class is like std::visit
but accepting a LocalSurfaceId
rather than a std::variant
.
Example:
|
inline |
Construct from ORANGE data ans local surfaces.
This is meant to be called from inside a simple unit tracker.