From 78cc819168b2a550e52e9cac06dbbed41a3b04b2 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 18 Jun 2012 23:37:22 -0400 Subject: switch to hash maps for sparse vectors --- utils/hash.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'utils/hash.h') 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 -# include +# include +# include +# include +# 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 # include +# 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) -- cgit v1.2.3