Revert "tmp"
authoryu.dongliang <18588496441@163.com>
Sat, 11 Nov 2023 07:19:55 +0000 (15:19 +0800)
committeryu.dongliang <18588496441@163.com>
Sat, 11 Nov 2023 07:19:55 +0000 (15:19 +0800)
This reverts commit a4bc411a63b6464c5b5f5d6ad3739f4f804e80b4.

ses_core.h
ses_graph.h
ses_layout.c

index 3a08b02a7a95066e44315dc43497b6983687c845..431968d93a6af0180778c59ddb4b7b1b1132df5b 100644 (file)
@@ -220,25 +220,4 @@ static inline void ses_merge_r(double* tr, double* jtr, double r0, double jr0, d
        *jtr = jr0 / -R;
 }
 
-static int ses_vertex_cmp_edges(const void* v0, const void* v1)
-{
-       const ses_vertex_t* sv0 = *(const ses_vertex_t**)v0;
-       const ses_vertex_t* sv1 = *(const ses_vertex_t**)v1;
-
-       const ScfEcomponent* c0 = sv0->data;
-       const ScfEcomponent* c1 = sv1->data;
-
-       if (sv0->edges->size > sv1->edges->size)
-               return -1;
-       if (sv0->edges->size < sv1->edges->size)
-               return 1;
-
-       if (SCF_EDA_NPN == c0->type)
-               return -1;
-       if (SCF_EDA_NPN == c1->type)
-               return 1;
-
-       return 0;
-}
-
 #endif
index 249803c557a0e8dd94f8cbe2e312dc283f7736f5..459920eb1b37e2fa7938cf974fcdc01a8d0922ee 100644 (file)
@@ -21,6 +21,18 @@ void          ses_vertex_free (ses_vertex_t* v);
 int           ses_graph_kcolor(ses_graph_t* graph, int k, scf_vector_t* colors);
 
 
+static int ses_vertex_cmp_edges(const void* v0, const void* v1)
+{
+       const ses_vertex_t* sv0 = *(const ses_vertex_t**)v0;
+       const ses_vertex_t* sv1 = *(const ses_vertex_t**)v1;
+
+       if (sv0->edges->size > sv1->edges->size)
+               return -1;
+       if (sv0->edges->size < sv1->edges->size)
+               return 1;
+       return 0;
+}
+
 static int ses_vertex_cmp(const void* v0, const void* v1)
 {
        const ses_vertex_t* sv0 = v0;
index 2ce14944bea55e406094a855be2ca66f2c250514..43853acaf916fc51c4335525fecb8bf04fb25639 100644 (file)
@@ -1180,18 +1180,16 @@ static int __ses_de_cross(ScfEfunction* f, int d)
                        scf_loge("**********\n");
                }
 
-               int n = 0;
                for (i = 0; i < graph->size; i++) {
                        v         = graph->data[i];
 
                        if (v->color < 0) {
-                               c = v->data;
                                scf_loge("j: %ld, i: %ld, c%ld->color: %ld\n", j, i, c->id, v->color);
-                               n++;
+                               break;
                        }
                }
 
-               if (n > 0)
+               if (i < graph->size)
                        break;
 
                for (i = 0; i < graph->size; i++) {