diff --git a/3rd-party/treematch/fibo.h b/3rd-party/treematch/fibo.h index 32e0a7c082481b640323a7d4fb89d6c7f2f31600..f7239ce50b72a10341634c1b9718a34a6c303b17 100644 --- a/3rd-party/treematch/fibo.h +++ b/3rd-party/treematch/fibo.h @@ -101,13 +101,13 @@ typedef struct FiboTree_ { the algorithms have been de-recursived and written as macros. */ -#define fiboTreeLinkAfter(o,n) do { \ - FiboNode * nextptr; \ - nextptr = (o)->linkdat.nextptr; \ - (n)->linkdat.nextptr = nextptr; \ - (n)->linkdat.prevptr = (o); \ - nextptr->linkdat.prevptr = (n); \ - (o)->linkdat.nextptr = (n); \ +#define fiboTreeLinkAfter(o,n) do { \ + FiboNode * nextptr_loc; \ + nextptr_loc = (o)->linkdat.nextptr; \ + (n)->linkdat.nextptr = nextptr_loc; \ + (n)->linkdat.prevptr = (o); \ + nextptr_loc->linkdat.prevptr = (n); \ + (o)->linkdat.nextptr = (n); \ } while (0) #define fiboTreeUnlink(n) do { \ diff --git a/3rd-party/treematch/tm_topology.c b/3rd-party/treematch/tm_topology.c index 2c05c91dccb9f4970885688bea69cf02dec4e518..dd55e02899ba0d0448163982459c76d3e940227e 100644 --- a/3rd-party/treematch/tm_topology.c +++ b/3rd-party/treematch/tm_topology.c @@ -575,7 +575,7 @@ int tm_topology_add_binding_constraints(char *constraints_filename, tm_topology } -void topology_numbering_cpy(tm_topology_t *topology,int **numbering,int *nb_nodes) +void topology_numbering_cpy(tm_topology_t *topology,int **numbering_loc,int *nb_nodes) { int nb_levels; unsigned int vl = tm_get_verbose_level(); @@ -584,8 +584,8 @@ void topology_numbering_cpy(tm_topology_t *topology,int **numbering,int *nb_node *nb_nodes = topology->nb_nodes[nb_levels-1]; if(vl >= INFO) printf("nb_nodes=%d\n",*nb_nodes); - *numbering = (int*)MALLOC(sizeof(int)*(*nb_nodes)); - memcpy(*numbering,topology->node_id,sizeof(int)*(*nb_nodes)); + *numbering_loc = (int*)MALLOC(sizeof(int)*(*nb_nodes)); + memcpy(*numbering_loc,topology->node_id,sizeof(int)*(*nb_nodes)); } void topology_arity_cpy(tm_topology_t *topology,int **arity,int *nb_levels) @@ -699,7 +699,7 @@ void optimize_arity(int **arity, double **cost, int *nb_levels,int n) void tm_optimize_topology(tm_topology_t **topology){ int *arity = NULL,nb_levels; - int *numbering = NULL,nb_nodes; + int *numbering_loc = NULL,nb_nodes; tm_topology_t *new_topo; double *cost; unsigned int vl = tm_get_verbose_level(); @@ -710,13 +710,13 @@ void tm_optimize_topology(tm_topology_t **topology){ tm_display_arity(*topology); topology_arity_cpy(*topology,&arity,&nb_levels); - topology_numbering_cpy(*topology,&numbering,&nb_nodes); + topology_numbering_cpy(*topology,&numbering_loc,&nb_nodes); topology_constraints_cpy(*topology,&constraints,&nb_constraints); topology_cost_cpy(*topology,&cost); optimize_arity(&arity,&cost,&nb_levels,nb_levels-2); - new_topo = tm_build_synthetic_topology(arity, NULL, nb_levels,numbering,nb_nodes); + new_topo = tm_build_synthetic_topology(arity, NULL, nb_levels,numbering_loc,nb_nodes); new_topo->cost = cost; new_topo->constraints = constraints; new_topo->nb_constraints = nb_constraints; @@ -736,7 +736,7 @@ void tm_optimize_topology(tm_topology_t **topology){ tm_display_arity(new_topo); } FREE(arity); - FREE(numbering); + FREE(numbering_loc); tm_free_topology(*topology); *topology = new_topo; diff --git a/3rd-party/treematch/tm_tree.c b/3rd-party/treematch/tm_tree.c index 11d3e46a2db32f761e2bdbc5cb88ca47a03def1b..f0c8d77656b9cf1451a7b809c0cc950af51cff6a 100644 --- a/3rd-party/treematch/tm_tree.c +++ b/3rd-party/treematch/tm_tree.c @@ -1793,7 +1793,7 @@ void group_nodes(tm_affinity_mat_t *aff_mat, tm_tree_t *tab_node, tm_tree_t *new /* if(nb_groups>30000||depth>5){*/ if( nbg > 30000 ){ - double duration; + double duration_loc; TIC; if( arity <= 2 ){ @@ -1811,9 +1811,9 @@ void group_nodes(tm_affinity_mat_t *aff_mat, tm_tree_t *tab_node, tm_tree_t *new val = k_partition_grouping(cost_mat, tab_node, new_tab_node, arity, solution_size); } - duration = TOC; + duration_loc = TOC; if(verbose_level >= INFO) - printf("Fast grouping duration=%f\n", duration); + printf("Fast grouping duration=%f\n", duration_loc); if(verbose_level >= INFO) display_grouping(new_tab_node, solution_size, arity, val);