Recently, I've been a happy user of the FastSparseVector class, but I couldn't figure out how to make it "serializable". I get a compilation error when I call boost::mpi::broadcast (reduce gives a similar error) specializing the function template to FastSparseVector<double>. The problematic line is:
boost::mpi::broadcast< FastSparseVector<double> >(mpiWorld, mySparseVector, 0);
The error is (attached is the full error stream output):
In instantiation of function template specialization 'boost::mpi::broadcast<FastSparseVector<double, 7> >':
In file included from /opt/tools/boost_1_52_0/boost/serialization/extended_type_info_typeid.hpp:37:
/opt/tools/boost_1_52_0/boost/serialization/access.hpp:118:11: error: no member named 'serialize' in 'FastSparseVector<double, 7>'
t.serialize(ar, file_version);
~ ^
My header file contains the following subsequence of lines:
#include <boost/archive/text_oarchive.hpp>
#define HAVE_BOOST_ARCHIVE_TEXT_OARCHIVE_HPP 1
#include "cdec-utils/fast_sparse_vector.h"
I'm using the current version of cdec utils, boost v.1.52.0, LLVM 3.1
Thanks,
waleed