Revision: 52804
          http://brlcad.svn.sourceforge.net/brlcad/?rev=52804&view=rev
Author:   r_weiss
Date:     2012-10-04 21:08:36 +0000 (Thu, 04 Oct 2012)
Log Message:
-----------
Updated function "make_near_list" in file "nmg_pt_fu.c". Changed a "double" to 
"fastf_t" and added the "UNLIKELY" macro to improve performance.

Modified Paths:
--------------
    brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c

Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c   2012-10-04 20:59:44 UTC 
(rev 52803)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c   2012-10-04 21:08:36 UTC 
(rev 52804)
@@ -718,7 +718,7 @@
     struct edge_info *ei;
     struct edge_info *ei_p;
     struct edge_info *tmp;
-    double dist;
+    fastf_t dist;
 
     BU_CK_LIST_HEAD(&edge_list->l);
     BU_CK_LIST_HEAD(near1);
@@ -738,7 +738,7 @@
            if (ei_p->ved_p->magic_p == ei->ved_p->magic_p &&
                ei_p->eu_p->eumate_p->vu_p->v_p == ei->eu_p->vu_p->v_p &&
                ei_p->eu_p->vu_p->v_p == ei->eu_p->eumate_p->vu_p->v_p) {
-               if (rt_g.NMG_debug & DEBUG_PT_FU) {
+               if (UNLIKELY(rt_g.NMG_debug & DEBUG_PT_FU)) {
                    bu_log("tossing edgeuse pair:\n");
                    bu_log("(%g %g %g) -> (%g %g %g)\n",
                           V3ARGS(ei->eu_p->vu_p->v_p->vg_p->coord),
@@ -783,7 +783,7 @@
        }
     }
 
-    if (rt_g.NMG_debug & DEBUG_PT_FU) {
+    if (UNLIKELY(rt_g.NMG_debug & DEBUG_PT_FU)) {
        bu_log("dist %g near list\n", dist);
        for (BU_LIST_FOR(ei, edge_info, near1)) {
            bu_log("\t(%g %g %g) -> (%g %g %g)\n",

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to