From e350d445a6a65ff1fa759911a785775b3152952f Mon Sep 17 00:00:00 2001 From: graehl Date: Tue, 20 Jul 2010 21:38:29 +0000 Subject: hash.h git-svn-id: https://ws10smt.googlecode.com/svn/trunk@342 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/hash.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 decoder/hash.h (limited to 'decoder/hash.h') diff --git a/decoder/hash.h b/decoder/hash.h new file mode 100755 index 00000000..3e4ad1ff --- /dev/null +++ b/decoder/hash.h @@ -0,0 +1,19 @@ +#ifndef CDEC_HASH_H +#define CDEC_HASH_H + +#include "config.h" +#ifdef HAVE_SPARSEHASH +# include +# define HASH_MAP google::dense_hash_map +# define HASH_MAP_RESERVED(h,empty,deleted) do { h.set_empty_key(empty); h.set_deleted_key(deleted); } while(0) +# define HASH_MAP_EMPTY(h,empty) do { h.set_empty_key(empty); } while(0) +#else +# include +# define HASH_MAP std::tr1::unordered_map +# define HASH_MAP_RESERVED(h,empty,deleted) +# define HASH_MAP_EMPTY(h,empty) +#endif +#include + + +#endif -- cgit v1.2.3