[Assorted-commits] SF.net SVN: assorted: [384] hash-join/trunk/src/hashjoin.cc
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-11 23:31:11
|
Revision: 384 http://assorted.svn.sourceforge.net/assorted/?rev=384&view=rev Author: yangzhang Date: 2008-02-11 15:31:10 -0800 (Mon, 11 Feb 2008) Log Message: ----------- fixed issues on 32-bit system Modified Paths: -------------- hash-join/trunk/src/hashjoin.cc Modified: hash-join/trunk/src/hashjoin.cc =================================================================== --- hash-join/trunk/src/hashjoin.cc 2008-02-11 23:25:12 UTC (rev 383) +++ hash-join/trunk/src/hashjoin.cc 2008-02-11 23:31:10 UTC (rev 384) @@ -216,7 +216,7 @@ buckets[i] = new bucket[ncpus]; for (unsigned int j = 0; j < ncpus; j++) { // TODO dependency injection - size_t bucket_size = max(1000000UL,buflen / ncpus * 3); + size_t bucket_size = max(1000000U,buflen / ncpus * 3); // Each bucket should be twice as large as it would be given uniform // distribution. This is just an initial size; extending can happen. buckets[i][j].bufs.push_back(new char[bucket_size]); @@ -252,7 +252,7 @@ { size_t h = hash_djb2(s); unsigned int bucket = h % ncpus; - size_t bucket_size = max(1000000UL, buflen * 3 / ncpus); + size_t bucket_size = max(1000000U, buflen * 3 / ncpus); if (heads[bucket] + nbytes < bs[bucket].bufs.back() + bucket_size) { memcpy(heads[bucket], p, nbytes); heads[bucket] += nbytes; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |