summaryrefslogtreecommitdiff
path: root/utils/hash.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cab.ark.cs.cmu.edu>2012-06-18 23:37:22 -0400
committerChris Dyer <cdyer@cab.ark.cs.cmu.edu>2012-06-18 23:37:22 -0400
commit78cc819168b2a550e52e9cac06dbbed41a3b04b2 (patch)
treef2645ac7928ea88d470c273333fe468a8dadbcb7 /utils/hash.h
parentc4a8ec7677eaf72c71d8409475ed0f2ca9f9b14d (diff)
switch to hash maps for sparse vectors
Diffstat (limited to 'utils/hash.h')
-rw-r--r--utils/hash.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/hash.h b/utils/hash.h
index 31457430..6d992086 100644
--- a/utils/hash.h
+++ b/utils/hash.h
@@ -10,8 +10,10 @@
#endif
#ifdef HAVE_SPARSEHASH
-# include <google/dense_hash_map>
-# include <google/dense_hash_set>
+# include <sparsehash/dense_hash_map>
+# include <sparsehash/dense_hash_set>
+# include <sparsehash/sparse_hash_map>
+# define SPARSE_HASH_MAP google::sparse_hash_map
# define HASH_MAP google::dense_hash_map
# define HASH_SET google::dense_hash_set
# define HASH_MAP_RESERVED(h,empty,deleted) do { h.set_empty_key(empty); h.set_deleted_key(deleted); } while(0)
@@ -19,6 +21,7 @@
#else
# include <tr1/unordered_map>
# include <tr1/unordered_set>
+# define SPARSE_HASH_MAP std::tr1::unordered_map
# define HASH_MAP std::tr1::unordered_map
# define HASH_SET std::tr1::unordered_set
# define HASH_MAP_RESERVED(h,empty,deleted)