[GRASS-SVN] r36113 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 26 14:06:02 EST 2009


Author: mmetz
Date: 2009-02-26 14:06:02 -0500 (Thu, 26 Feb 2009)
New Revision: 36113

Modified:
   grass/trunk/lib/vector/Vlib/net.c
Log:
dglib cache enabled again

Modified: grass/trunk/lib/vector/Vlib/net.c
===================================================================
--- grass/trunk/lib/vector/Vlib/net.c	2009-02-26 17:00:50 UTC (rev 36112)
+++ grass/trunk/lib/vector/Vlib/net.c	2009-02-26 19:06:02 UTC (rev 36113)
@@ -432,9 +432,8 @@
 	G_fatal_error(_("GngFlatten error"));
 
     /* init SP cache */
-    /* Disabled because of BUG1 in dglib. Without cache it is terribly slow, but with cache there
-     *  are too many errors. */
-    /* dglInitializeSPCache( gr, &(Map->spCache) ); */
+    /* disable to debug dglib cache */
+    dglInitializeSPCache(gr, &(Map->spCache));
 
     G_message(_("Graph was built"));
 
@@ -487,16 +486,22 @@
 
     pclip = NULL;
     if (List != NULL) {
-	/*nRet = dglShortestPath ( &(Map->graph), &pSPReport, from, to, clipper, pclip, &(Map->spCache)); */
 	nRet =
 	    dglShortestPath(&(Map->graph), &pSPReport, (dglInt32_t) from,
-			    (dglInt32_t) to, clipper, pclip, NULL);
+			    (dglInt32_t) to, clipper, pclip, &(Map->spCache));
+	/* comment out above and uncomment below to debug dglib cache */
+	/* nRet =
+	    dglShortestPath(&(Map->graph), &pSPReport, (dglInt32_t) from,
+			    (dglInt32_t) to, clipper, pclip, NULL); */
     }
     else {
-	/*nRet = dglShortestDistance ( &(Map->graph), &nDistance, from, to, clipper, pclip, &(Map->spCache)); */
 	nRet =
 	    dglShortestDistance(&(Map->graph), &nDistance, (dglInt32_t) from,
-				(dglInt32_t) to, clipper, pclip, NULL);
+				(dglInt32_t) to, clipper, pclip, &(Map->spCache));
+	/* comment out above and uncomment below to debug dglib cache */
+	/* nRet =
+	    dglShortestDistance(&(Map->graph), &nDistance, (dglInt32_t) from,
+				(dglInt32_t) to, clipper, pclip, NULL); */
     }
 
     if (nRet == 0) {



More information about the grass-commit mailing list