From 745b5aae16f7f35c63d1f7a05ffc9c518be4694c Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Tue, 10 Dec 2019 12:20:31 +0100 Subject: [PATCH] Fix broken 64bit hash in tbb Fixes #181 --- gtsam/base/ConcurrentMap.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gtsam/base/ConcurrentMap.h b/gtsam/base/ConcurrentMap.h index b8388057d6..19d23a024d 100644 --- a/gtsam/base/ConcurrentMap.h +++ b/gtsam/base/ConcurrentMap.h @@ -29,14 +29,22 @@ # undef max # undef ERROR +#include // std::hash() + // Use TBB concurrent_unordered_map for ConcurrentMap -# define CONCURRENT_MAP_BASE tbb::concurrent_unordered_map +template +using CONCURRENT_MAP_BASE = tbb::concurrent_unordered_map< + KEY, + VALUE, + std::hash + >; #else // If we're not using TBB, use a FastMap for ConcurrentMap -# include -# define CONCURRENT_MAP_BASE gtsam::FastMap +#include +template +using CONCURRENT_MAP_BASE = gtsam::FastMap; #endif