70 using IntCritAcc =
typename InteractCrit::Access;
71 using IntCritVals =
typename IntCritAcc::ObjectValues;
74 sycl::range<1> walkers_range;
78 sycl::accessor<u32, 1, sycl::access::mode::read, sycl::target::device> rchild_id;
79 sycl::accessor<u32, 1, sycl::access::mode::read, sycl::target::device> lchild_id;
80 sycl::accessor<u8, 1, sycl::access::mode::read, sycl::target::device> rchild_flag;
81 sycl::accessor<u8, 1, sycl::access::mode::read, sycl::target::device> lchild_flag;
83 IntCritAcc criterion_acc;
85 static constexpr auto get_tree_depth = []() ->
u32 {
86 if constexpr (std::is_same<u_morton, u32>::value) {
89 if constexpr (std::is_same<u_morton, u64>::value) {
95 static constexpr u32 tree_depth = get_tree_depth();
96 static constexpr u32 _nindex = 4294967295;
104 sycl::handler &device_handle,
106 : rchild_id{*tree_struct.buf_rchild_id, device_handle, sycl::read_only},
107 lchild_id{*tree_struct.buf_lchild_id, device_handle, sycl::read_only},
108 rchild_flag{*tree_struct.buf_rchild_flag, device_handle, sycl::read_only},
109 lchild_flag{*tree_struct.buf_lchild_flag, device_handle, sycl::read_only},
110 criterion_acc(crit, device_handle), walkers_range{walker_count},
111 leaf_offset(tree_struct.internal_cell_count),
112 one_cell_mode(tree_struct.one_cell_mode) {}
114 inline sycl::range<1> get_sycl_range() {
return walkers_range; }
116 inline IntCritAcc criterion()
const {
return criterion_acc; }
118 template<
class FuncNodeFound,
class FuncNodeReject>
119 inline void for_each_node(
121 IntCritVals int_values,
122 FuncNodeFound &&found_case,
123 FuncNodeReject &&reject_case)
const;
133 return Accessed(tree_struct, walker_count, device_handle, crit);