susumu.yata
null+****@clear*****
Tue Jul 23 14:42:15 JST 2013
susumu.yata 2013-07-23 14:42:15 +0900 (Tue, 23 Jul 2013) New Revision: 68fc418db83d4056a3e2d7ad1e05b22c51c37be5 https://github.com/groonga/grnxx/commit/68fc418db83d4056a3e2d7ad1e05b22c51c37be5 Message: Move grnxx/map/hash_table/hash.hpp to grnxx/map/hash.hpp. Removed files: lib/grnxx/map/hash_table/Makefile.am lib/grnxx/map/hash_table/dummy.cpp lib/grnxx/map/hash_table/dummy.hpp Modified files: configure.ac lib/grnxx/map/Makefile.am lib/grnxx/map/hash_table.cpp lib/grnxx/map/patricia.cpp test/test_map.cpp Renamed files: lib/grnxx/map/hash.hpp (from lib/grnxx/map/hash_table/hash.hpp) Modified: configure.ac (+0 -1) =================================================================== --- configure.ac 2013-07-23 13:44:59 +0900 (881d63c) +++ configure.ac 2013-07-23 14:42:15 +0900 (4df9e9b) @@ -63,7 +63,6 @@ AC_CONFIG_FILES([Makefile lib/grnxx/charset/Makefile lib/grnxx/map/Makefile lib/grnxx/map/double_array/Makefile - lib/grnxx/map/hash_table/Makefile lib/grnxx/map/patricia/Makefile lib/grnxx/storage/Makefile src/Makefile Modified: lib/grnxx/map/Makefile.am (+1 -2) =================================================================== --- lib/grnxx/map/Makefile.am 2013-07-23 13:44:59 +0900 (e856a43) +++ lib/grnxx/map/Makefile.am 2013-07-23 14:42:15 +0900 (a662804) @@ -1,13 +1,11 @@ SUBDIRS = \ double_array \ - hash_table \ patricia noinst_LTLIBRARIES = libgrnxx_map.la libgrnxx_map_la_LIBADD = \ double_array/libgrnxx_map_double_array.la \ - hash_table/libgrnxx_map_hash_table.la \ patricia/libgrnxx_map_patricia.la libgrnxx_map_la_LDFLAGS = @AM_LTLDFLAGS@ @@ -32,6 +30,7 @@ libgrnxx_map_include_HEADERS = \ common_header.hpp \ cursor_impl.hpp \ double_array.hpp \ + hash.hpp \ hash_table.hpp \ header.hpp \ helper.hpp \ Renamed: lib/grnxx/map/hash.hpp (+0 -2) 98% =================================================================== --- lib/grnxx/map/hash_table/hash.hpp 2013-07-23 13:44:59 +0900 (9558df4) +++ lib/grnxx/map/hash.hpp 2013-07-23 14:42:15 +0900 (37b410b) @@ -27,7 +27,6 @@ namespace grnxx { namespace map { -namespace hash_table { // Calculate a hash value. template <typename T> @@ -161,7 +160,6 @@ struct Hash<Bytes> { } }; -} // namespace hash_table } // namespace map } // namespace grnxx Modified: lib/grnxx/map/hash_table.cpp (+1 -4) =================================================================== --- lib/grnxx/map/hash_table.cpp 2013-07-23 13:44:59 +0900 (d3504c9) +++ lib/grnxx/map/hash_table.cpp 2013-07-23 14:42:15 +0900 (a49f811) @@ -26,7 +26,7 @@ #include "grnxx/lock.hpp" #include "grnxx/logger.hpp" #include "grnxx/map/common_header.hpp" -#include "grnxx/map/hash_table/hash.hpp" +#include "grnxx/map/hash.hpp" #include "grnxx/map/helper.hpp" #include "grnxx/mutex.hpp" #include "grnxx/storage.hpp" @@ -42,9 +42,6 @@ constexpr int64_t TABLE_ENTRY_REMOVED = -2; constexpr uint64_t MIN_TABLE_SIZE = 256; -template <typename T> -using Hash = hash_table::Hash<T>; - } // namespace struct HashTableHeader { Deleted: lib/grnxx/map/hash_table/Makefile.am (+0 -11) 100644 =================================================================== --- lib/grnxx/map/hash_table/Makefile.am 2013-07-23 13:44:59 +0900 (bcb1a90) +++ /dev/null @@ -1,11 +0,0 @@ -noinst_LTLIBRARIES = libgrnxx_map_hash_table.la - -libgrnxx_map_hash_table_la_LDFLAGS = @AM_LTLDFLAGS@ - -libgrnxx_map_hash_table_la_SOURCES = \ - dummy.cpp - -libgrnxx_map_hash_table_includedir = ${includedir}/grnxx/map/hash_table -libgrnxx_map_hash_table_include_HEADERS = \ - dummy.hpp \ - hash.hpp Deleted: lib/grnxx/map/hash_table/dummy.cpp (+0 -28) 100644 =================================================================== --- lib/grnxx/map/hash_table/dummy.cpp 2013-07-23 13:44:59 +0900 (6aefa8a) +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2012-2013 Brazil, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ -#include "grnxx/map/hash_table/dummy.hpp" - -#include "grnxx/map/hash_table/hash.hpp" - -namespace grnxx { -namespace map { -namespace hash_table { - -} // namespace hash_table -} // namespace map -} // namespace grnxx Deleted: lib/grnxx/map/hash_table/dummy.hpp (+0 -31) 100644 =================================================================== --- lib/grnxx/map/hash_table/dummy.hpp 2013-07-23 13:44:59 +0900 (e4b18d6) +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2012-2013 Brazil, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ -#ifndef GRNXX_MAP_HASH_TABLE_DUMMY_HPP -#define GRNXX_MAP_HASH_TABLE_DUMMY_HPP - -#include "grnxx/features.hpp" - -namespace grnxx { -namespace map { -namespace array_map { - -} // namespace array_map -} // namespace map -} // namespace grnxx - -#endif // GRNXX_MAP_HASH_TABLE_DUMMY_HPP Modified: lib/grnxx/map/patricia.cpp (+2 -2) =================================================================== --- lib/grnxx/map/patricia.cpp 2013-07-23 13:44:59 +0900 (9d911df) +++ lib/grnxx/map/patricia.cpp 2013-07-23 14:42:15 +0900 (26968aa) @@ -24,7 +24,7 @@ #include "grnxx/geo_point.hpp" #include "grnxx/logger.hpp" #include "grnxx/map/common_header.hpp" -#include "grnxx/map/hash_table/hash.hpp" +#include "grnxx/map/hash.hpp" #include "grnxx/map/helper.hpp" #include "grnxx/map/patricia/header.hpp" #include "grnxx/storage.hpp" @@ -908,7 +908,7 @@ bool Patricia<Bytes>::add(KeyArg key, int64_t *key_id) { constexpr std::size_t HISTORY_SIZE = 8; int64_t * const cache = nullptr; // int64_t * const cache = -// &cache_->get_value(hash_table::Hash<Key>()(key) % cache_->size()); +// &cache_->get_value(Hash<Key>()(key) % cache_->size()); // if ((*cache >= 0) && (*cache < keys_->max_key_id())) { // if (keys_->get_bit(*cache)) { // Key cached_key = keys_->get_key(*cache); Modified: test/test_map.cpp (+2 -2) =================================================================== --- test/test_map.cpp 2013-07-23 13:44:59 +0900 (c73e43e) +++ test/test_map.cpp 2013-07-23 14:42:15 +0900 (db144b0) @@ -30,8 +30,8 @@ #include "grnxx/map.hpp" #include "grnxx/map/bytes_array.hpp" #include "grnxx/map/bytes_pool.hpp" +#include "grnxx/map/hash.hpp" #include "grnxx/map/helper.hpp" -#include "grnxx/map/hash_table/hash.hpp" #include "grnxx/periodic_clock.hpp" #include "grnxx/storage.hpp" @@ -52,7 +52,7 @@ std::mt19937_64 mersenne_twister(mersenne_twister_seed); // For std::unordered_set. template <typename T> -using Hash = grnxx::map::hash_table::Hash<T>; +using Hash = grnxx::map::Hash<T>; // For std::random_shuffle(). struct RandomNumberGenerator { -------------- next part -------------- HTML����������������������������...Download