26 std::vector<u64> &result_tree_linked_patch_id,
34 PtNode n = ptn.
convert(box_transform);
36 max_level = sycl::max((
u32) ptn.tree_node.
level, max_level);
38 u64 id_nvec = counter;
39 result_tree.push_back(n);
40 result_tree_linked_patch_id.push_back(ptn.linked_patchid);
47 u64 old_id0 = ptn.get_child_nid(0);
48 u64 old_id1 = ptn.get_child_nid(1);
49 u64 old_id2 = ptn.get_child_nid(2);
50 u64 old_id3 = ptn.get_child_nid(3);
51 u64 old_id4 = ptn.get_child_nid(4);
52 u64 old_id5 = ptn.get_child_nid(5);
53 u64 old_id6 = ptn.get_child_nid(6);
54 u64 old_id7 = ptn.get_child_nid(7);
56 result_tree.at(id_nvec).childs_id[0] = counter;
61 result_tree_linked_patch_id,
66 result_tree.at(id_nvec).childs_id[1] = counter;
71 result_tree_linked_patch_id,
76 result_tree.at(id_nvec).childs_id[2] = counter;
81 result_tree_linked_patch_id,
86 result_tree.at(id_nvec).childs_id[3] = counter;
91 result_tree_linked_patch_id,
96 result_tree.at(id_nvec).childs_id[4] = counter;
101 result_tree_linked_patch_id,
106 result_tree.at(id_nvec).childs_id[5] = counter;
107 get_serial_tree<vec>(
111 result_tree_linked_patch_id,
116 result_tree.at(id_nvec).childs_id[6] = counter;
117 get_serial_tree<vec>(
121 result_tree_linked_patch_id,
126 result_tree.at(id_nvec).childs_id[7] = counter;
127 get_serial_tree<vec>(
131 result_tree_linked_patch_id,
138template void get_serial_tree(
142 std::vector<u64> &result_tree_linked_patch_id,
146template void get_serial_tree(
150 std::vector<u64> &result_tree_linked_patch_id,
155template void get_serial_tree(
159 std::vector<u64> &result_tree_linked_patch_id,
170 for (
u64 root_id : ptree.roots_id) {
172 roots_ids.push_back(cnt);
173 shamlog_debug_ln(
"Serial Patch Tree",
"get serial tree fp32 root id :", root_id);
174 get_serial_tree<f32_3>(
175 root_id, ptree, serial_tree, linked_patch_ids, cnt, level_count, box_transform);
178 shamlog_debug_ln(
"Serial Patch Tree",
"tree cell count = ", serial_tree.size());
179 shamlog_debug_ln(
"Serial Patch Tree",
"level_count =", level_count);
188 for (
u64 root_id : ptree.roots_id) {
190 roots_ids.push_back(cnt);
191 get_serial_tree<f64_3>(
192 root_id, ptree, serial_tree, linked_patch_ids, cnt, level_count, box_transform);
194 shamlog_debug_ln(
"Serial Patch Tree",
"tree cell count = ", serial_tree.size());
195 shamlog_debug_ln(
"Serial Patch Tree",
"level_count =", level_count);
204 for (
u64 root_id : ptree.roots_id) {
206 roots_ids.push_back(cnt);
207 get_serial_tree<i64_3>(
208 root_id, ptree, serial_tree, linked_patch_ids, cnt, level_count, box_transform);
210 shamlog_debug_ln(
"Serial Patch Tree",
"tree cell count = ", serial_tree.size());
211 shamlog_debug_ln(
"Serial Patch Tree",
"level_count =", level_count);
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
u32 level
Level of the tree node.
Node information in the patchtree + held patch info.
SerialPatchNode< vec > convert(const shamrock::patch::PatchCoordTransform< vec > box_transform)
Convert PatchTreeNode to SerialPatchNode using given coordinate transform.
Patch Tree : Tree structure organisation for an abstract list of patches Nb : this tree is compatible...
std::unordered_map< u64, Node > tree
store the tree using a map