From d5f3af34344340c718d07c9c84d562785443747e Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 23 Feb 2004 03:32:54 +0000 Subject: "" svn path=/trunk/; revision=1350 --- externals/grill/pool/source/pool.cpp | 17 +++++++++++++++-- externals/grill/pool/source/pool.h | 3 +++ 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'externals/grill/pool/source') diff --git a/externals/grill/pool/source/pool.cpp b/externals/grill/pool/source/pool.cpp index 4d6d100e..dcb16237 100644 --- a/externals/grill/pool/source/pool.cpp +++ b/externals/grill/pool/source/pool.cpp @@ -878,6 +878,19 @@ BL pooldir::SvDirXML(ostream &os,I depth,const AtomList &dir,I ind) return true; } +unsigned int pooldir::FoldBits(unsigned long h,int bits) +{ + if(!bits) return 0; + const int hmax = (1<>i)&hmax; + return ret; +} - - +int pooldir::Int2Bits(unsigned long n) +{ + int b; + for(b = 0; n; ++b) n >>= 1; + return b; +} diff --git a/externals/grill/pool/source/pool.h b/externals/grill/pool/source/pool.h index 99e271b3..1874d334 100644 --- a/externals/grill/pool/source/pool.h +++ b/externals/grill/pool/source/pool.h @@ -103,6 +103,9 @@ protected: pooldir *parent; const I vbits,dbits,vsize,dsize; + static unsigned int FoldBits(unsigned long h,int bits); + static int Int2Bits(unsigned long n); + struct valentry { int cnt; poolval *v; }; struct direntry { int cnt; pooldir *d; }; -- cgit v1.2.1