void _far (VsgPRTree2dNodeInfo *one_info, VsgPRTree2dNodeInfo *other_info, gint *err) { ((NodeCounter *) one_info->user_data)->out_count += ((NodeCounter *) other_info->user_data)->in_count; ((NodeCounter *) other_info->user_data)->out_count += ((NodeCounter *) one_info->user_data)->in_count; if ((one_info->point_count == 0 && VSG_PRTREE2D_NODE_INFO_IS_LOCAL (one_info)) || (other_info->point_count == 0 && VSG_PRTREE2D_NODE_INFO_IS_LOCAL (other_info))) g_printerr ("%d : unnecessary far call\n", rk); _far_count ++; }
gboolean _far (VsgPRTree2dNodeInfo *one_info, VsgPRTree2dNodeInfo *other_info, gint *err) { ((NodeCounter *) one_info->user_data)->out_count += ((NodeCounter *) other_info->user_data)->in_count; ((NodeCounter *) other_info->user_data)->out_count += ((NodeCounter *) one_info->user_data)->in_count; if ((one_info->point_count == 0 && VSG_PRTREE2D_NODE_INFO_IS_LOCAL (one_info)) || (other_info->point_count == 0 && VSG_PRTREE2D_NODE_INFO_IS_LOCAL (other_info))) g_printerr ("%d : unnecessary far call\n", rk); if (_do_write && VSG_PRTREE2D_NODE_INFO_IS_REMOTE (one_info)) { gchar fn[1024]; FILE *f; sprintf (fn, "comm-%03d.svg", rk); f = fopen (fn, "a"); fprintf (f, "<!--s=%d--><polyline points=\"%g,%g %g,%g\" " \ "style=\"stroke:#0000FF;\"/>\n", rk, one_info->center.x, -one_info->center.y, other_info->center.x, -other_info->center.y); fclose (f); } _far_count ++; { long i, j = 0; for (i = 0; i< _far_slowdown; i++) { j = j + i; } return j == _far_slowdown*(_far_slowdown-1)/2; } return TRUE; }