Loading src/tree/tree.c +11 −0 Original line number Diff line number Diff line Loading @@ -1232,6 +1232,17 @@ top_kdtree_node_t* top_tree_generate_node(global_context_t* ctx, top_kdtree_t* t } void tree_print(global_context_t* ctx, top_kdtree_node_t* root) { MPI_DB_PRINT("Node: \n\tsplit_dim %d \n\tdata %lf", root -> split_dim, root -> data); MPI_DB_PRINT("\n\towner %d", root -> owner); MPI_DB_PRINT("\n\tbox "); for(size_t d = 0; d < ctx -> dims; ++d) MPI_DB_PRINT("d%d:[%lf, %lf] ",(int)d, root -> lb_node_box[d], root -> lb_node_box[d]); MPI_DB_PRINT("\n"); if(root -> lch) tree_print(ctx, root -> lch); if(root -> rch) tree_print(ctx, root -> rch); } void build_top_kdtree(global_context_t *ctx, pointset_t *og_pointset, top_kdtree_t *tree, int n_bins, float_t tolerance) { size_t tot_n_points = 0; Loading Loading
src/tree/tree.c +11 −0 Original line number Diff line number Diff line Loading @@ -1232,6 +1232,17 @@ top_kdtree_node_t* top_tree_generate_node(global_context_t* ctx, top_kdtree_t* t } void tree_print(global_context_t* ctx, top_kdtree_node_t* root) { MPI_DB_PRINT("Node: \n\tsplit_dim %d \n\tdata %lf", root -> split_dim, root -> data); MPI_DB_PRINT("\n\towner %d", root -> owner); MPI_DB_PRINT("\n\tbox "); for(size_t d = 0; d < ctx -> dims; ++d) MPI_DB_PRINT("d%d:[%lf, %lf] ",(int)d, root -> lb_node_box[d], root -> lb_node_box[d]); MPI_DB_PRINT("\n"); if(root -> lch) tree_print(ctx, root -> lch); if(root -> rch) tree_print(ctx, root -> rch); } void build_top_kdtree(global_context_t *ctx, pointset_t *og_pointset, top_kdtree_t *tree, int n_bins, float_t tolerance) { size_t tot_n_points = 0; Loading