24 #ifndef GRAPHLAB_SERIALIZE_UNORDERED_MAP_HPP
25 #define GRAPHLAB_SERIALIZE_UNORDERED_MAP_HPP
27 #include <boost/unordered_map.hpp>
28 #include <graphlab/serialization/iarchive.hpp>
29 #include <graphlab/serialization/oarchive.hpp>
30 #include <graphlab/serialization/iterator.hpp>
34 namespace archive_detail {
36 template <
typename OutArcType,
typename T,
typename U>
37 struct serialize_impl<OutArcType, boost::unordered_map<T,U>, false > {
38 static void exec(OutArcType& oarc,
39 const boost::unordered_map<T,U>& vec){
41 vec.begin(), vec.end(), vec.size());
47 template <
typename InArcType,
typename T,
typename U>
48 struct deserialize_impl<InArcType, boost::unordered_map<T,U>, false > {
49 static void exec(InArcType& iarc, boost::unordered_map<T,U>& vec){
55 for (
size_t x = 0; x < length ; ++x){
58 vec[v.first] = v.second;