31 sycl::accessor<TgridVec, 1, sycl::access::mode::read, sycl::target::device> acc_block_min;
32 sycl::accessor<TgridVec, 1, sycl::access::mode::read, sycl::target::device> acc_block_max;
39 sycl::buffer<TgridVec> &buf_block_min,
40 sycl::buffer<TgridVec> &buf_block_max,
42 : block_looper(tree, cgh), acc_block_min{buf_block_min, cgh, sycl::read_only},
43 acc_block_max{buf_block_max, cgh, sycl::read_only},
44 dir_offset(std::move(dir_offset)) {}
46 template<
class IndexFunctor>
47 void for_each_other_index(
u32 id_a, IndexFunctor &&fct)
const {
54 block_aabb.
lower + dir_offset, block_aabb.upper + dir_offset};
56 block_looper.rtree_for(
57 [&](
u32 node_id, TgridVec bmin, TgridVec bmax) ->
bool {
60 .is_volume_not_null();
78 auto edges = get_edges();
80 edges.spans_block_min.check_sizes(edges.sizes.indexes);
81 edges.spans_block_max.check_sizes(edges.sizes.indexes);
86 u32 leaf_count = tree.tree_reduced_morton_codes.tree_leaf_count;
87 u32 internal_cell_count = tree.tree_struct.internal_cell_count;
88 u32 tot_count = leaf_count + internal_cell_count;
90 OrientedAMRGraph result;
94 sycl::buffer<TgridVec> &tree_bmin
96 sycl::buffer<TgridVec> &tree_bmax
102 sycl::buffer<TgridVec> buf_block_min_sycl = block_min.get_buf().copy_to_sycl_buffer();
103 sycl::buffer<TgridVec> buf_block_max_sycl = block_max.get_buf().copy_to_sycl_buffer();
105 for (
u32 dir = 0; dir < 6; dir++) {
107 TgridVec dir_offset = result.offset_check[dir];
109 AMRGraph rslt = details::compute_neigh_graph_deprecated<AMRBlockFinder>(
110 shamsys::instance::get_compute_scheduler_ptr(),
111 edges.sizes.indexes.get(
id),
118 "AMR Block Graph",
"Patch",
id,
"direction", dir,
"link cnt", rslt.link_count);
120 std::unique_ptr<AMRGraph> tmp_graph = std::make_unique<AMRGraph>(std::move(rslt));
122 result.graph_links[dir] = std::move(tmp_graph);
125 graph.
add_obj(
id, std::move(result));
128 edges.block_neigh_graph.graph = std::move(graph);
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...