42 const sham::DeviceScheduler_ptr &dev_sched,
u32 graph_nodes, Args &&...args) {
44 auto &q = dev_sched->get_queue();
46 NeighFindKernel kergen(std::forward<Args>(args)...);
52 auto ker = kergen.get_read_access(deps);
56 auto e = q.submit(deps, [&](sycl::handler &cgh) {
57 shambase::parallel_for(cgh, graph_nodes,
"count block graph link", [=](
u64 gid) {
59 u32 block_found_count = 0;
61 ker.for_each_other_index(id_a, [&](
u32 id_b) {
65 ptr_link_cnt[id_a] = block_found_count;
70 kergen.complete_event_state(e);
73 link_counts.set_val_at_idx(graph_nodes, 0);
84 auto ker2 = kergen.get_read_access(deps);
88 auto e2 = q.submit(deps2, [&](sycl::handler &cgh) {
89 shambase::parallel_for(cgh, graph_nodes,
"get ids block graph link", [=](
u64 gid) {
92 u32 next_link_idx = cnt_offsets[id_a];
94 ker2.for_each_other_index(id_a, [&](
u32 id_b) {
95 links[next_link_idx] = id_b;
103 kergen.complete_event_state(e2);
108 .node_link_offset = std::move(link_cnt_offsets),
109 .node_links = std::move(ids_links),
110 .link_count = link_cnt,
111 .obj_cnt = graph_nodes});
129 const sham::DeviceScheduler_ptr &dev_sched,
u32 graph_nodes, Args &&...args) {
131 auto &q = dev_sched->get_queue();
140 auto e = q.submit(deps, [&](sycl::handler &cgh) {
141 NeighFindKernel ker(cgh, std::forward<Args>(args)...);
142 shambase::parallel_for(cgh, graph_nodes,
"count block graph link", [=](
u64 gid) {
144 u32 block_found_count = 0;
146 ker.for_each_other_index(id_a, [&](
u32 id_b) {
150 ptr_link_cnt[id_a] = block_found_count;
157 link_counts.set_val_at_idx(graph_nodes, 0);
171 auto e2 = q.submit(deps2, [&](sycl::handler &cgh) {
172 NeighFindKernel ker(cgh, std::forward<Args>(args)...);
173 shambase::parallel_for(cgh, graph_nodes,
"get ids block graph link", [=](
u64 gid) {
176 u32 next_link_idx = cnt_offsets[id_a];
178 ker.for_each_other_index(id_a, [&](
u32 id_b) {
179 links[next_link_idx] = id_b;
191 .node_link_offset = std::move(link_cnt_offsets),
192 .node_links = std::move(ids_links),
193 .link_count = link_cnt,
194 .obj_cnt = graph_nodes});
shammodels::basegodunov::modules::NeighGraph compute_neigh_graph(const sham::DeviceScheduler_ptr &dev_sched, u32 graph_nodes, Args &&...args)
Create a neighbour graph using a class that will list the ids of the found neighbourgh NeighFindKerne...