Skip to content
Snippets Groups Projects

Refactor access traits

Merged Arndt, Daniel requested to merge github/fork/dalg24/refactor_access_traits into master

Created by: dalg24

  • Added 2nd template argument to indicate that access traits are for the BVH constructor
  • Geometry tag is deduced from the return type of Traits::Access::<Primitives,PrimitivesTag>::get()

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
23 23 namespace Traits
24 24 {
25 25
26 template <typename T, typename Enable = void>
26 struct PrimitivesTag
27 {
28 };
29
30 struct PredicatesTag
31 {
32 };
33
34 template <typename T, typename Tag, typename Enable = void>
  • Arndt, Daniel
    Arndt, Daniel @6da started a thread on commit 4347482b
  • 219 219 Box const &scene_bounding_box)
    220 220 {
    221 221 using Access = typename Traits::Access<Primitives, Traits::PrimitivesTag>;
    222 using ExecutionSpace = typename Access::MemorySpace::execution_space;
    222 using ExecutionSpace = typename Access::memory_space::execution_space;
  • Arndt, Daniel
    Arndt, Daniel @6da started a thread on commit 4347482b
  • 213 213 Kokkos::fence();
    214 214 }
    215 215
    216 template <typename Primitives>
    217 struct GeometryTagHelper
    218 {
    219 private:
    220 using accessor_return_type = std::decay_t<decltype(
    221 Traits::Access<Primitives, Traits::PrimitivesTag>::get(
    222 std::declval<Primitives const &>(), std::declval<int>()))>;
    • Author Owner

      Created by: Rombur

      So this looks good but I wonder of the implications. Does that mean that we won't respect cv qualifiers?

  • Arndt, Daniel
    Arndt, Daniel @6da started a thread on commit 4347482b
  • 23 23 namespace Traits
    24 24 {
    25 25
    26 template <typename T, typename Enable = void>
    26 struct PrimitivesTag
    27 {
    28 };
    29
    30 struct PredicatesTag
    31 {
    32 };
    33
    34 template <typename T, typename Tag, typename Enable = void>
  • Arndt, Daniel
    Arndt, Daniel @6da started a thread on commit 4347482b
  • 219 219 Box const &scene_bounding_box)
    220 220 {
    221 221 using Access = typename Traits::Access<Primitives, Traits::PrimitivesTag>;
    222 using ExecutionSpace = typename Access::MemorySpace::execution_space;
    222 using ExecutionSpace = typename Access::memory_space::execution_space;
  • Arndt, Daniel
    Arndt, Daniel @6da started a thread on commit 4347482b
  • 213 213 Kokkos::fence();
    214 214 }
    215 215
    216 template <typename Primitives>
    217 struct GeometryTagHelper
    218 {
    219 private:
    220 using accessor_return_type = std::decay_t<decltype(
    221 Traits::Access<Primitives, Traits::PrimitivesTag>::get(
    222 std::declval<Primitives const &>(), std::declval<int>()))>;
    • Author Owner

      Created by: dalg24

      No it means that it is up to the user if he wants to store ArborX geometric objects and return references or generate them on the fly. We don't care about cv qualifiers, all we need to know is was it a point or a box.

    Please register or sign in to reply
    Loading