Revision: 52805
http://brlcad.svn.sourceforge.net/brlcad/?rev=52805&view=rev
Author: r_weiss
Date: 2012-10-04 21:20:42 +0000 (Thu, 04 Oct 2012)
Log Message:
-----------
Updated function "compute_loop_class" in file "nmg_pt_fu.c". 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 21:08:36 UTC
(rev 52804)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c 2012-10-04 21:20:42 UTC
(rev 52805)
@@ -886,7 +886,7 @@
struct bu_list near1;
int lu_class = NMG_CLASS_Unknown;
- if (rt_g.NMG_debug & DEBUG_PT_FU) {
+ if (UNLIKELY(rt_g.NMG_debug & DEBUG_PT_FU)) {
bu_log("compute_loop_class()\n");
for (BU_LIST_FOR(ei, edge_info, &edge_list->l)) {
bu_log("dist:%g class:%s status:%d\n\tv1(%g %g %g) v2(%g %g %g)\n",
@@ -917,7 +917,7 @@
} else
bu_bomb("bad lu orientation\n");
- if (rt_g.NMG_debug & DEBUG_PT_FU) {
+ if (UNLIKELY(rt_g.NMG_debug & DEBUG_PT_FU)) {
bu_log("list was empty, so class is %s\n",
nmg_class_name(lu_class));
}
@@ -934,7 +934,7 @@
case 1: /* pt is on ei->ved_p->v1 */
case 2: /* pt is on ei->ved_p->v2 */
lu_class = NMG_CLASS_AonBshared;
- if (rt_g.NMG_debug & DEBUG_PT_FU)
+ if (UNLIKELY(rt_g.NMG_debug & DEBUG_PT_FU))
pl_pt_lu(fpi, lu, ei);
done = 1;
break;
@@ -942,11 +942,11 @@
case 4: /* pt pca is v2 */
case 5: /* pt pca between v1 and v2 */
lu_class = ei->class;
- if (rt_g.NMG_debug & DEBUG_PT_FU) {
+ if (UNLIKELY(rt_g.NMG_debug & DEBUG_PT_FU)) {
bu_log("found status 5 edge, loop class is %s\n",
nmg_class_name(lu_class));
}
- if (rt_g.NMG_debug & DEBUG_PT_FU)
+ if (UNLIKELY(rt_g.NMG_debug & DEBUG_PT_FU))
pl_pt_lu(fpi, lu, ei);
done = 1;
break;
@@ -969,7 +969,7 @@
bu_free((char *)ei, "edge_info struct");
}
- if (rt_g.NMG_debug & DEBUG_PT_FU) {
+ if (UNLIKELY(rt_g.NMG_debug & DEBUG_PT_FU)) {
bu_log("compute_loop_class() returns %s\n",
nmg_class_name(lu_class));
}
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