Wiki should explain GeometryTraits and AccessTraits. Currently, it only explains access traits.
In addition, some of the crucial classes and functions (like BoundingVolumeHierarchy) should include what type of traits inputs should have. For example, BVH class will fail if you pass attach_indices(make_nearest(<values>, 1)), because attach_indices underlying data structure should also always have GeometryTraits. It will fail and will give a compile-time error if it does not have both AccessTraits and GeometryTraits:
|
Details::check_valid_access_traits(user_values); |
|
|
|
using Values = Details::AccessValues<UserValues>; |
|
Values values{user_values}; // NOLINT |
|
|
|
static_assert( |
|
Details::KokkosExt::is_accessible_from<typename Values::memory_space, |
|
ExecutionSpace>::value, |
|
"Values must be accessible from the execution space"); |
|
|
|
constexpr int DIM = GeometryTraits::dimension_v<BoundingVolume>; |
|
|
|
Details::check_valid_space_filling_curve<DIM>(curve); |
The good example is query(...) function, since it already have this documentation
Wiki should explain
GeometryTraitsandAccessTraits. Currently, it only explains access traits.In addition, some of the crucial classes and functions (like
BoundingVolumeHierarchy) should include what type of traits inputs should have. For example, BVH class will fail if you passattach_indices(make_nearest(<values>, 1)), becauseattach_indicesunderlying data structure should also always haveGeometryTraits. It will fail and will give a compile-time error if it does not have both AccessTraits and GeometryTraits:ArborX/src/spatial/ArborX_LinearBVH.hpp
Lines 187 to 199 in c831cd3
The good example is
query(...)function, since it already have this documentation