Revision: 54982
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54982&view=rev
Author:   brlcad
Date:     2013-03-30 02:00:47 +0000 (Sat, 30 Mar 2013)
Log Message:
-----------
bump RT_DBNHASH up to the next power of two instead of 5120 and document the 
heck out of it as a deprecated interface.  include memory usage calculations 
(64kb).  the increase from 1024 should slow down all of the callers that 
manually iterate over the hash (prep, search, db open/lookup, push, tops, ls, 
...) but probably not noticeably so -- more likely to slow lookups down 
iterating down bigger linked lists with big geometry (need to 
profile/test/compare).

Modified Paths:
--------------
    brlcad/trunk/CHANGES
    brlcad/trunk/include/raytrace.h

Modified: brlcad/trunk/CHANGES
===================================================================
--- brlcad/trunk/CHANGES        2013-03-30 01:37:37 UTC (rev 54981)
+++ brlcad/trunk/CHANGES        2013-03-30 02:00:47 UTC (rev 54982)
@@ -67,15 +67,16 @@
 
 7.24
 ----
+include/raytrace.h librt
+        RT_DBHASH and RT_DBNHASH [deprecation 7.24]
 
-
 7.22
 ----
-raytrace.h librt
+include/raytrace.h librt
        nmg_model_break_e_on_v -> nmg_break_e_on_v [deprecation 7.22]
        RT_GET_TREE -> BU_GET [deprecation 7.22]
        RT_FREE_TREE -> BU_PUT [deprecation 7.22]
-bu.h
+include/bu.h
         bu_parse_mm() [deprecated 7.22]
 librtserver
         becoming stand-alone project, removes optional java dependency 
[deprecated 7.22]
@@ -93,18 +94,18 @@
        bspline primitive [deprecated 7.20]
        poly primitive [deprecated 7.20]
        hf primitive [deprecated 7.20]
-bu.h
+include/bu.h
        bu_vls_init_if_uninit() -> bu_vls_init() [deprecated 7.20]
 autogen.sh && configure
        GNU Autotools build system -> CMake build system [deprecated 7.20]
        ./configure -> cmake . [deprecated 7.20]
-raytrace.h
+include/raytrace.h
        rt_load_attrs() -> rt_gettrees_and_attrs() or db5_import_attributs() 
[deprecated 7.20]
        db_regexp_match() -> !bu_fnmatch() [deprecated 7.20]
 
 7.18
 ----
-raytrace.h rt_comb_internal members
+include/raytrace.h rt_comb_internal members
        region_id -> region_id attribute [deprecated 7.18]
        aircode -> air attribute [deprecated 7.18]
        GIFTmater -> material_id attribute [deprecated 7.18]

Modified: brlcad/trunk/include/raytrace.h
===================================================================
--- brlcad/trunk/include/raytrace.h     2013-03-30 01:37:37 UTC (rev 54981)
+++ brlcad/trunk/include/raytrace.h     2013-03-30 02:00:47 UTC (rev 54982)
@@ -772,14 +772,33 @@
 
 
 /**
+ * DEPRECATED: external applications should use other LIBRT API to
+ * access database objects.
+ *
  * The directory is organized as forward linked lists hanging off of
  * one of RT_DBNHASH headers in the db_i structure.
+ *
+ * FIXME: this should not be public API, push container and iteration
+ * down into LIBRT.  External applications should not use this.
  */
-#define        RT_DBNHASH              5120    /**< @brief size of hash table 
*/
+#define        RT_DBNHASH              8192    /**< @brief hash table is an
+                                        * array of linked lists with
+                                        * this many array pointer
+                                        * elements (Memory use for
+                                        * 32-bit: 32KB, 64-bit: 64KB)
+                                        */
 
 #if    ((RT_DBNHASH)&((RT_DBNHASH)-1)) != 0
+/**
+ * DEPRECATED: external applications should use other LIBRT API to
+ * access database objects.
+ */
 #define        RT_DBHASH(sum)  ((size_t)(sum) % (RT_DBNHASH))
 #else
+/**
+ * DEPRECATED: external applications should use other LIBRT API to
+ * access database objects.
+ */
 #define        RT_DBHASH(sum)  ((size_t)(sum) & ((RT_DBNHASH)-1))
 #endif
 

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


------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to