susumu.yata
null+****@clear*****
Mon Jan 7 18:09:31 JST 2013
susumu.yata 2013-01-07 18:09:31 +0900 (Mon, 07 Jan 2013) New Revision: 39be385cb10eb452bae71fccdc93d67a8b21b39b https://github.com/groonga/grnxx/commit/39be385cb10eb452bae71fccdc93d67a8b21b39b Log: Add estimate_size() to DoubleArrayKey. Modified files: lib/alpha/double_array.hpp Modified: lib/alpha/double_array.hpp (+4 -0) =================================================================== --- lib/alpha/double_array.hpp 2013-01-07 18:02:48 +0900 (7586ecb) +++ lib/alpha/double_array.hpp 2013-01-07 18:09:31 +0900 (bc0e7f6) @@ -236,6 +236,10 @@ class DoubleArrayKey { return buf_; } + static uint64_t estimate_size(uint64_t length) { + return 2 + (length / sizeof(uint32_t)); + } + private: uint32_t id_low_; uint8_t id_high_; -------------- next part -------------- HTML����������������������������... 下載